修复: workspace_root 编译期常量消除+data_dir 运行期+首次授权引导

- 删除 production 中全部 env!("CARGO_MANIFEST_DIR")引用
- workspace_root() 替换为运行期 data_dir(Tauri app_data_dir)
- 相对路径锚定改为 AllowedDirs.first_persistent_dir(),无授权时引导绑定项目
- .trash 迁到 data_dir/.trash,含自动迁移
- authz_debug → temp_dir,workspace_drive → current_dir
- run_command 默认 working_dir 改为空串
- G1 目标刷新改为每次消息覆盖(含 ai_chat_edit 路径)
- #6 评分关键词拆到独立文件 scoring_keywords.rs
- #7 promote 补偿删除 purge_with_descendants → soft_delete
- #8 关联双向同步: 后端事务 sync_related_ids + IPC + 前端全链路
- 设置面板新增数据目录显示
This commit is contained in:
2026-06-27 21:32:12 +08:00
parent a6d692270f
commit 9c3f27f4ca
26 changed files with 743 additions and 104 deletions

View File

@@ -373,10 +373,10 @@ async function onUpdateDesc(desc: string) {
await store.updateIdea(currentIdea.value.id, 'description', desc)
}
// 接收 IdeaDetail 子组件 emit 的 'update-related'(关联灵感编辑保存)
// 接收 IdeaDetail 子组件 emit 的 'update-related'(关联灵感编辑保存,双向同步)
async function onUpdateRelated(ids: string[]) {
if (!currentIdea.value) return
await store.updateIdea(currentIdea.value.id, 'related_ids', JSON.stringify(ids))
await store.relateIdeas(currentIdea.value.id, ids)
}
onMounted(async () => {