DeepSeek-Reasonix icon indicating copy to clipboard operation
DeepSeek-Reasonix copied to clipboard

fix(desktop): honor language setting for replies

Open GTC2080 opened this issue 5 months ago • 0 comments

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=1
  • cd desktop && go test . -count=1
  • go test ./...
  • cd desktop && go test ./...
  • cd desktop/frontend && corepack pnpm run typecheck
  • cd desktop/frontend && corepack pnpm run test:typecheck
  • cd desktop/frontend && corepack pnpm run test:all
  • cd desktop/frontend && corepack pnpm run build
  • go 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.

GTC2080 avatar Jun 23 '26 10:06 GTC2080