Skip to content

Conversation

@sudo-tee
Copy link
Owner

This PR add reasoning output to the panel.

It cols be toggled with /reasoning or /thinking, Opencode toggle_reasoning_output or <leader>otr

This should resolve #138

This PR add reasoning output to the panel.

It cols be toggled with `/reasoning` or `/thinking`, `Opencode
toggle_reasoning_output ` or `<leader>otr`

This should resolve #138
@sudo-tee sudo-tee requested a review from Copilot December 22, 2025 14:29
@sudo-tee sudo-tee mentioned this pull request Dec 22, 2025
@sudo-tee sudo-tee marked this pull request as ready for review December 22, 2025 14:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for displaying reasoning/thinking output from AI models in the output panel. Users can toggle the visibility of reasoning output using slash commands (/reasoning or /thinking), the Vim command :Opencode toggle_reasoning_output, or the keymap <leader>otr.

Key Changes:

  • Added reasoning output formatting with timestamps and visual styling
  • Implemented toggle functionality for showing/hiding reasoning output
  • Added configuration option show_reasoning_output (default: true)

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/data/reasoning.json Test data containing sample reasoning message parts with timestamps
tests/data/reasoning.expected.json Expected formatted output for reasoning test data
lua/opencode/ui/icons.lua Added 'reasoning' icon (󰧑) for display in output
lua/opencode/ui/highlight.lua Added 'OpencodeReasoningText' highlight group for reasoning output styling
lua/opencode/ui/formatter.lua Implemented _format_reasoning() function to format and display reasoning parts with timestamps and borders; updated _format_action() and _add_vertical_border() signatures
lua/opencode/types.lua Added 'reasoning' to message part types and time field to OpencodeMessagePart
lua/opencode/config.lua Added show_reasoning_output config option and keymaps for toggling reasoning/tool output
lua/opencode/api.lua Implemented toggle_reasoning_output() function and added slash commands /reasoning and /thinking
README.md Documented new keymaps, configuration options, and commands for reasoning output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

sudo-tee and others added 4 commits December 22, 2025 09:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sudo-tee sudo-tee merged commit db91a85 into main Dec 22, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Viewing thinking output

2 participants