feat(browser_execute): require description field; surface as TUI title#51
Merged
Alezander9 merged 1 commit intomainfrom May 9, 2026
Merged
Conversation
browser_execute now takes a required 'description' parameter that mirrors the bash tool's same-named field. The TUI's BlockTool title shows it instead of the static 'Browser execute' label, giving the user a per-call summary of what the snippet does. Strong models were already writing this as a comment at the top of 'code'; an explicit slot is cheaper and renders better. Also adds a one-line note to cloud-browser.md telling the agent to surface 'liveUrl' as a markdown link if the user asks for it (markdown links in assistant replies are clickable in the TUI; tool stdout is not).
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
browser_executenow takes a requireddescriptionparameter mirroring the bash tool's same-named field. Strong models were already writing this as a comment at the top ofcode; an explicit slot is cheaper and renders better.BlockTooltitle for browser_execute now shows the description instead of the static# Browser executelabel, giving the user a per-call summary of what the snippet does.cloud-browser.mdtelling the agent to surfaceliveUrlas a markdown link if the user asks for it. Markdown in assistant replies is clickable in the TUI; tool stdout is not. Default flow (console.logduring provision) is unchanged — no extra agent turn in the typical case.Files
packages/bcode-browser/src/browser-execute.ts— schema gains requireddescription: Schema.Stringwith bash-style examples.packages/opencode/src/tool/browser-execute.txt— one-line guidance.packages/opencode/src/cli/cmd/tui/routes/session/index.tsx— title now reads# ${props.input.description ?? "Browser execute"}(mirrorsShell).packages/bcode-browser/test/browser-execute.test.ts—descriptionadded to all 8impl.execute(...)call sites.packages/bcode-browser/skills/cloud-browser.md— one paragraph on surfacingliveUrlas a markdown link when asked.Verification
bun typecheckclean inpackages/bcode-browserandpackages/opencode.bun test test/browser-execute.test.ts— 2 pass / 6 skip (Chrome smoke gated onBCODE_SMOKE_CHROME=1) / 0 fail.5 files changed, 18 insertions(+), 2 deletions(-).