Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore(cmdk): useHistoryKeys comment clarification

Greg Richardson6ed13325fbd4
diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx
index 1b2a423a997..e63343a226e 100644
--- a/packages/ui/src/components/Command/Command.utils.tsx
+++ b/packages/ui/src/components/Command/Command.utils.tsx
@@ -344,7 +344,7 @@ export function useHistoryKeys({ enable, messages, setPrompt }: UseHistoryKeysOp
return
}
- // Note: intentionally setting index to 1 greater than array length
+ // Note: intentionally setting index to 1 greater than max index
setMessageSelectionIndex(messages.length)
}, [messages, enable])