feat(anki): add configurable word card type for Kiku/Lapis (#175)

This commit is contained in:
2026-07-31 17:17:29 -07:00
committed by GitHub
parent 89ed675935
commit b204d4dd6e
31 changed files with 753 additions and 218 deletions
+12
View File
@@ -2,6 +2,15 @@ import type { AiFeatureConfig } from './integrations';
import type { NotificationType } from './notification';
import type { NPlusOneMatchMode } from './subtitle';
/**
* Card that a Kiku/Lapis note generates. The note types mark this with mutually
* exclusive `Is...Card` flag fields, so only one kind may be flagged per note.
*/
export type CardKind = 'sentence' | 'audio' | 'word-and-sentence' | 'click';
/** Card kind SubMiner flags on word cards; 'none' leaves the flag fields untouched. */
export type WordCardKind = CardKind | 'none';
export interface NotificationOptions {
body?: string;
icon?: string;
@@ -115,4 +124,7 @@ export interface AnkiConnectConfig {
fieldGrouping?: 'auto' | 'manual' | 'disabled';
deleteDuplicateInAuto?: boolean;
};
lapisKiku?: {
wordCardKind?: WordCardKind;
};
}
+4 -1
View File
@@ -1,4 +1,4 @@
import type { AnkiConnectConfig } from './anki';
import type { AnkiConnectConfig, WordCardKind } from './anki';
import type {
AiConfig,
AiFeatureConfig,
@@ -285,6 +285,9 @@ export interface ResolvedConfig {
fieldGrouping: 'auto' | 'manual' | 'disabled';
deleteDuplicateInAuto: boolean;
};
lapisKiku: {
wordCardKind: WordCardKind;
};
};
shortcuts: Required<ShortcutsConfig>;
secondarySub: Required<SecondarySubConfig>;