优化: 上下文管理与提示词链路批

- T1 usage 口径: anthropic usage 两层容错+cache 三口径归一(prompt=input+read+creation)
- T2 压缩水位判据: compress_should_trigger 双模式+ratio 钳位,开关关逐字节等价
- T3 跨会话检索: history_search 工具(两跳式)+message_repo 关键词检索+prompt 指引
- T4 代语义闭环: status 终局补写+飞书停靠/换代推卡+交付引导+watcher 兜底补漏
- 段序缓存重排: build_runtime_prompt 恒静段上移/工作上下文压尾(前缀缓存失效面收窄)
- 智谱缓存解析: anthropic 臂补 prompt_tokens_details.cached_tokens 嵌套回退
- 工时禁令: 提示词双语加「禁止预估工时,AI Coding 工时无意义」
- 拖拽文件落盘: 非图片附件存引用行,防整段文本灌入输入框
- 事实修正: 提示词「40+ 工具」→「80+」(基线 81);tool_failure_memory 测试串行锁除竞态
- UI 拆分: TopBar/ToolResultBody 壳层化(top-bar/tool-result-body 子件目录)
This commit is contained in:
lxy
2026-10-26 01:36:00 +08:00
parent 23e505bc40
commit a30f599fe2
59 changed files with 2651 additions and 2541 deletions
+3 -5
View File
@@ -1782,7 +1782,7 @@ defineExpose({
v-if="m.toolCalls && m.toolCalls.length > 0"
ref="toolCardListRef"
:toolCalls="m.toolCalls"
@approve="({ id, approved, decision }) => store.approveToolCall(id, approved, decision)"
@approve="({ id, approved }) => store.approveToolCall(id, approved)"
@batch-approve="(decision) => store.batchApprove(decision)"
@install-obscura="onInstallObscura"
@pending-out-of-view="onPendingOutOfView"
@@ -1817,7 +1817,7 @@ defineExpose({
<div v-if="m.toolCalls && m.toolCalls.length > 0" class="ai-trace-round">
<ToolCardList
:toolCalls="m.toolCalls"
@approve="({ id, approved, decision }) => store.approveToolCall(id, approved, decision)"
@approve="({ id, approved }) => store.approveToolCall(id, approved)"
@batch-approve="(decision) => store.batchApprove(decision)"
@install-obscura="onInstallObscura"
@pending-out-of-view="onPendingOutOfView"
@@ -2124,13 +2124,11 @@ defineExpose({
</div>
<!-- 工具调用卡片(渲染/折叠/审批全下沉到 ToolCardList+ToolCard 子组件,MessageList 仅转发审批) -->
<!-- path_auth 审批链阶段3b:approve 事件透传 decision(path 类 once/always/deny),
store.approveToolCall 据 decision 走 authorizeDir,缺省走 approve。 -->
<ToolCardList
v-if="item.msg.toolCalls && item.msg.toolCalls.length > 0"
ref="toolCardListRef"
:toolCalls="item.msg.toolCalls"
@approve="({ id, approved, decision }) => store.approveToolCall(id, approved, decision)"
@approve="({ id, approved }) => store.approveToolCall(id, approved)"
@batch-approve="(decision) => store.batchApprove(decision)"
@install-obscura="onInstallObscura"
@pending-out-of-view="onPendingOutOfView"