[PR #4915] Added "Open docs" command to palette #11172

Closed
opened 2026-02-16 18:15:58 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4915

State: closed
Merged: Yes


Perfect! I've successfully added the "Open docs" command to the command palette. Here's what I did:

Summary

I added a new "Open docs" command to the OpenCode TUI command palette that:

  1. Location: packages/opencode/src/cli/cmd/tui/app.tsx (lines 319-327)

  2. Features:

    • Appears in the System category of the command palette
    • Opens https://opencode.ai/docs in the default browser using the open library (same approach as in cmd/web.ts)
    • Clears the command dialog after execution
    • Gracefully handles errors if the browser fails to open
  3. Implementation details:

    • Added import open from "open" at the top of the file (line 33)
    • The command uses the same pattern as other browser-opening logic in the codebase (found in web.ts)
    • No keybind was added, so it's only accessible through the command palette
    • It follows the same structure as other commands like "Help", with a title, value, onSelect callback, and category

Users can now press the command palette shortcut (typically Ctrl+K in OpenCode) and search for "Open docs" to quickly open the documentation in their browser.

Closes #4871

New%20session%20-%202025-11-30T05%3A32%3A39.569Z
opencode session  |  github run

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4915 **State:** closed **Merged:** Yes --- Perfect! I've successfully added the "Open docs" command to the command palette. Here's what I did: ## Summary I added a new "Open docs" command to the OpenCode TUI command palette that: 1. **Location**: `packages/opencode/src/cli/cmd/tui/app.tsx` (lines 319-327) 2. **Features**: - Appears in the System category of the command palette - Opens `https://opencode.ai/docs` in the default browser using the `open` library (same approach as in `cmd/web.ts`) - Clears the command dialog after execution - Gracefully handles errors if the browser fails to open 3. **Implementation details**: - Added `import open from "open"` at the top of the file (line 33) - The command uses the same pattern as other browser-opening logic in the codebase (found in `web.ts`) - No keybind was added, so it's only accessible through the command palette - It follows the same structure as other commands like "Help", with a title, value, onSelect callback, and category Users can now press the command palette shortcut (typically `Ctrl+K` in OpenCode) and search for "Open docs" to quickly open the documentation in their browser. Closes #4871 <a href="https://opencode.ai/s/AunIM8DS"><img width="200" alt="New%20session%20-%202025-11-30T05%3A32%3A39.569Z" src="https://social-cards.sst.dev/opencode-share/TmV3IHNlc3Npb24gLSAyMDI1LTExLTMwVDA1OjMyOjM5LjU2OVo=.png?model=opencode/claude-haiku-4-5&version=1.0.122&id=AunIM8DS" /></a> [opencode session](https://opencode.ai/s/AunIM8DS)&nbsp;&nbsp;|&nbsp;&nbsp;[github run](/sst/opencode/actions/runs/19794432236)
yindo added the pull-request label 2026-02-16 18:15:58 -05:00
yindo closed this issue 2026-02-16 18:15:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11172