mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-24 13:18:53 +08:00
fix(desktop): 云端大纲不显示——命令漏进 ACL 白名单
mc_task_user_inputs 只注册了 generate_handler,漏了 build.rs 的 AppManifest 命令清单与 tauri.conf.json 的 capabilities 白名单,invoke 运行时被 ACL 拒绝;索引拉取的 catch 又全静默,表现为大纲整体不显示且 无报错。补两处注册,catch 改为 console.warn 留痕(降级行为不变)。
This commit is contained in:
1 parent
d17a5a299c
commit
4e37dfdee1
3 files changed
+6
-2
No files matched your search
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user