Skip to content

Conversation

@chaitanyarahalkar
Copy link
Contributor

@chaitanyarahalkar chaitanyarahalkar commented Jun 13, 2025

Summary

Many open weight models support to reveal the CoT process (while many of the providers hide it in the API). This PR adds a collapsible “Show thinking” panel that surfaces the assistant’s Chain-of-Thought (anything wrapped in <think> … </think>) above every assistant message, while keeping the final answer unchanged.

UI Preview

cot_2x.mov

Key Changes

  1. ui/desktop/src/components/GooseMessage.tsx
    • Parses message text for <think> blocks.
    • Stores the visible reply and CoT separately.
    • Renders a <details> element at the top of the message:
    summary → “Show thinking”, body → rendered Markdown of the CoT.
    • Leaves existing timestamp, copy-link, images, tool-call handling untouched.
  2. Cosmetic Changes
    • Mirrors UX patterns of other AI chat apps that transparently expose the model’s reasoning without cluttering the main conversation.
    • Keeps the default view concise; CoT is opt-in via a single click.
    • No back-end or protocol changes required—pure front-end enhancement.

Testing

  • Tested with Qwen 3 which is a thinking model that shares its CoT with the tag. Many other open weight CoT models like DeepSeek R1 also use the tag.

@michaelneale
Copy link
Collaborator

oh thanks - I like the look of this a lot, seems a good change - for non thinking ones I guess won't show think section?

@zanesq zanesq merged commit 3930b31 into block:main Jun 18, 2025
6 checks passed
lifeizhou-ap added a commit that referenced this pull request Jun 20, 2025
* main:
  Blog: Add video to container use blog (#3008)
  Use official logo in Goose web (#3012)
  fix shims for extensions on windows (#3009)
  fix powershell executions (#3006)
  Docs linux desktop (#3007)
  Platform Tool for Scheduler: Allow Goose to Manage Its Own Schedule (#2944)
  docs: container use blog and guide (#2962)
  Fix: Workflow syntax (#3002)
  Added just lint-ui for linting front end code (#2997)
  fix typo in secret name (#2994)
  feat(ui): add chain-of-thought panel above assistant messages (#2899)
  feat(cli): Add `--quiet /-q` flag to goose run (#2939)
  Feat: Recipe Library (#2946)
  Docs: Goose on Windows Installation (#2990)
  Fixes : Workflow error on issue comment (#2958)
  Add a setting for the quit confirmation dialog (#2901)
  Update bundle-desktop-windows.yml (#2988)
  feat: optional fast edit models (#2580)
  feat: Add lead-worker model selection and real-time model display in GUI (#2964)
laanak08 added a commit that referenced this pull request Jun 24, 2025
# By Max Novich (4) and others
# Via Alice Hau
* ahau/tool-strategy:
  updated computercontroller and developer descriptions
  add additional strats to test
  Blog: Add video to container use blog (#3008)
  Use official logo in Goose web (#3012)
  fix shims for extensions on windows (#3009)
  fix powershell executions (#3006)
  Docs linux desktop (#3007)
  Platform Tool for Scheduler: Allow Goose to Manage Its Own Schedule (#2944)
  docs: container use blog and guide (#2962)
  Fix: Workflow syntax (#3002)
  Added just lint-ui for linting front end code (#2997)
  fix typo in secret name (#2994)
  feat(ui): add chain-of-thought panel above assistant messages (#2899)
  feat(cli): Add `--quiet /-q` flag to goose run (#2939)
  Feat: Recipe Library (#2946)
  Docs: Goose on Windows Installation (#2990)
  Fixes : Workflow error on issue comment (#2958)
  Add a setting for the quit confirmation dialog (#2901)
  Update bundle-desktop-windows.yml (#2988)

# Conflicts:
#	Cargo.lock
btdeviant pushed a commit to btdeviant/goose that referenced this pull request Jun 25, 2025
s-soroosh pushed a commit to s-soroosh/goose that referenced this pull request Jul 18, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

3 participants