Skip to content

feat(tui): add custom tool and mcp call responses visible and collapsable#10649

Merged
rekram1-node merged 6 commits intoanomalyco:devfrom
yanosh-k:tui-custom-tools-and-mcps-output
Feb 19, 2026
Merged

feat(tui): add custom tool and mcp call responses visible and collapsable#10649
rekram1-node merged 6 commits intoanomalyco:devfrom
yanosh-k:tui-custom-tools-and-mcps-output

Conversation

@yanosh-k
Copy link
Contributor

What does this PR do?

Adds collapsible display for custom tool and MCP call responses in the TUI.

Fixes #6604

Before:

before.mp4

After:

after.mp4

How did you verify your code works?

After applying the update, I've build the app with bun packages/opencode/script/build.ts --single and tested the output of one custom tool and one mcp call, to check that it is displayed correctly and checked the generated log in .local/share/opencode/log for any errors.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@rekram1-node
Copy link
Collaborator

We may wanna play w/ the styling a bit, do you mind making this a togglable feature in the tui?

By default: old behavior

Ctrl+p -> palette -> expand tools (or some wording that implies it will expand the generic tools by default)

And this selection can be persisted to the kv.json file like others are

@yanosh-k
Copy link
Contributor Author

Hey, yeah, that sound reasonable.

I did a an updated implementation, but I wasn't sure if this need to go in a new sub-commands section called "Palette" or this is how you refer to the menu list (I'm not a native English speaker), so I've put it in the "Session" section. Also, naming things is not my strongest suit (feedback is welcomed on the "Show/Hide generic tool output").

I've recorded a video of the functionality and the persistence of the chosen state between runs:

output.mp4

@rserbitar
Copy link

Would be really useful to have this.

@rserbitar
Copy link

what needs to be done so that this can be reviewed and accepted?

@rekram1-node rekram1-node merged commit 824ab4c into anomalyco:dev Feb 19, 2026
8 checks passed
lacymorrow added a commit to lacymorrow/lash that referenced this pull request Feb 22, 2026
* upstream/dev: (476 commits)
  release: v1.2.9
  fix: issue from structuredClone addition by using unwrap (anomalyco#14359)
  tweak(ui): adjust session feed spacing
  tweak(ui): tone down reasoning emphasis
  tweak(ui): refine session feed spacing
  fix(desktop): restore settings header mask
  tweak(ui): nudge edited files chevron
  tweak(ui): stabilize collapsible chevron hover
  fix: add missing id/sessionID/messageID to MCP tool attachments (anomalyco#14345)
  Use structuredClone instead of remeda's clone (anomalyco#14351)
  remove unnecessary deep clones from session loop and LLM stream (anomalyco#14354)
  fix(web): correct config import path in Korean enterprise docs
  docs: update providers layout and Windows sidebar label
  core: remove User-Agent header assertion from LLM test to fix failing test
  release: v1.2.8
  fix(app): black screen on launch with sidecar server
  chore: generate
  feat(opencode): support adaptive thinking for claude sonnet 4.6 (anomalyco#14283)
  feat(tui): add custom tool and mcp call responses visible and collapsable (anomalyco#10649)
  chore: cleanup
  ...

# Conflicts:
#	bun.lock
#	packages/app/package.json
#	packages/console/app/package.json
#	packages/console/core/package.json
#	packages/console/function/package.json
#	packages/console/mail/package.json
#	packages/desktop/package.json
#	packages/enterprise/package.json
#	packages/extensions/zed/extension.toml
#	packages/function/package.json
#	packages/opencode/package.json
#	packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
#	packages/opencode/src/cli/cmd/tui/routes/home.tsx
#	packages/opencode/src/config/config.ts
#	packages/opencode/src/tool/lsp.ts
#	packages/opencode/src/tool/read.ts
#	packages/plugin/package.json
#	packages/sdk/js/package.json
#	packages/slack/package.json
#	packages/ui/package.json
#	packages/util/package.json
#	packages/web/package.json
#	sdks/vscode/package.json
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.

[FEATURE]: MCP Tool Output

3 participants