重构: 前端 composable 拆分+详情页 Markdown 渲染+流式 memo+状态同步+bug 修复

- composables/useMarkdown 抽(AiChat 复用)+ai/* 流式核心+useAiSend catch 回滚 user msg(B-21)+useAiStream 超时文案(B-03)+useAiConversations 切换 token(FR-R1)
- views/TaskDetail 新建(F-02)+描述 md+mdReady 响应式+字段同行布局(B-24/31)
- views/ProjectDetail 多选审批 UI(F-01)+描述 md+mdReady+字段同行(B-25/31)
- views/Ideas+Knowledge 描述 md+mdReady(B-25)
- views/Tasks 项目切换联动(B-29)+task 详情跳转
- components/AiChat toast 失败提示(B-20)+流式块级 memo(ARC-08)+clean UI(AR-7)+stop 兜底(AR-5)
- components/ToolCard 审批卡片可读化(AR-3)
- stores useAiStore barrel(ARC-04)+del settings mock(ARC-01)+approve options(R-PD-5)
- i18n aiTool/nav 中英对称(AR-3/9)+删 nav.decisions 死链(ARC-02)
- router /tasks/:id(F-02)+global.css selection 可见(R-260615-01)+api task detail+App 删 decisions nav
This commit is contained in:
2026-06-15 05:14:56 +08:00
parent 2de0c6ecb7
commit 80b9243528
26 changed files with 997 additions and 207 deletions

View File

@@ -6,6 +6,10 @@ export const taskApi = {
return invoke('list_tasks', { projectId: projectId ?? null })
},
get(id: string): Promise<TaskRecord> {
return invoke('get_task_by_id', { id })
},
create(input: CreateTaskInput): Promise<TaskRecord> {
return invoke('create_task', { input })
},

View File

@@ -180,6 +180,8 @@ export type AiChatEvent = ({
type: 'AiError'; error: string
} | {
type: 'AiAgentRound'; round: number
} | {
type: 'AiHeartbeat'
}) & {
conversation_id?: string
}
@@ -221,6 +223,9 @@ export interface AiConversationSummary {
updated_at: string
}
/** 审批选择类型(F-260615-01: single=单选默认,multiple=多选) */
export type ApprovalSelectType = 'single' | 'multiple'
/** 人工审批请求 */
export interface HumanApprovalRequest {
execution_id: string
@@ -228,6 +233,8 @@ export interface HumanApprovalRequest {
title: string
description: string
options: string[]
/** F-260615-01: 缺省 single(向后兼容),multiple 时允许多选 */
select_type?: ApprovalSelectType
}
/** 人工审批响应 */
@@ -235,6 +242,8 @@ export interface HumanApprovalResponse {
execution_id: string
node_id: string
decision: string
/** F-260615-01: 多选结果(single 时长度=1,multiple 时长度≥1) */
decisions?: string[]
comment?: string
}