feat: expose all OpenCode built-in commands via /opencode/command endpoint
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 1.6k
- Fork
- 131
- Merge trung bình
- 7 giờ 40 phút
- Pull request đã merge (30 ngày)
- 29
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rivet-dev/agents
-
skills add rivet-dev/skills -s sandbox-agent fails: the skill was removed from rivet-dev/skillsĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
rivet-dev/agents#319 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
rivet-dev/agents#313 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: codex model variants are out of orderCó thể đã có người làm @c7ozkan đã nhận 205 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rivet-dev/agents
Issue tương tự
-
A hung CI job runs for 6 hours before it is cancelledCó thể đã có người làm @Olanetsoft đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Olanetsoft/agent-lookout#110 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
thedotmack/claude-mem#4757 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 bug 🗺️ MCP OAuth
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
LibreChat-AI/LibreChat#17077 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100