diff --git a/crates/tui/src/prompts.rs b/crates/tui/src/prompts.rs index f8711741..9b2b2ecc 100644 --- a/crates/tui/src/prompts.rs +++ b/crates/tui/src/prompts.rs @@ -608,7 +608,12 @@ mod tests { /// #588: language-mirroring directive must ship in every mode so /// DeepSeek's `reasoning_content` and final reply follow the user's - /// language. Structural test — wording is not a test concern. + /// language. Structural test — wording is not a test concern, but + /// the cross-cutting commitment of #588 is specifically that the + /// `reasoning_content` field tracks the user's language (not just + /// the visible reply); pin that anchor token so a future edit + /// can't silently weaken the section to a generic "respond in the + /// user's language" directive while keeping the heading. #[test] fn language_mirroring_section_present_in_all_modes() { for mode in [AppMode::Agent, AppMode::Yolo, AppMode::Plan] { @@ -617,6 +622,12 @@ mod tests { prompt.contains("## Language"), "## Language section missing from mode {mode:?}" ); + assert!( + prompt.contains("reasoning_content"), + "## Language section in {mode:?} must mention `reasoning_content` — \ + that field name is the structural anchor for the #588 commitment that \ + internal reasoning, not just the visible reply, follows the user's language" + ); } } diff --git a/crates/tui/src/prompts/base.md b/crates/tui/src/prompts/base.md index 2d5f246d..4be7db0e 100644 --- a/crates/tui/src/prompts/base.md +++ b/crates/tui/src/prompts/base.md @@ -4,7 +4,7 @@ You are DeepSeek TUI. You're already running inside it — don't try to launch a Detect the language the user writes in and respond in that same language — including your internal reasoning. If the user writes in Simplified Chinese (简体中文), your `reasoning_content` and final reply must both be in Simplified Chinese. If they switch languages mid-conversation, switch with them. The default when no clear signal is present is English. -Code, file paths, identifiers, tool names, and log lines stay in their original form — translating `read_file` to `读取文件` would break tool calls. Only natural-language prose mirrors the user. +Code, file paths, identifiers, tool names, environment variables, command-line flags, URLs, and log lines stay in their original form — translating `read_file` to `读取文件` would break tool calls. Only natural-language prose mirrors the user. ## Preamble Rhythm