[PR #6378] feat: add model/agent slot keybinds for direct switching #11869

Open
opened 2026-02-16 18:16:48 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6378

State: open
Merged: No


Summary

  • Add model_slot_1-5 keybinds to jump directly to favorite models
  • Add agent_slot_1-5 keybinds to jump directly to agents by index
  • Add setFavorite(index) method to model store
  • Add setSlot(index) method to agent store

Motivation

Currently switching models requires cycling through all favorites with Tab/F2. This PR enables direct keybind mapping for faster workflow - press F1 for favorite model 1, f5 for agent 1, etc.

Example Config

"keybinds": {
  "model_cycle_recent": "none",
  "model_slot_1": "f1",
  "model_slot_2": "f2", 
  "model_slot_3": "f3",
  
  "agent_slot_1": "f5",
  "agent_slot_2": "f6"
}

Files Changed

  • packages/opencode/src/config/config.ts - Add 10 keybind entries
  • packages/opencode/src/cli/cmd/tui/context/local.tsx - Add setFavorite/setSlot methods
  • packages/opencode/src/cli/cmd/tui/app.tsx - Register slot commands
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6378 **State:** open **Merged:** No --- ## Summary - Add `model_slot_1-5` keybinds to jump directly to favorite models - Add `agent_slot_1-5` keybinds to jump directly to agents by index - Add `setFavorite(index)` method to model store - Add `setSlot(index)` method to agent store ## Motivation Currently switching models requires cycling through all favorites with Tab/F2. This PR enables direct keybind mapping for faster workflow - press F1 for favorite model 1, f5 for agent 1, etc. ## Example Config ```json "keybinds": { "model_cycle_recent": "none", "model_slot_1": "f1", "model_slot_2": "f2", "model_slot_3": "f3", "agent_slot_1": "f5", "agent_slot_2": "f6" } ``` ## Files Changed - `packages/opencode/src/config/config.ts` - Add 10 keybind entries - `packages/opencode/src/cli/cmd/tui/context/local.tsx` - Add setFavorite/setSlot methods - `packages/opencode/src/cli/cmd/tui/app.tsx` - Register slot commands
yindo added the pull-request label 2026-02-16 18:16:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11869