Skip to content

Conversation

@adam2am
Copy link

@adam2am adam2am commented Dec 29, 2025

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

- Add model_slot_1-5 keybinds to jump to favorite models directly
- Add agent_slot_1-5 keybinds to jump to agents by index
- Add setFavorite(index) method to model store in local.tsx
- Add setSlot(index) method to agent store in local.tsx
- Register 10 new slot commands in app.tsx with keybind support

Users can now configure keybinds to switch between favorite models
and agents without cycling. Example config:
  "keybinds": {
    "model_slot_1": "f1",
    "agent_slot_1": "ctrl+1"
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant