chore(release): bump to v0.7.2 — 高级设置 + WebUI 快捷入口 + loop_control 兼容 + macOS 安装脚本
Release / Attach macOS install script (push) Canceled after 0s
Release / Version consistency (push) Canceled after 0s
Release / Build (macos-latest) (push) Canceled after 0s
Release / Build (ubuntu-latest) (push) Canceled after 0s
Release / Build (windows-latest) (push) Canceled after 0s

This commit is contained in:
KimiSwitch Dev committed 2026-08-07 10:21:47 +08:00
1 parent 24d37fbbf4
commit fc09a29b9f
21 files changed
+492 -230

No files matched your search

+19 -5
View File
@@ -7,7 +7,7 @@ const DEFAULT_SETTINGS: AgentSettings = {
keep: "all",
},
loop_control: {
max_retries_per_step: 3,
max_attempts_per_step: 3,
reserved_context_size: 50000,
},
background: {
@@ -32,15 +32,29 @@ function getSection<T>(rawOther: unknown, key: string): T | undefined {
}
export function getAgentSettings(rawOther: unknown): AgentSettings {
const sectionLoop = getSection<AgentSettings["loop_control"]>(
rawOther,
"loop_control"
);
const loop: AgentSettings["loop_control"] = {
...DEFAULT_SETTINGS.loop_control,
...sectionLoop,
};
// kimi-code 0.33+ (v2 engine) renamed max_retries_per_step →
// max_attempts_per_step; migrate legacy values so they still show and edit.
if (
sectionLoop &&
sectionLoop.max_attempts_per_step === undefined &&
sectionLoop.max_retries_per_step !== undefined
) {
loop.max_attempts_per_step = sectionLoop.max_retries_per_step;
}
return {
thinking: {
...DEFAULT_SETTINGS.thinking,
...getSection<AgentSettings["thinking"]>(rawOther, "thinking"),
},
loop_control: {
...DEFAULT_SETTINGS.loop_control,
...getSection<AgentSettings["loop_control"]>(rawOther, "loop_control"),
},
loop_control: loop,
background: {
...DEFAULT_SETTINGS.background,
...getSection<AgentSettings["background"]>(rawOther, "background"),