feat(stats): speed up session maintenance and improve stats UI (#111)

This commit is contained in:
sudacode authored and GitHub committed 2026-06-08 02:20:52 -07:00
1 parent e6a16a069b
commit 311f1e8ee5
108 files changed
+7440 -728

No files matched your search

+16
View File
@@ -156,6 +156,22 @@ export class AnkiConnectClient {
return (result as number[]) || [];
}
async findCards(query: string, options?: { maxRetries?: number }): Promise<number[]> {
const result = await this.invoke('findCards', { query }, options);
return (result as number[]) || [];
}
async changeDeck(cardIds: number[], deckName: string): Promise<void> {
if (cardIds.length === 0 || !deckName.trim()) {
return;
}
await this.invoke('changeDeck', {
cards: cardIds,
deck: deckName,
});
}
async deckNames(): Promise<string[]> {
const result = await this.invoke('deckNames');
return Array.isArray(result)