What happened?
Describe the bug
The command-line interface (CLI) does not correctly handle the composition process of Chinese Pinyin Input Method Editors (IMEs). When a user types a pinyin string (e.g.,
"nihao") and then presses the spacebar to select the Chinese characters, the input is processed incorrectly, leaving only the last letter of the pinyin string in the input field
instead of the composed Chinese characters.
To Reproduce
Steps to reproduce the behavior:
- Switch the operating system's input method to a Chinese Pinyin IME.
- Focus the Gemini CLI input prompt.
- Type a pinyin string, for example, nihao.
- Press the Spacebar key to confirm the IME composition.
What did you expect to happen?
Expected behavior
The pinyin string nihao should be replaced by the corresponding Chinese characters 你好 in the input field.
Actual behavior
The input field displays only the last character of the pinyin string, which is o.
Client information
Details
Desktop:
Additional context
This issue makes it impossible to type Chinese directly into the CLI, forcing users to type in another application and then copy-paste the text. This significantly hinders the
user experience for Chinese-speaking users.
$ gemini /about
2.5 pro
</details>
### Login information
_No response_
### Anything else we need to know?
_No response_
What happened?
Describe the bug
The command-line interface (CLI) does not correctly handle the composition process of Chinese Pinyin Input Method Editors (IMEs). When a user types a pinyin string (e.g.,
"nihao") and then presses the spacebar to select the Chinese characters, the input is processed incorrectly, leaving only the last letter of the pinyin string in the input field
instead of the composed Chinese characters.
To Reproduce
Steps to reproduce the behavior:
What did you expect to happen?
Expected behavior
The pinyin string nihao should be replaced by the corresponding Chinese characters 你好 in the input field.
Actual behavior
The input field displays only the last character of the pinyin string, which is o.
Client information
Details
Desktop:
Additional context
This issue makes it impossible to type Chinese directly into the CLI, forcing users to type in another application and then copy-paste the text. This significantly hinders the
user experience for Chinese-speaking users.
$ gemini /about
2.5 pro