MoonshotAI / MoonshotAI/kimi-cli
Feature Request: /thinking slash command and Ctrl+T shortcut to toggle thinking mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
Summary
Add a /thinking slash command (alias /t) and a Ctrl+T keyboard shortcut to toggle thinking mode on/off for the current model, without leaving the interactive session.
Motivation
Today, toggling thinking mode requires /model → select model → select thinking on/off → confirm. That's several keystrokes for a setting users may want to flip quickly between turns — e.g. switching from a complex task to a trivial follow-up.
A direct toggle would:
- Reduce friction for a frequent action
- Match the pattern of other in-session toggles (
Ctrl+Xfor shell/agent mode,Shift+Tabfor plan mode) - Reuse the existing
default_thinkingsave + reload mechanism already in place behind/model
Proposed UX
/thinking(canonical) or/t(alias): flip the current thinking state, save config, reload sessionCtrl+T: same behavior, bound in the prompt- The existing dot indicator (●/○) in the status bar already reflects the state — no new UI needed
- Add
ctrl-t: thinking modeto the rotating toolbar tips
Semantics match the existing /model flow: is_from_default_location guard, always_thinking / thinking capability checks, telemetry via track("thinking_toggle", enabled=...), and raise Reload(session_id=...).
Related work — PR #2158
PR #2158 proposes Ctrl+T for toggling visibility of thinking content (hide/show the streamed reasoning). It's a complementary feature, but it conflicts on the shortcut.
The two are semantically distinct:
| #2158 | This FR |
|---|---|
| Toggle visibility of thinking output | Toggle whether thinking is used at all |
| Display preference | Model capability switch |
| Affects rendering only | Affects default_thinking config + LLM behavior |
UX rationale for the shortcut split: a base-level capability toggle fits a base modifier (Ctrl+T); a display preference fits a compound modifier (Ctrl+Shift+T). This is consistent with patterns where view modifiers stack on top of base bindings.
That said, this is a maintainers' call. The implementation is the same either way — happy to defer to whatever the team decides.
Reference implementation
I built an external installer that monkey-patches ui/shell/slash.py and ui/shell/prompt.py to add this feature: https://github.com/yahiasalamanca/kimi-cli-thinking-command
Tested on Linux and Windows; macOS coverage by code paths (XDG + legacy ~/Library/Application Support + UV_TOOL_DIR). The patched code is ~50 lines and mirrors /model's flow — should map cleanly to a native implementation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing /model flow and inspect ui/shell/slash.py and ui/shell/prompt.py, as identified in the issue and reference implementation. Confirm the default_thinking reload, capability checks, telemetry, status indicator, and toolbar-tip behavior, then resolve the Ctrl+T interaction with PR #2158. Done means the command and shortcut toggle thinking within the session without leaving the documented state behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100