refactor(core): normalize service naming across app runtime

This commit is contained in:
2026-02-17 19:00:27 -08:00
parent e38a1c945e
commit 1233e3630f
87 changed files with 2813 additions and 1636 deletions

View File

@@ -14,7 +14,10 @@ export interface DuplicateDetectionDeps {
) => Promise<unknown>;
notesInfo: (noteIds: number[]) => Promise<unknown>;
getDeck: () => string | null | undefined;
resolveFieldName: (noteInfo: NoteInfo, preferredName: string) => string | null;
resolveFieldName: (
noteInfo: NoteInfo,
preferredName: string,
) => string | null;
logWarn: (message: string, error: unknown) => void;
}
@@ -44,7 +47,9 @@ export async function findDuplicateNote(
const query = `${deckPrefix}"${escapedFieldName}:${escapedExpression}"`;
try {
const noteIds = (await deps.findNotes(query, { maxRetries: 0 }) as number[]);
const noteIds = (await deps.findNotes(query, {
maxRetries: 0,
})) as number[];
return await findFirstExactDuplicateNoteId(
noteIds,
excludeNoteId,