refactor(templates): 提示词按用途分组命名 + 压缩回合剔除 [CTX] 注入行
- 命名混乱整治:prompt-*(压缩/标题系统侧指令)与 profile-*(各 profile 的 system prompt)两组:system-prompt.txt→profile-default.txt、 advising/lab/zero-system.txt→profile-*.txt、compress/title-prompt.txt→ prompt-*.txt;全库引用(llm/config/engine/README×2/example/ARCHITECTURE)同步 - compressMessages 输入过滤:memory_note/scheduler_note/errAck/旧 summarize_request 不进摘要(跨会话噪音+滚雪球,同 engine JOURNAL_SKIP_TYPES 虑);channel_note 刻意 保留——压缩落库存档全部行,微信约束只能靠摘要转世;task_brief/summary 照常 - 画像快照本就不在 messages 表,压缩/标题均天然不带
This commit is contained in:
@@ -1154,7 +1154,7 @@ function deleteSession(sessionId, deleteDir) {
|
||||
|
||||
// 上下文压缩:phase-bar「压缩」按钮触发。不再往会话里插入指令消息:
|
||||
// 压缩回合沿用默认 system prompt + 正常历史消息,末尾追加一条 user
|
||||
//(templates/compress-prompt.txt 原文,见 llm.compressMessages),且不传 tools
|
||||
//(templates/prompt-compress.txt 原文,见 llm.compressMessages),且不传 tools
|
||||
//(见 runLoopInner 的 compressing 分支),模型直接基于历史输出摘要。
|
||||
// 识别标记 = run.summarizing(仅在内存 run 上,不入库):runLoopInner 据此换 prompt/去 tools,
|
||||
// 并在压缩回合的收尾答复 emit 时带 is_summary: true,前端据此把气泡装进摘要卡片并淡出存档旧历史。
|
||||
|
||||
Reference in New Issue
Block a user