[FEATURE]: command IDs for prev/next Subagents panel tab switching

Ouverte Adaptée aux débutants
#68,301 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
66/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
typescript

Piste de recherche

Commencez dans packages/tui/src/routes/session/composer/index.tsx et comparez les commandes inline de changement d’onglet avec les commandes nommées de sous-agent dans le même panneau. Consultez packages/tui/src/config/keybind.ts et packages/tui/src/context/keymap.tsx pour comprendre les ID de commande et les raccourcis configurés. Le travail est terminé lorsque le passage à l’onglet précédent et suivant dispose de commandes nommées avec des valeurs par défaut configurables ; testez les raccourcis dans la TUI.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

area/tui platform/linux type/feature version/v2
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

  1. Open a session that has child (subagent) sessions.
  2. Open the composer panel (via session.child.first).
  3. Switch between the Subagents / Shell / Terminals tabs — only the left/right arrow keys work.
  4. Attempt to rebind in keybinds (e.g. "session.child.next": "l", "session.child.previous": "h") in ~/.config/opencode/cli.json.
  5. 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.previous are defined in packages/tui/src/config/keybind.ts (defaults right / 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.prependListener before 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/previous dead commands
  • #57335 — 13 declared-but-unregistered keybind IDs, incl. the two above
  • PR #56199 — deprecate the dead child defaults (closed, unmerged)
Langage dominant
TypeScript
Étoiles
230k
Forks
31.3k
Merge moyen
5 h 44 min
PR mergées (30 j)
529

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de anomalyco/opencode

Toutes les issues de anomalyco/opencode

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.