Skip to content

未适配中文输入法 #2323

Open
Open

Description

@cmdcorp6534

Description

在使用中文输入法时,会造成多种问题。目前我遇到的有:

  1. 在使用中文输入法输入拼音时不会隐藏提示“编写任务或使用 /。”
Image
  1. 在有窗口时,例如在配置界面或者是危险操作确认界面,输入的字母会变成拼音在模型输入或斜杠命令输入区显示。
Image Image

Steps to reproduce

  1. 在提示词或斜杠命令输入区使用中文输入法。
  2. 在配置界面或危险操作确认界面等有窗口的界面使用中文输入法。

Expected behavior

  1. 在使用中文输入法输入提示词时应该在输入拼音时隐藏“编写任务或使用 /。”.
  2. 在配置界面或危险操作确认界面等有窗口的界面使用中文输入法时应该将拼音自动替换为普通英文字母输入。

Actual behavior

在 Description 中已经详细描述。

Impact

对正常使用影响不大,但有时会影响操作速度,或者使界面不美观。

Environment

  • OS: Windows 11
  • codewhale version: codewhale 0.8.47 (7074399)
  • Install method: 在 GitHub Release 中下载 codewhale-windows-x64.zip ,然后运行 install.bat
  • codewhale doctor summary: 见下方。
  • Model/provider: DeepSeek
  • Terminal app: Windows Terminal
  • Shell: Windows cmd

CodeWhale Doctor Summary

Version Information:
codewhale-tui: 0.8.47 (7074399)
rust: unknown

Configuration:
✓ config.toml found at ~.codewhale\config.toml
workspace: ~
search_provider: duckduckgo (source: default; set [search] provider = "bing" | "tavily" | "bocha" to switch)

State Root:
active: ~.codewhale
dual roots: ~.codewhale (primary) + ~.deepseek (legacy)

API Keys:
✓ deepseek: env=no, config=yes
· nvidia-nim: env=no, config=no
· openai: env=no, config=no
· atlascloud: env=no, config=no
· wanjie-ark: env=no, config=no
· openrouter: env=no, config=no
· novita: env=no, config=no
· fireworks: env=no, config=no
· moonshot: env=no, config=no
· sglang: env=no, config=no
· vllm: env=no, config=no
· ollama: env=no, config=no
· xiaomi: env=no, config=no
· credential precedence: ~/.deepseek/config.toml, OS keyring, then env
✓ active provider key resolved from config.toml

API Connectivity:
· provider: deepseek
· base_url: https://api.deepseek.com/beta
· model: deepseek-v4-pro
· strict_tool_mode: disabled
✓ API connection successful

MCP Servers:
✓ MCP feature flag enabled
· MCP config not found at ~.deepseek\mcp.json
Run codewhale mcp init or codewhale setup --mcp.

Skills:
· local skills dir not found at ~\skills
· .agents skills dir not found at ~.agents\skills
· global .agents skills dir not found at ~.agents\skills
✓ global skills dir found at ~.codewhale\skills (12 items)
· selected skills dir: ~.codewhale\skills

Tools:
· tools dir not found at ~.codewhale\tools
Run codewhale setup --tools to scaffold a starter dir.

Plugins:
· plugins dir not found at ~.codewhale\plugins
Run codewhale setup --plugins to scaffold a starter dir.

Storage:
· tool-output spillover dir not yet created at ~.deepseek\tool_outputs
· composer stash empty (Ctrl+S in the composer to park a draft)

Tool Dependencies:
✓ Python: python → code_execution tool registered
✗ Node.js: not found (tried node)
js_execution tool is NOT advertised to the model on this install.
Install Node 18+ and ensure node is on PATH:
winget install OpenJS.NodeJS (or download from nodejs.org)
· pandoc: not found (optional)
pandoc_convert tool is NOT advertised to the model. Install pandoc to enable:
winget install JohnMacFarlane.Pandoc
· tesseract: not found (optional)
image_ocr tool is NOT advertised to the model. Install tesseract to enable:
winget install UB-Mannheim.TesseractOCR
· pdftotext: not found (optional — pure-Rust extractor is the default in v0.8.32)
Install Poppler only if you want to opt into pdftotext for column-heavy PDFs.

Terminal Quirks:
· no env-driven terminal-quirk overrides active

Platform:
OS: windows
Arch: x86_64
! sandbox not available (commands run best-effort)

All checks complete!

Activity

  1. VerrPower commented on May 28, 2026

    @VerrPower

    我试过了 不止dstui,codex也会出现跟你描述的一样的问题
    这应该跟tui没有关系 是中文输入法软件本身和底层适配的问题 hunter估计没法改这个

    Image
  2. Aerytgophilis commented on May 30, 2026

    @Aerytgophilis

    楼上的朋友说得很有道理;个人建议:在需要输入指令时按一下shift,输入完了再按一下切回来

  3. modified the milestones: v0.8.59, v0.8.64 on Jun 12, 2026
  4. modified the milestones: v0.8.64, v0.8.71 on Jun 13, 2026
  5. modified the milestones: v0.9.3, v0.9.5 on Aug 3, 2026
  6. 7 remaining items

  7. added this to the v0.9.10 milestone on Aug 14, 2026
  8. ShikiSuen commented on Sep 5, 2026

    @ShikiSuen

    Looks like either Windows or the terminal app (you two guys are using) now protects the inline preedit data from being proactively accessed by the client app which retrieves your text input.

    It's a good design for user privacy, still.

  9. modified the milestones: v0.9.10, v1.0 on Sep 14, 2026
  10. modified the milestones: v1.0, v0.11 on Sep 23, 2026
  11. added
    localizationLocalization, i18n, and non-English language support
    tuiTerminal UI behavior, rendering, or interaction
    windowsWindows-specific behaviour
    and removed
    enhancementNew feature or request
    on Oct 8, 2026
  12. modified the milestones: v0.11, Backlog on Oct 8, 2026
  13. Hmbown commented on Oct 13, 2026

    @Hmbown
    Collaborator

    谢谢 @cmdcorp6534 把“拼音组合过程中的占位提示”和“弹窗下面的输入泄漏”分开描述,也谢谢 @VerrPower 的跨应用对比、@Aerytgophilis 的临时输入法切换建议,以及 @ShikiSuen 对 preedit(尚未提交的组合文字)边界的分析。这些信息帮助我们避免把两个问题当成同一个问题。

    我在输入路由里找到了一个属于 Codewhale 的漏洞:历史搜索开启后,如果上面出现弹窗,带括号粘贴仍会修改被遮住的搜索内容。f9210a4428 已修复这个路径,包含在 0.10.2 候选 PR #6968 中,尚未发布。已有的按键路由会把输入交给弹窗,已有的光标保护也会在弹窗覆盖输入框时隐藏光标;这次补上了历史搜索的粘贴路径。

    验证范围:macOS 上 81 个相关 Rust 测试通过、0 失败,其中包含中文粘贴/按键和弹窗保护;还没有 Windows Terminal 的真实输入法验证。当前终端输入路径拿不到尚未提交的拼音 preedit,因此这次不承诺让占位文字在拼音组合开始时就消失,也不声称已解决所有 IME 显示问题。若方便,请用候选版本复测配置/确认弹窗,并注明 Windows Terminal、输入法和版本,以及泄漏的是尚未提交的拼音还是已提交文字;本问题保持开放。

    English: thank you for separating preedit display from input escaping a modal. The candidate fixes a concrete Codewhale routing bug: bracketed paste could change hidden history-search text beneath a modal. Existing key routing and covered-composer caret guards remain in place. The focused macOS checks passed (81 passed, 0 failed), but native Windows IME behavior is still unverified. Our current terminal input path does not expose uncommitted preedit, so the placeholder issue is not claimed fixed. A Windows Terminal retest that distinguishes preedit from committed characters would help confirm what remains.

  14. Hmbown commented on Oct 13, 2026

    @Hmbown
    Collaborator

    补充 Windows 实测结果:我们已在 Windows 11 ARM64、Windows Terminal 1.24.12741.0 和微软拼音下运行 0.10.2 候选版 cf7199b52e。在 /config 中输入 zhongwen 后按空格,中文 正确进入设置搜索框;关闭窗口后,主输入框仍为空。在普通文件写入确认界面中,拼音提交既没有自动批准操作,也没有进入主输入框。

    输入法的预编辑文字/候选框仍显示在终端上一次隐藏光标的位置。这个显示问题还没有解决;终端没有把预编辑状态作为普通文字事件交给应用,所以也不能宣称已解决“正在拼音输入时占位文字仍显示”。f9210a4428 修的是我们确认存在的另一条路由问题:弹窗打开时,粘贴事件不能再修改后台的历史搜索。上述实测不涵盖所有危险操作窗口,欢迎继续提供具体触发步骤。

    感谢 @cmdcorp6534 的原始报告,也感谢 @VerrPower 的其他应用对比、@Aerytgophilis 的 Shift 线索以及 @ShikiSuen 对预编辑行为的分析,帮助我们把显示问题与真正的输入泄漏区分开。0.10.2 尚未发布,本问题保持打开。

    English: Native candidate testing now confirms that committed Pinyin text goes into the config filter, leaves the composer empty, and neither answers an ordinary write approval nor leaks into the composer. The OS preedit popup still anchors at the terminal's previous hidden cursor position; that visual issue and placeholder behavior remain unresolved. The carrying fix f9210a4428 specifically blocks modal paste from mutating hidden history search. We have not qualified every dangerous-action modal. Thank you all for helping distinguish preedit display from committed-input routing; 0.10.2 is still unreleased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglocalizationLocalization, i18n, and non-English language supporttuiTerminal UI behavior, rendering, or interactionwindowsWindows-specific behaviour

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions