[FEATURE]: command IDs for prev/next Subagents panel tab switching
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 66/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
从 packages/tui/src/routes/session/composer/index.tsx 开始,比较同一面板中的内联标签页切换命令和命名的子代理命令。检查 packages/tui/src/config/keybind.ts 和 packages/tui/src/context/keymap.tsx,了解命令 ID 和已配置的按键绑定。完成标准是:切换到上一个和下一个标签页都有带可配置默认值的命名命令;在 TUI 中试用这些按键绑定。
由索引模型根据 Issue 内容生成。
描述
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Posting this because my OpenCode asked me to, lol:
Summary
Composer panel tab switching (Subagents / Shell / Terminals / Scripts) is registered as inline keymap commands with bind: "left" / bind: "right" and no command ID, so it cannot be remapped through the keybinds config. Vim-style users who want h/l to switch tabs have no config-level way to do it.
Environment
- opencode version: 2.4.4
- Client: TUI
- Model and provider: Not relevant
- OS: Linux 7.3.7-1-MANJARO (linux x64)
- Terminal: tmux, TERM=screen-256color, COLORTERM=truecolor
- Shell: /bin/zsh
- Install/channel: latest release
- Active plugins: vimcode v0.19.2 (git pin), @mohak34/opencode-notifier
Reproduction
- Open a session that has child (subagent) sessions.
- Open the composer panel (via
session.child.first). - Switch between the Subagents / Shell / Terminals tabs — only the left/right arrow keys work.
- Attempt to rebind in
keybinds(e.g."session.child.next": "l","session.child.previous": "h") in~/.config/opencode/cli.json. - The overrides parse without error but have no effect: those command IDs are defined in the keybind schema but never registered in any keymap layer in v2.4.4, and the live tab-switch commands have no IDs at all.
Expected Behavior
Composer tab switching should be exposed as named keymap commands (e.g. composer.tab.previous / composer.tab.next) with default bindings left / right, so users can rebind them via keybinds — the same pattern already used by the bindable composer.subagent.up / composer.subagent.down / composer.subagent.select commands in the same panel.
Actual Behavior
The tab-switch commands are registered inline in packages/tui/src/routes/session/composer/index.tsx:
{ bind: "left", title: "Previous tab", group: "Composer", run: () => switchTab(-1) },
{ bind: "right", title: "Next tab", group: "Composer", run: () => switchTab(1) },
Inline commands carry no ID, and layer binding resolution in packages/tui/src/context/keymap.tsx only consults user config for named command IDs (config.keybinds.get(command.id)), so no config entry can bind these commands.
Additional Context
session.child.next/session.child.previousare defined inpackages/tui/src/config/keybind.ts(defaultsright/left) but are not registered in any keymap layer in v2.4.4, so user bindings for them are inert as well.- A plugin-level workaround exists (rewriting key events via
renderer.keyInput.prependListenerbefore the keymap dispatch), which confirms the events are reachable — but the config-level fix is the pair of named commands above.
Related
- #51903 — composer tabs not clickable; same root cause (inline tab-switch commands have no IDs)
- #56002 — rebind inline
composer.subagent.toggle-activity(same "rebind an inline composer command" ask) - #56153 —
session.child.next/previousdead commands - #57335 — 13 declared-but-unregistered keybind IDs, incl. the two above
- PR #56199 — deprecate the dead child defaults (closed, unmerged)
- 主要语言
- TypeScript
- 星标
- 230k
- 派生
- 31.3k
- 平均合并
- 5 小时 44 分钟
- 30 天内合并 PR
- 529
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
area/desktop type/feature version/v2
难度 2/5 1-3 小时 新手友好度 78/100
anomalyco/opencode#68437 · 1 条评论 ·
维护者通常 1 天内回复
-
cli: opencode models <provider> filter from v1 is rejected in v2 ("Unexpected positional argument")可能已有人在做 @nilparra-dev 今天认领。 未关闭area/cli platform/macos type/feature version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#68364 · 2 条评论 ·
维护者通常 1 天内回复
-
area/plugins platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#68298 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: Web UI: Pressing Ctrl+<key> with Caps Lock active triggers Ctrl+Shift+<key> shortcuts可能已有人在做 @saurabhbhoir456 今天认领。 未关闭area/web platform/windows type/bug version/v2
难度 2/5 1-3 小时 新手友好度 65/100
anomalyco/opencode#68237 · 6 条评论 ·
维护者通常 1 天内回复
-
area/desktop inference/go platform/macos type/bug version/v2
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#68121 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 95/100
amosblomqvist/learnharness#1141 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
ranxianglei/billion-context#8319 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
tencent-connect/dsh-qqbot#148 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
JimLiu/open-artifact#126 ·
-
难度 2/5 1-3 小时 新手友好度 78/100