feat: implement history split functionality to optimize context usage and add corresponding UI settings

This commit is contained in:
CJACK.
2026-04-22 18:23:09 +00:00
parent f178000d69
commit 2788e20f05
27 changed files with 880 additions and 54 deletions

View File

@@ -379,6 +379,12 @@
"behaviorTitle": "Behavior",
"responsesTTL": "Responses store TTL (seconds)",
"embeddingsProvider": "Embeddings provider",
"historySplitTitle": "History Split",
"historySplitDesc": "Pack earlier turns into an attached HISTORY.txt so the model reads the file first and then continues from the latest user request.",
"historySplitEnabled": "Enable history split",
"historySplitEnabledDesc": "Enabled by default. Turning this off falls back to normal full-context requests.",
"historySplitTriggerAfterTurns": "Trigger threshold (user turns)",
"historySplitTriggerHelp": "Default is 1, which means history split starts from the second turn.",
"compatibilityTitle": "Compatibility",
"compatibilityDesc": "Compatibility controls that keep stream output closer to the wire format or safer for the web UI.",
"stripReferenceMarkers": "Strip [reference:N] markers",

View File

@@ -379,6 +379,12 @@
"behaviorTitle": "行为设置",
"responsesTTL": "Responses 缓存 TTL",
"embeddingsProvider": "Embeddings Provider",
"historySplitTitle": "历史拆分",
"historySplitDesc": "将更早的对话整理成 HISTORY.txt 上传,让模型优先读取历史文件,再结合最新一轮继续回答。",
"historySplitEnabled": "启用历史拆分",
"historySplitEnabledDesc": "默认开启。关闭后会恢复为普通的完整上下文提交。",
"historySplitTriggerAfterTurns": "触发阈值(用户回合数)",
"historySplitTriggerHelp": "默认值为 1表示从第二轮开始拆分历史。",
"compatibilityTitle": "兼容性设置",
"compatibilityDesc": "用于控制输出格式兼容性,避免把模型原始流里的标记直接暴露到前端。",
"stripReferenceMarkers": "移除 [reference:N] 标记",