feat: expose all OpenCode built-in commands via /opencode/command endpoint
维护者通常 1 天内回复
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 131
- 平均合并
- 7 小时 40 分钟
- 30 天内合并 PR
- 29
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rivet-dev/agents 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 68/100
rivet-dev/agents#319 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
rivet-dev/agents#313 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
bug: codex model variants are out of order可能已有人在做 @c7ozkan 于 205 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 58/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
相似的 Issue
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 72/100
redhat-developer/rhdh-plugin-export-overlays#4391 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
Luligu/matterbridge#655 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
software-mansion/argent#1457 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
schmayterling/hibi#245 ·
维护者通常 1 天内回复
-
ai-driven-qa bug claude Minor
难度 2/5 1-3 小时 新手友好度 70/100
linagora/twake-contacts-frontend#241 ·
维护者通常 1 天内回复