Skip to content

feat(browser_execute): require description field; surface as TUI title#51

Merged
Alezander9 merged 1 commit intomainfrom
feat/browser-execute-description-and-cloud-link
May 9, 2026
Merged

feat(browser_execute): require description field; surface as TUI title#51
Alezander9 merged 1 commit intomainfrom
feat/browser-execute-description-and-cloud-link

Conversation

@Alezander9
Copy link
Copy Markdown
Member

Summary

  • browser_execute now takes a required description parameter mirroring the bash tool's same-named field. Strong models were already writing this as a comment at the top of code; an explicit slot is cheaper and renders better.
  • TUI's BlockTool title for browser_execute now shows the description instead of the static # Browser execute label, giving the user a per-call summary of what the snippet does.
  • One-line note in cloud-browser.md telling the agent to surface liveUrl as 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.log during provision) is unchanged — no extra agent turn in the typical case.

Files

  • packages/bcode-browser/src/browser-execute.ts — schema gains required description: Schema.String with 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"} (mirrors Shell).
  • packages/bcode-browser/test/browser-execute.test.tsdescription added to all 8 impl.execute(...) call sites.
  • packages/bcode-browser/skills/cloud-browser.md — one paragraph on surfacing liveUrl as a markdown link when asked.

Verification

  • bun typecheck clean in packages/bcode-browser and packages/opencode.
  • bun test test/browser-execute.test.ts — 2 pass / 6 skip (Chrome smoke gated on BCODE_SMOKE_CHROME=1) / 0 fail.

5 files changed, 18 insertions(+), 2 deletions(-).

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).
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

@Alezander9 Alezander9 merged commit 5d3b059 into main May 9, 2026
3 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.

1 participant