feat(modality)!: SnapOtter 2.0 phase 3 modality framework: media/doc engines, pool routing, display modes (#218)

This commit is contained in:
SnapOtter
2026-06-13 10:18:39 +08:00
parent c451b939c7
commit d647d8ed19
99 changed files with 4380 additions and 1813 deletions
+10
View File
@@ -13,3 +13,13 @@ export function getToolDescription(t: TranslationKeys, toolId: string, fallback:
export function getCategoryName(t: TranslationKeys, categoryId: string, fallback: string): string {
return (t.categories as Record<string, string>)[categoryId] ?? fallback;
}
/**
* Returns the i18n display name for a modality group header.
* The "document" key maps to the merged "documentsAndFiles" i18n entry;
* "file" is never rendered as a top-level header (merged into document).
*/
export function getModalityName(t: TranslationKeys, modalityId: string, fallback: string): string {
const key = modalityId === "document" ? "documentsAndFiles" : modalityId;
return (t.modalities as Record<string, string>)[key] ?? fallback;
}