From fde6fc0ab12c93e0fc377f3d1833c6f35ef92fbd Mon Sep 17 00:00:00 2001 From: Devansh Jain <31609257+devanshrj@users.noreply.github.com> Date: Fri, 5 Dec 2025 12:36:17 -0800 Subject: [PATCH] chore: Sort slash commands (#154) --- src/cli/components/CommandPreview.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cli/components/CommandPreview.tsx b/src/cli/components/CommandPreview.tsx index 1e512a6..8d54ff4 100644 --- a/src/cli/components/CommandPreview.tsx +++ b/src/cli/components/CommandPreview.tsx @@ -4,10 +4,12 @@ import { commands } from "../commands/registry"; import { colors } from "./colors"; // Compute command list once at module level since it never changes -const commandList = Object.entries(commands).map(([cmd, { desc }]) => ({ - cmd, - desc, -})); +const commandList = Object.entries(commands) + .map(([cmd, { desc }]) => ({ + cmd, + desc, + })) + .sort((a, b) => a.cmd.localeCompare(b.cmd)); export function CommandPreview({ currentInput,