DeepSeek-Reasonix
DeepSeek-Reasonix copied to clipboard
fix(desktop): honor language setting for replies
Summary
- Fixes #5159 by making the desktop Language setting also persist the model response-language preference.
- Carries
language = "en"|"zh"into model turns through a small transient<response-language>block, so the cache-stable system prompt and tool schemas stay unchanged. - Keeps Thinking language scoped to visible reasoning only, strips transient language blocks from history previews, and documents the updated Language setting behavior.
Verification
go test ./internal/agent ./internal/control ./internal/boot ./internal/config -count=1cd desktop && go test . -count=1go test ./...cd desktop && go test ./...cd desktop/frontend && corepack pnpm run typecheckcd desktop/frontend && corepack pnpm run test:typecheckcd desktop/frontend && corepack pnpm run test:allcd desktop/frontend && corepack pnpm run buildgo vet ./...cd desktop && go vet ./...git diff --check && gofmt -l .
Cache impact
Cache-impact: low — explicit response-language preferences add a small transient user-turn block; cache-stable system prompt, memory prefix, tool schemas, tool ordering, request serialization, compaction, and MCP/tool registration are unchanged. Cache-guard: go test ./internal/boot -run TestBuildUsesConfiguredLanguageForResponsePreference -count=1 plus go test ./internal/agent -run TestPreviewSessionStripsTransientResponseLanguageBlock -count=1 cover transient injection and preview stripping. System-prompt-review: not required because this does not change the system prompt, memory prefix, output style, or skill index; the new language preference rides user-turn context.