feat: variables 2.0 state + L0 summary integration

This commit is contained in:
2026-01-31 23:06:03 +08:00
parent 201c74dc71
commit 4b0541610b
22 changed files with 1949 additions and 2314 deletions

View File

@@ -128,9 +128,16 @@ function formatArcLine(a) {
return `- ${a.name}${a.trajectory}`;
}
// 完整 chunk 输出(不截断
// 完整 chunk 输出(支持 L0 虚拟 chunk
function formatChunkFullLine(c) {
const { name1, name2 } = getContext();
// L0 虚拟 chunk
if (c.isL0) {
return ` #${c.floor + 1} [📌] ${String(c.text || "").trim()}`;
}
// L1 真实 chunk
const speaker = c.isUser ? (name1 || "用户") : (name2 || "角色");
return ` #${c.floor + 1} [${speaker}] ${String(c.text || "").trim()}`;
}