Conversation
Adds a client-side /thinking slash command to the opencode web app that toggles the showReasoningSummaries setting, controlling whether the model's reasoning is surfaced in the timeline. Mirrors the TUI's /thinking command; it is NOT a server command, so the prompt-input submit path also intercepts "/thinking". Supports an optional "on"/"off" argument to force a state, and persists across sessions via the settings store. - Register the command under the existing "Session" category in use-composer-commands (matching the TUI's category) - Intercept "/thinking" (with optional on/off arg) in createPromptSubmit - Add i18n strings for the command + on/off toasts across all locales Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
6 tasks
4ebuRushka
added a commit
to 4ebuRushka/opencode
that referenced
this pull request
Sep 8, 2026
Add collapsibleReasoning setting (default true) with persisted store, i18n (62 locales) and UI toggles in both settings-general variants. Render reasoning parts as collapsible cards in the style of tool calls (brain icon, 80-char subtitle, TextShimmer only on active block, max-height:320px scrollable body, copy button). Each reasoning part is its own card with open/userInteracted state. - Auto-collapse previous blocks in a chain: isLastPart via data.store.part[message.id].at(-1) — previous collapses immediately when next reasoning part appears, not at end of chain. Shimmer and PacedMarkdown streaming only on active (streaming && isLastPart). - Auto-scroll inside card: scrollRef/innerRef signals, autoFollow flag (pause >40px from bottom, resume at bottom), ResizeObserver + MutationObserver + continuous RAF tick while open && streaming && autoFollow — keeps tail visible during PacedMarkdown pacing and large gaps. - Wire collapsibleReasoning through MessagePartProps -> Part -> message-timeline (settings.general.collapsibleReasoning()). Complements anomalyco#45247 (/thinking toggle). Closes anomalyco#8789, anomalyco#14340, anomalyco#37115, anomalyco#21548, partially anomalyco#28322. Refs anomalyco#7866, anomalyco#33906. Co-authored-by: 4ebuRushka
6 tasks
4ebuRushka
added a commit
to 4ebuRushka/opencode
that referenced
this pull request
Sep 17, 2026
Add collapsibleReasoning setting (default true) with persisted store, i18n (62 locales) and UI toggles in both settings-general variants. Render reasoning parts as collapsible cards in the style of tool calls (brain icon, 80-char subtitle, TextShimmer only on active block, max-height:320px scrollable body, copy button). Each reasoning part is its own card with open/userInteracted state. - Auto-collapse previous blocks in a chain: isLastPart via data.store.part[message.id].at(-1) — previous collapses immediately when next reasoning part appears, not at end of chain. Shimmer and PacedMarkdown streaming only on active (streaming && isLastPart). - Auto-scroll inside card: scrollRef/innerRef signals, autoFollow flag (pause >40px from bottom, resume at bottom), ResizeObserver + MutationObserver + continuous RAF tick while open && streaming && autoFollow — keeps tail visible during PacedMarkdown pacing and large gaps. - Wire collapsibleReasoning through MessagePartProps -> Part -> message-timeline (settings.general.collapsibleReasoning()). Complements anomalyco#45247 (/thinking toggle). Closes anomalyco#8789, anomalyco#14340, anomalyco#37115, anomalyco#21548, partially anomalyco#28322. Refs anomalyco#7866, anomalyco#33906. Co-authored-by: 4ebuRushka
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.
Adds a client-side /thinking slash command to the opencode web app that toggles the showReasoningSummaries setting, controlling whether the model's reasoning is surfaced in the timeline. Mirrors the TUI's /thinking command; it is NOT a server command, so the prompt-input submit path also intercepts "/thinking". Supports an optional "on"/"off" argument to force a state, and persists across sessions via the settings store.
Issue for this PR
Closes #44809
Type of change
What does this PR do?
Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
Manually tested to see that this is working
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.