Conversation
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.
Summary
/thinkingand/thinking <level>were listed in autocomplete and/helpbut had no branch in the interactive submit handler, so the text fell through tosession.prompt()and reached the model as an ordinary user message (queued as a steering message while a reply was streaming).Upstream 496185f added the
thinkingentry toBUILTIN_SLASH_COMMANDStogether with its dispatch; the sync merge 4632790 (#1119) kept the entry and dropped the dispatch. This restores it:setupEditorSubmitHandler:/thinkingopens the level selector,/thinking <level>sets the level (case-insensitive; unknown levels report the available ones).createBaseAutocompleteProvider: argument completions forthinkingfromsession.getAvailableThinkingLevels().handleThinkingCommand/selectThinkingLevel/showThinkingSelectorfrom upstream, with upstream'ssetThinkingLevel(level, { persist })mapped onto the fork's split setters:/thinking <level>and Enter in the selector usesetSessionThinkingLevel(session scope), Ctrl+S usessetThinkingLevel, which records the per-model remembered level (modelThinkingLevels) exactly like the/settingsthinking row. Ctrl+S does not write the globaldefaultThinkingLevel; per-model memory is what startup consults first (feat(coding-agent): per-model reasoning memory, /reasoning + /efforts commands, persistent /fast #894).getAvailableThinkingLevels()is awaited at every new call site becauseInteractiveSessionwidens it for the shared-host proxy.docs/settings.mdanddocs/usage.mdstill described Ctrl+S as saving the global startup default (wording carried over from upstream); they now describe the per-model memory and thedefaultThinkingLevelfallback./reasoning,/efforts, and Shift+Tab are untouched.Fixes #1437
Verification
test/suite/regressions/1437-thinking-command-dispatch.test.ts: submit-handler routing (/thinking high→ handler, neversession.prompt; bare/thinking→ selector;/thinking-…not matched) and handler behavior (session-scoped apply, case-insensitive match against a Promise-returning level list, unknown-level error text, selector path, Ctrl+S persist path).bun run --cwd packages/coding-agent test test/suite/regressions/1437-thinking-command-dispatch.test.ts test/interactive-mode-exit-command.test.ts test/interactive-mode-status.test.ts test/suite/reasoning-commands.test.ts— 4 files, 94 tests passed.bun run check— passed./thinking high: user message sent to the model → no request, statusThinking level: high, footermock-model:high/thinking lowwhile a reply streams: appended to the next request → applied immediately, no extra request/thinking turbo: sent to the model →Unknown thinking level "turbo". Available levels: off, minimal, low, medium, high./thinking: sent to the model → thinking-level selector (Enter to select · Ctrl+S to set as default · Esc to cancel)/efforts high,/reasoning, Shift+Tab: unchangedTracker
packages/coding-agent/src/modes/interactive/changes.md: entry "Restore the /thinking interactive dispatch (/thinkingis listed in autocomplete and /help but is sent to the model as a user message #1437)" with the split-setter mapping and the expected conflict zones (upstream carries the same methods with the{ persist }option).packages/coding-agent/CHANGELOG.md:[Unreleased] > Fixedentry.Summary by cubic
Restores interactive
/thinkingdispatch for #1437:/thinkingnow opens the selector and/thinking <level>changes the session level instead of sending the command to the model as user text. Ctrl+S in the selector remembers the level for the current model, whiledefaultThinkingLevelremains the fallback.Written for commit fbd4406. Summary will update on new commits.