feat(voice): 提升桌面端语音交互与本地任务执行支持
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
/**
|
||||
* App 经 Wails v3 的 Service 绑定暴露给前端,承载只有桌面端能做的原生能力:
|
||||
* 文件读写、系统"另存为"框、用系统默认应用打开、原生通知。
|
||||
* 文件读写、系统"另存为"框、用系统默认应用打开、原生通知、本地执行 runner(JARVIS 的手)。
|
||||
* v3 中不再需要注入 ctx——对话框经 application.Get().Dialog 获取。
|
||||
* @module
|
||||
*/
|
||||
@@ -12,6 +12,13 @@
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
/**
|
||||
* LocalRunnerStatus 返回 "offline" / "connecting" / "online:<workdir>"(前端状态显示)。
|
||||
*/
|
||||
export function LocalRunnerStatus(): $CancellablePromise<string> {
|
||||
return $Call.ByID(1389428436);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify 弹一条系统通知(best-effort:macOS 用 osascript,其它平台暂静默)。
|
||||
*/
|
||||
@@ -42,3 +49,18 @@ export function PrintReportPage(filename: string, html: string): $CancellablePro
|
||||
export function SaveReportAs(url: string, filename: string): $CancellablePromise<string> {
|
||||
return $Call.ByID(1437856486, url, filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* StartLocalRunner 开启本地文件访问:以 workdir 为沙箱根连接 gateway 注册执行器。
|
||||
* 幂等:重复调用先停旧连接。断线自动重连(5s 退避)直到 StopLocalRunner。
|
||||
*/
|
||||
export function StartLocalRunner(gatewayURL: string, token: string, workdir: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(2808780368, gatewayURL, token, workdir);
|
||||
}
|
||||
|
||||
/**
|
||||
* StopLocalRunner 关闭本地文件访问(幂等)。
|
||||
*/
|
||||
export function StopLocalRunner(): $CancellablePromise<void> {
|
||||
return $Call.ByID(476635130);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user