fix(config): 适配 kimi-code 0.39.1——thinking keep 写字符串 off(布尔会整节作废)、存量布尔归一化;loop_control 默认只写 v2 键(legacy flag 才双写);effort 移除 max 档;实验 flags 补 remote-control、wait_for/minidb 标默认开启

This commit is contained in:
KimiSwitch Dev committed 2026-08-29 11:13:58 +08:00
1 parent 7435198fcc
commit 45ec073e6f
10 files changed
+306 -29

No files matched your search

+9 -6
View File
@@ -1293,21 +1293,24 @@ pub async fn kimi_oauth_poll(
// Experimental feature env-var probe (Kimi Code secondary model etc.)
// ---------------------------------------------------------------------------
/// Read the Kimi Code experimental-feature environment variables that are
/// currently set (non-empty) in this process's environment. The frontend
/// uses the result to mark config.toml `[experimental]` toggles as locked:
/// env vars outrank the config file in Kimi Code's flag resolution.
/// Read the Kimi Code environment variables that are currently set (non-empty)
/// in this process's environment. The experimental-feature vars are used by the
/// frontend to mark config.toml `[experimental]` toggles as locked: env vars
/// outrank the config file in Kimi Code's flag resolution. `KIMI_CODE_LEGACY_FLAG`
/// is probed too — the AgentSettingsPanel uses it to decide whether to
/// dual-write the v1 engine's loop_control keys.
///
/// Truthy values per the CLI: `1` / `true` / `yes` / `on` (case-insensitive);
/// the raw values are returned and the truthy check happens on the frontend.
#[tauri::command]
pub fn get_experimental_env_status() -> HashMap<String, String> {
const VARS: [&str; 5] = [
const VARS: [&str; 6] = [
"KIMI_CODE_EXPERIMENTAL_FLAG",
"KIMI_CODE_EXPERIMENTAL_SECONDARY_MODEL",
"KIMI_CODE_EXPERIMENTAL_TOOL_SELECT",
"KIMI_CODE_EXPERIMENTAL_ACP_V2",
"KIMI_CODE_EXPERIMENTAL_PERSISTENCE_MINIDB_READMODEL",
"KIMI_CODE_EXPERIMENTAL_REMOTE_CONTROL",
"KIMI_CODE_LEGACY_FLAG",
];
let mut out = HashMap::new();
for name in VARS {