mirror of
https://github.com/sst/opencode.git
synced 2025-08-04 13:30:52 +00:00
feat(tui): remove share commands from help if sharing is disabled (#1087)
This commit is contained in:
parent
3ce3ac8e61
commit
a493aec174
1 changed files with 4 additions and 0 deletions
|
@ -344,6 +344,10 @@ func LoadFromConfig(config *opencode.Config) CommandRegistry {
|
|||
marshalled, _ := json.Marshal(config.Keybinds)
|
||||
json.Unmarshal(marshalled, &keybinds)
|
||||
for _, command := range defaults {
|
||||
// Remove share/unshare commands if sharing is disabled
|
||||
if config.Share == opencode.ConfigShareDisabled && (command.Name == SessionShareCommand || command.Name == SessionUnshareCommand) {
|
||||
continue
|
||||
}
|
||||
if keybind, ok := keybinds[string(command.Name)]; ok && keybind != "" {
|
||||
command.Keybindings = parseBindings(keybind)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue