新增: 项目归档

This commit is contained in:
lxy
2026-10-05 14:59:12 +08:00
parent 63c5c3d4f0
commit 24d6803ecc
19 changed files with 250 additions and 17 deletions
+10
View File
@@ -96,6 +96,16 @@ export const projectApi = {
return invoke('list_deleted_projects')
},
/** 归档/取消归档项目(归档功能 P2,V48)。归档后退出主列表,归档箱内可见可恢复 */
archive(id: string, archived: boolean): Promise<boolean> {
return invoke('archive_project', { id, archived })
},
/** 列出归档项目(归档箱数据源) */
listArchived(): Promise<ProjectRecord[]> {
return invoke('list_archived_projects')
},
restore(id: string): Promise<boolean> {
return invoke('restore_project', { id })
},
+13
View File
@@ -430,6 +430,12 @@ export type AiChatEvent = ({
// 技能注入反馈闭环:/ 技能 resolve 成功(ok=true)/失败(ok=false,未找到或读失败)通知,
// 前端轻 toast(成功「已注入技能《name》」/失败「技能 name 未找到」)。仅提示,不改消息流。
type: 'AiSkillInjected'; name: string; ok: boolean
} | {
// 工具执行实时流式输出(run_command shell 行级 / ask_uclaw 进度块级):
// 后端经 task-local sink(command_stream / tools/uclaw)emit,前端按 id 路由到对应
// 工具卡,在 Started→Completed 间实时展示。合批在后端(50ms/4KB 或 u-claw 2s 节流)。
// stream: "stdout"|"stderr"(来源,前端差异化着色);line:累积文本块(多行 '\n' 连接)。
type: 'AiCommandOutput'; id: string; stream: string; line: string
} | {
// path_auth 审批链阶段3b(统一审批模型):AiApprovalRequired 携带 kind 字段区分
// 'path'(F-260619-03 Phase B 路径授权挂起,走 once/session/always/deny)vs 'risk'(普通 RiskLevel 审批,
@@ -744,6 +750,13 @@ export interface AiToolCallInfo {
startedAt?: number
/** 工具执行完成时间(前端在 AiToolCallCompleted 时记录,毫秒)。语义同 startedAt。 */
completedAt?: number
/**
* 执行中实时流式输出(AiCommandOutput 事件累积):run_command shell 行级 /
* ask_uclaw 进度块级。数组按到达序追加,ToolCard running 态实时渲染(尾部 N 行),
* Completed 时清空(真实结果由 result 字段渲染,防双显)。
* undefined = 无流式输出的工具或历史消息(DB 回载不含此内存态)。
*/
streamLines?: string[]
/**
* A2-B10 conv-scoped 审批收尾:挂起审批所属的会话 id(前端判定用,仅挂起项设置)。
* 来源:AiApprovalRequired / AiDirAuthRequired(统一审批归一)事件透传 conversation_id