Skip to content

Conversation

@CasualDeveloper
Copy link

@CasualDeveloper CasualDeveloper commented Dec 25, 2025

Summary

  • Add configurable keybinds for dialog actions (delete, rename, favorite, etc.)
  • Change session_rename default from none to ctrl+r

Closes #6143

New Keybind Options

Option Default Description
session_delete ctrl+d Delete session
session_rename ctrl+r Rename session
stash_delete ctrl+d Delete stash entry
model_provider_list ctrl+a Open provider list
model_favorite_toggle ctrl+f Toggle model favorite

Usage

{
  "keybinds": {
    "session_delete": "super+d",
    "session_rename": "super+r"
  }
}

Copilot AI review requested due to automatic review settings December 25, 2025 03:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds configurable keybinds for dialog actions in the TUI, allowing users to customize keyboard shortcuts for operations like deleting sessions/stash entries, renaming sessions, toggling model favorites, and opening the provider list. The default for session_rename has also been changed from none to ctrl+r.

Key Changes:

  • Added five new configurable keybind options: session_delete, session_rename (default changed), stash_delete, model_provider_list, and model_favorite_toggle
  • Updated dialog components to use the configurable keybind system instead of hardcoded values
  • Enhanced Keybind.match() and Keybind.toString() utility functions to handle undefined values

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/sdk/openapi.json Adds OpenAPI schema definitions for the five new keybind configuration options with their default values
packages/sdk/js/src/v2/gen/types.gen.ts Generates TypeScript type definitions for the new keybind options in the SDK
packages/sdk/js/package.json Formatting fix (adds trailing newline)
packages/plugin/package.json Formatting fix (adds trailing newline)
packages/opencode/src/util/keybind.ts Updates match() and toString() to accept Info | undefined for safer handling of missing keybinds
packages/opencode/src/config/config.ts Adds Zod schema definitions for the new keybind options with default values
packages/opencode/src/cli/cmd/tui/component/dialog-stash.tsx Replaces hardcoded ctrl+d with configurable stash_delete keybind
packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx Replaces hardcoded ctrl+d and ctrl+r with configurable session_delete and session_rename keybinds
packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx Replaces hardcoded ctrl+a and ctrl+f with configurable model_provider_list and model_favorite_toggle keybinds

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add session_delete, stash_delete, model_provider_list, and
model_favorite_toggle to keybind config. Also change session_rename
default from 'none' to 'ctrl+r'.

Closes sst#6143
@CasualDeveloper CasualDeveloper force-pushed the feat/configurable-dialog-keybinds branch from c1300af to 8cdfc63 Compare December 25, 2025 04:01
@CasualDeveloper
Copy link
Author

Updated to address Copilot review feedback:

  • Changed ![0] to ?.[0] for safer keybind access
  • Updated DialogSelect type to accept optional keybind (allows disabling via "none")
  • Added filtering for undefined keybinds in the component

This PR also closes #3262.

@rekram1-node
Copy link
Collaborator

Yep these should all be configurable, good catch

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@CasualDeveloper CasualDeveloper force-pushed the feat/configurable-dialog-keybinds branch from 7e9d871 to 8cdfc63 Compare December 25, 2025 15:21
@rekram1-node
Copy link
Collaborator

this should be good to merge, ill do so after xmas

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.

Add configurable keybinds for dialog actions

2 participants