Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat: expose all OpenCode built-in commands via /opencode/command endpoint

Đang mở
#142 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@talhaimtiaz09 đang làm issue này rồi.

Từ ngày 9/6/2026.

  • #301 của @talhaimtiaz09 — đang mở

Đá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
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
openapi, rust
Lĩnh vực
api, backend

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 context
  • session.list — list sessions
  • session.new — create new session
  • session.share — share session
  • session.interrupt — interrupt current generation
  • prompt.clear — clear prompt input
  • prompt.submit — submit prompt
  • agent.cycle — cycle between agents
  • session.page.up / session.page.down — scroll page
  • session.line.up / session.line.down — scroll line
  • session.half.page.up / session.half.page.down — scroll half page
  • session.first / session.last — jump to first/last

Current behavior

  • GET /opencode/command proxies to native OpenCode (returns custom commands like /init, /review, skills) or returns [] if no proxy is configured
  • POST /tui/execute-command accepts 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:

  1. Frontends can render a complete command palette
  2. Users can discover all available commands
  3. Gigacode doesn't depend on the native OpenCode proxy just to list built-in commands

Relevant code

  • oc_command_list handler: server/packages/sandbox-agent/src/opencode_compat.rs
  • oc_tui_execute_command handler: 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rivet-dev/agents

Tất cả issue của rivet-dev/agents

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.