feat: expose all OpenCode built-in commands via /opencode/command endpoint
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start with the oc_command_list and oc_tui_execute_command handlers in server/packages/sandbox-agent/src/opencode_compat.rs. Read the OpenCode OpenAPI spec at resources/agent-schemas/artifacts/openapi/opencode.json and research/specs/command-shell-exec.md, then compare the existing custom-command proxy with the built-in command strings. Done means the command listing mechanism exposes the complete expected set, including built-in TUI commands, without relying on a native proxy.
Written by the indexing model from the issue text.
Description
Problem
The GET /opencode/command endpoint currently only returns custom/user-defined commands (source: command, mcp, skill). Built-in TUI commands like /compact, /clear, /undo, etc. are hardcoded in the OpenCode TUI client and not discoverable via any API endpoint.
This means Gigacode has no way to expose or list the full set of available commands to users or frontends.
Built-in TUI commands that need coverage
These are the commands defined in OpenCode's EventTuiCommandExecute enum, currently only executable via POST /tui/execute-command:
session.compact— compact/summarize contextsession.list— list sessionssession.new— create new sessionsession.share— share sessionsession.interrupt— interrupt current generationprompt.clear— clear prompt inputprompt.submit— submit promptagent.cycle— cycle between agentssession.page.up/session.page.down— scroll pagesession.line.up/session.line.down— scroll linesession.half.page.up/session.half.page.down— scroll half pagesession.first/session.last— jump to first/last
Current behavior
GET /opencode/commandproxies to native OpenCode (returns custom commands like/init,/review, skills) or returns[]if no proxy is configuredPOST /tui/execute-commandaccepts built-in command strings but there's no listing endpoint- No single endpoint returns the full set of available commands (custom + built-in)
Expected behavior
The GET /opencode/command endpoint (or a supplementary mechanism) should return all available commands, including built-in TUI commands, so that:
- Frontends can render a complete command palette
- Users can discover all available commands
- Gigacode doesn't depend on the native OpenCode proxy just to list built-in commands
Relevant code
oc_command_listhandler:server/packages/sandbox-agent/src/opencode_compat.rsoc_tui_execute_commandhandler:server/packages/sandbox-agent/src/opencode_compat.rs- OpenCode OpenAPI spec:
resources/agent-schemas/artifacts/openapi/opencode.json - Command stub spec:
research/specs/command-shell-exec.md
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rivet-dev/sandbox-agent
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rivet-dev/sandbox-agent#313 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
rivet-dev/sandbox-agent#146 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
rivet-dev/sandbox-agent#145 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
rivet-dev/sandbox-agent#144 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
rivet-dev/sandbox-agent#143 ·
All issues in rivet-dev/sandbox-agent
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·