新增: F-15阶段2手动上下文管理(2 IPC+3事件+前端按钮+status渲染)

This commit is contained in:
2026-06-17 01:09:41 +08:00
parent 7fd29e68c3
commit 4194842561
10 changed files with 751 additions and 36 deletions

View File

@@ -83,6 +83,10 @@ export async function switchConversation(id: string) {
content: m.content || '',
model: m.model,
timestamp: Date.now(),
// F-15 阶段2: 透传 status(archived_segment/compressed/null|active),
// 供 AiChat.vue 按 status 折叠分组渲染。types.ts 未含此字段(不在本任务白名单),
// 经 as any 透传,消费方 AiChat.vue 同样 cast 读取,类型闭环在两端。
status: m.status,
toolCalls: m.tool_calls?.map((tc: any): AiToolCallInfo => {
// 逐条容错:单条坏 arguments 仅降级为空对象,不影响整条对话回填
let args: unknown = {}