mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-20 09:14:22 +01:00
fix(tui): sort custom commands lower
This commit is contained in:
@@ -92,12 +92,12 @@ func (r CommandRegistry) Sorted() []Command {
|
|||||||
if b.Name == AppExitCommand {
|
if b.Name == AppExitCommand {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
if a.Custom {
|
if a.Custom && !b.Custom {
|
||||||
return -1
|
|
||||||
}
|
|
||||||
if b.Custom {
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
if !a.Custom && b.Custom {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
return strings.Compare(string(a.Name), string(b.Name))
|
return strings.Compare(string(a.Name), string(b.Name))
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user