feat: publish HoloLake model-native living system source

This commit is contained in:
冰朔 2026-08-03 10:04:41 +08:00
commit c395dd3a99
2467 changed files with 615073 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import { invoke } from '@tauri-apps/api/core'
let cachedAgentDocsPath: string | null | undefined
export async function getAgentDocsPath(): Promise<string | undefined> {
if (cachedAgentDocsPath !== undefined) return cachedAgentDocsPath ?? undefined
try {
const path = await invoke<string>('get_agent_docs_path')
cachedAgentDocsPath = path.trim() || null
} catch {
cachedAgentDocsPath = null
}
return cachedAgentDocsPath ?? undefined
}
export function resetAgentDocsPathCacheForTests(): void {
cachedAgentDocsPath = undefined
}