MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / sortSlashCommands

Function sortSlashCommands

apps/kimi-code/src/tui/commands/registry.ts:427–431  ·  view source on GitHub ↗
(commands: readonly KimiSlashCommand[])

Source from the content-addressed store, hash-verified

425}
426
427export function sortSlashCommands(commands: readonly KimiSlashCommand[]): KimiSlashCommand[] {
428 return [...commands].toSorted(
429 (a, b) => (b.priority ?? 0) - (a.priority ?? 0) || a.name.localeCompare(b.name),
430 );
431}

Callers 2

getSlashCommandsMethod · 0.90
registry.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected