From 4e37dfdee1ea699a4556f07b2c8f2f5c4134ad60 Mon Sep 17 00:00:00 2001 From: xiaomakuaiz Date: Mon, 3 Aug 2026 11:47:56 +0000 Subject: [PATCH] =?UTF-8?q?fix(desktop):=20=E4=BA=91=E7=AB=AF=E5=A4=A7?= =?UTF-8?q?=E7=BA=B2=E4=B8=8D=E6=98=BE=E7=A4=BA=E2=80=94=E2=80=94=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E6=BC=8F=E8=BF=9B=20ACL=20=E7=99=BD=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mc_task_user_inputs 只注册了 generate_handler,漏了 build.rs 的 AppManifest 命令清单与 tauri.conf.json 的 capabilities 白名单,invoke 运行时被 ACL 拒绝;索引拉取的 catch 又全静默,表现为大纲整体不显示且 无报错。补两处注册,catch 改为 console.warn 留痕(降级行为不变)。 --- desktop/build.rs | 1 + desktop/tauri.conf.json | 1 + desktop/ui/src/cloudOutline.ts | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/desktop/build.rs b/desktop/build.rs index 8c253940..b34a8cde 100644 --- a/desktop/build.rs +++ b/desktop/build.rs @@ -89,6 +89,7 @@ fn main() { "mc_projects", "mc_task_info", "mc_task_rounds", + "mc_task_user_inputs", "mc_task_stop", "mc_task_delete", "mc_task_create", diff --git a/desktop/tauri.conf.json b/desktop/tauri.conf.json index ddcd102d..0abb7573 100644 --- a/desktop/tauri.conf.json +++ b/desktop/tauri.conf.json @@ -93,6 +93,7 @@ "allow-mc-projects", "allow-mc-task-info", "allow-mc-task-rounds", + "allow-mc-task-user-inputs", "allow-mc-task-stop", "allow-mc-task-delete", "allow-mc-task-create", diff --git a/desktop/ui/src/cloudOutline.ts b/desktop/ui/src/cloudOutline.ts index 41c47692..a2313221 100644 --- a/desktop/ui/src/cloudOutline.ts +++ b/desktop/ui/src/cloudOutline.ts @@ -74,8 +74,10 @@ export function useCloudOutline(id: string, items: LogItem[]): OutlineEntry[] { cursor = r.next_cursor; } if (alive) setRest(cloudOutlineItems(all)); - })().catch(() => { - /* 大纲缺席可接受,任务回放不受影响 */ + })().catch((e: unknown) => { + // 大纲缺席可接受(降级为只有实时条目),但失败必须留痕:上次命令没进 + // capabilities 白名单,invoke 被拒就是被这里的静默吞掉才难查的 + console.warn("[cloud-outline] 提问索引拉取失败:", e); }); return () => { alive = false;