Skip to content

The open source coding agent.

TypeScript

fix(tui): sort custom commands lower

adamdotdevin6357136ca519
diff --git a/packages/tui/internal/commands/command.go b/packages/tui/internal/commands/command.go
index 3a5287ca3d3..ae34f4b52a2 100644
--- a/packages/tui/internal/commands/command.go
+++ b/packages/tui/internal/commands/command.go
@@ -92,6 +92,12 @@ func (r CommandRegistry) Sorted() []Command {
if b.Name == AppExitCommand {
return -1
}
+ if a.Custom {
+ return -1
+ }
+ if b.Custom {
+ return 1
+ }
return strings.Compare(string(a.Name), string(b.Name))
})