Files
kandev/apps/web/lib/commands/search-keywords.ts
T
João Salavisa ac520a8cdc feat(web): archive the current task from the command palette (#2346)
Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 11:29:24 +02:00

15 lines
496 B
TypeScript

import type { TFunction } from "i18next";
/**
* Search keywords are stored as one comma-separated catalog value so a
* translator can localize the whole set in one entry. They are matched, never
* displayed; the palette itself selects commands by `id` (see
* `command-panel-footer.tsx`), so no behavior keys off this copy.
*/
export function searchKeywords(t: TFunction, key: string): string[] {
return t(key)
.split(",")
.map((keyword) => keyword.trim())
.filter(Boolean);
}