强制启用文件拆分(实际模型忽略)

This commit is contained in:
CJACK
2026-04-26 07:31:19 +08:00
parent abc96a37d8
commit 4c83f36089
15 changed files with 48 additions and 39 deletions

View File

@@ -9,15 +9,10 @@ export default function HistorySplitSection({ t, form, setForm }) {
<label className="flex items-start gap-3 rounded-lg border border-border bg-background/60 p-4">
<input
type="checkbox"
checked={Boolean(form.history_split?.enabled ?? true)}
onChange={(e) => setForm((prev) => ({
...prev,
history_split: {
...prev.history_split,
enabled: e.target.checked,
},
}))}
className="mt-1 h-4 w-4 rounded border-border"
checked
disabled
readOnly
className="mt-1 h-4 w-4 rounded border-border disabled:opacity-70"
/>
<div className="space-y-1">
<span className="text-sm font-medium block">{t('settings.historySplitEnabled')}</span>

View File

@@ -71,7 +71,7 @@ function fromServerForm(data) {
mode: normalizeAutoDeleteMode(data.auto_delete),
},
history_split: {
enabled: data.history_split?.enabled ?? true,
enabled: true,
trigger_after_turns: Number(data.history_split?.trigger_after_turns || 1),
},
model_aliases_text: JSON.stringify(data.model_aliases || {}, null, 2),
@@ -94,7 +94,7 @@ function toServerPayload(form) {
embeddings: { provider: String(form.embeddings.provider || '').trim() },
auto_delete: { mode: normalizeAutoDeleteMode(form.auto_delete) },
history_split: {
enabled: Boolean(form.history_split?.enabled ?? true),
enabled: true,
trigger_after_turns: Number(form.history_split?.trigger_after_turns || 1),
},
}

View File

@@ -375,8 +375,8 @@
"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.",
"historySplitEnabled": "History split is forced on",
"historySplitEnabledDesc": "This capability is now enabled globally; legacy disabled values are ignored.",
"historySplitTriggerAfterTurns": "Trigger threshold (user turns)",
"historySplitTriggerHelp": "Default is 1, which means history split starts from the second turn.",
"compatibilityTitle": "Compatibility",

View File

@@ -375,8 +375,8 @@
"embeddingsProvider": "Embeddings Provider",
"historySplitTitle": "历史拆分",
"historySplitDesc": "将更早的对话整理成 HISTORY.txt 上传,让模型优先读取历史文件,再结合最新一轮继续回答。",
"historySplitEnabled": "启用历史拆分",
"historySplitEnabledDesc": "默认开启。关闭后会恢复为普通的完整上下文提交。",
"historySplitEnabled": "历史拆分已强制启用",
"historySplitEnabledDesc": "该能力现在全局开启;旧配置里的关闭值会被忽略。",
"historySplitTriggerAfterTurns": "触发阈值(用户回合数)",
"historySplitTriggerHelp": "默认值为 1表示从第二轮开始拆分历史。",
"compatibilityTitle": "兼容性设置",