CommandCodeAI / CommandCodeAI/command-code
IME candidate/preedit window stuck at bottom-left in WSL (Japanese/IME input)
還沒有人認領這個 Issue。
- 主要語言
- 沒有語言資料
- 星號
- 4k
- 分支
- 350
- PR 合併指標
- 30 天內沒有已合併 PR
描述
IME Bug Report: Japanese IME candidate window position stuck at bottom-left
Environment
- OS: Windows 11 + WSL2 (Ubuntu)
- IME: Microsoft IME (標準), Google 日本語入力
- Terminals tried:
- Windows Terminal
- WezTerm
- wsltty (Mintty via WSL)
- VS Code WSL Remote integrated terminal
- SSH (sshd inside WSL → connect from Windows terminal)
- All terminals reproduce the same issue
Current Behavior
When typing Japanese in Command Code's TUI, the IME candidate/preedit window always appears at the bottom-left corner of the terminal, regardless of where the actual cursor is. This makes Japanese input extremely difficult — you have to look at the bottom-left corner to see what you're typing while the actual text appears elsewhere.
Expected Behavior
The IME candidate window should appear near the text cursor position, as it does in normal terminal input (e.g., bash, vim, etc.).
Likely Cause
Since the issue reproduces across all terminal emulators and connection methods (local ConPTY, SSH bypassing ConPTY, Mintty), it's almost certainly not a terminal emulator issue. The root cause is likely in Command Code's TUI framework — specifically, it's probably not sending proper Cursor Position Report (CPR) responses via DSR (Device Status Report, \e[6n), or not responding to it at all. The terminal/ConPTY relies on CPR to tell the IME where to render the candidate window.
Steps to Reproduce
- Open Command Code in any WSL terminal
- Switch to Japanese IME (Microsoft IME or Google Japanese Input)
- Start typing — the preedit/candidate window will appear at the bottom-left corner of the TUI
- Moving the cursor or typing in different positions does not change the candidate window location
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Command Code 的 TUI 游標與輸入處理著手,重點關注對 DSR 序列 \e[6n 的 Cursor Position Report 回應。在列出的 WSL 終端中使用日文 IME 重現該問題,然後確認 candidate 或 preedit 視窗會跟隨文字游標,而不是停留在左下角。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- linux
- 領域
- cli, internationalization
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100