Repository navigation
日语界面的步骤用意被当成中文隐藏 → 含假名不算中文,照常显示 - #771
Merged
wangzan101 merged 2 commits intoNov 21, 2026
Merged
Conversation
wangzan101#765(v0.1.50) 同一提交里 languageDirective(ja) 要求模型用日语写用意, shouldHideRawReason 却对非中文界面凡含 U+4E00-9FA5 汉字的用意整条隐藏—— 日语几乎必含汉字,只有假名能区分日/中,日语用户因此几乎看不到步骤解释。 判别收紧为「含汉字且不含假名」;en 界面隐藏中文用意的原目的不变, 纯汉字无假名的残余局限如实记入 spec。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
现状
#765(v0.1.50)在同一个提交里加了两件互相抵消的事:
SystemPrompt.languageDirective(\"ja\")要求模型「すべての思考、進捗メモ、ツールの理由…は日本語で」——日语界面下步骤用意按指令用日语写;ChatViewModel.StepRow.shouldHideRawReason对非中文界面凡含 U+4E00–9FA5 汉字的用意整条隐藏、回退到本地化动作标题。日语书面语几乎每句都混汉字(検索、設定……),假名是唯一可靠的日/中字符级判别信号。结果:日语界面的用户几乎永远看不到模型的步骤解释——模型越守指令,丢得越干净。步骤行与收起态摘要两处显示入口(
StepRow.text)同时受影响。韩语(谚文不在汉字区间)与其他语言不受影响;中文界面恒显示,不受影响。改动
判别收紧为「含汉字且不含假名(U+3040–U+30FF)」,一行实现 + 注释;
残余局限如实保留:纯汉字无假名的日语短串(「設定確認」)仍无法与中文区分,维持隐藏——此类用意罕见且回退标题本身已本地化。
测试
StepRowLanguageTest新增 3 个场景(非中文界面日语不隐藏/纯汉字仍隐藏/中文界面日语照显),另加 ui_locale=ja 的StepRow.text端到端断言;./gradlew :core:test :core:cliTest :app:testDebugUnitTest全绿(cli 89 tests OK);python3 -m unittest discover -s tools/i18n(12 OK)与tools/i18n/translations.py check(3699 资源/12 语言)通过;规划与取证(openspec):
openspec/changes/fix-ja-step-reason-hidden/