feat: default smart reasoning and robust channel delivery #16

Merged
zheromiku merged 6 commits from feat/default-reasoning-mode into main 2026-09-15 17:13:33 +08:00
Owner

Included behavior

  • Configurable default smart reasoning with user /think on|off preference persistence
  • Agent-chat Accept-Language propagation
  • Wide DingTalk tables normalize to grouped lists only at final delivery
  • Coverage v5: references take precedence over partial no-answer wording
  • Strip leaked internal [dN]/[cN]/[wN] source handles from DingTalk display

Database

  • Adds migration 000022: reasoning_mode_states.user_selected.

Verification

  • go test ./... passed on the test server
  • Test DingTalk/WeKnora end-to-end acceptance completed

Boundaries

  • Production deployment is a separate approved step after merge; historical coverage decisions are not re-evaluated.
## Included behavior - Configurable default smart reasoning with user /think on|off preference persistence - Agent-chat Accept-Language propagation - Wide DingTalk tables normalize to grouped lists only at final delivery - Coverage v5: references take precedence over partial no-answer wording - Strip leaked internal [dN]/[cN]/[wN] source handles from DingTalk display ## Database - Adds migration 000022: reasoning_mode_states.user_selected. ## Verification - go test ./... passed on the test server - Test DingTalk/WeKnora end-to-end acceptance completed ## Boundaries - Production deployment is a separate approved step after merge; historical coverage decisions are not re-evaluated.
zheromiku added 6 commits 2026-09-15 17:12:49 +08:00
WeKnora's system prompt hard-enforces 'ALWAYS respond in {{language}}',
fed by its Language middleware (WEKNORA_LANGUAGE env -> Accept-Language
header -> zh-CN fallback). The previous localizedQuery() prompt prefix
lost against that instruction, so a user-set 'en' preference still got
Chinese answers on English questions.

- AgentChatRequest.Locale is transmitted as the Accept-Language header
  (never in the JSON body); WeKnora maps it to the prompt language
- 'auto' detects the query script client-side (latin->en, Han->zh-CN,
  kana->ja, Hangul->ko); es is never auto-guessed
- unset/unknown locale sends no header, preserving prior server behavior
- drop localizedQuery prompt prefixes entirely
zheromiku merged commit ba090d1705 into main 2026-09-15 17:13:33 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Weknora/dobotai-platform#16