Skip to content

Commit db053c4

Browse files
timoclsnnipuna-perera
authored andcommitted
feat(tui): remove share commands from help if sharing is disabled (sst#1087)
1 parent 385aafb commit db053c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/tui/internal/commands/command.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ func LoadFromConfig(config *opencode.Config) CommandRegistry {
344344
marshalled, _ := json.Marshal(config.Keybinds)
345345
json.Unmarshal(marshalled, &keybinds)
346346
for _, command := range defaults {
347+
// Remove share/unshare commands if sharing is disabled
348+
if config.Share == opencode.ConfigShareDisabled && (command.Name == SessionShareCommand || command.Name == SessionUnshareCommand) {
349+
continue
350+
}
347351
if keybind, ok := keybinds[string(command.Name)]; ok && keybind != "" {
348352
command.Keybindings = parseBindings(keybind)
349353
}

0 commit comments

Comments
 (0)