返回 DeepSeek-Reasonix
botRuntimeAdapter.ts
根目录 / desktop / frontend / src / app-runtime / botRuntimeAdapter.ts
1 import { app } from "../lib/bridge";
2 import { desktopHost } from "../lib/desktopHost";
3 import type { BotRuntimeStatusView } from "../lib/types";
4
5 export async function loadBotRuntimeStatus(): Promise<BotRuntimeStatusView | null> {
6 if (typeof window !== "undefined" && desktopHost().kind === "none") return null;
7 try {
8 return await app.BotRuntimeStatus();
9 } catch (error) {
10 console.warn("bot runtime status failed", error);
11 return null;
12 }
13 }
14
14 lines TYPESCRIPT