feat: improve background startup and launcher control

Detach --background launches from terminals with quieter runtime output, make wrapper/plugin overlay start explicit, and allow trailing commas in JSONC configs for safer hot-reload edits. Includes pending Anki/docs/backlog updates in this unreleased batch.
This commit is contained in:
2026-02-18 02:22:01 -08:00
parent 4703b995da
commit ebaed49f76
34 changed files with 515 additions and 48 deletions

View File

@@ -192,13 +192,35 @@ export class AnkiConnectClient {
deckName: string,
modelName: string,
fields: Record<string, string>,
tags: string[] = [],
): Promise<number> {
const note: {
deckName: string;
modelName: string;
fields: Record<string, string>;
tags?: string[];
} = { deckName, modelName, fields };
if (tags.length > 0) {
note.tags = tags;
}
const result = await this.invoke('addNote', {
note: { deckName, modelName, fields },
note,
});
return result as number;
}
async addTags(noteIds: number[], tags: string[]): Promise<void> {
if (noteIds.length === 0 || tags.length === 0) {
return;
}
await this.invoke('addTags', {
notes: noteIds,
tags: tags.join(' '),
});
}
async deleteNotes(noteIds: number[]): Promise<void> {
await this.invoke('deleteNotes', { notes: noteIds });
}