feat: add auto sync frontmatter key configuration and update related messages

This commit is contained in:
Jiaxin Peng
2025-11-06 16:43:24 +00:00
parent ae4488546c
commit bb4b75c82e
7 changed files with 80 additions and 24 deletions

View File

@@ -1,4 +1,15 @@
export const AUTO_SYNC_DATABASE_KEY = "aytosync-database";
export const DEFAULT_AUTO_SYNC_DATABASE_KEY = "autosync-database";
export function resolveAutoSyncKey(rawKey: unknown): string {
if (typeof rawKey === "string") {
const trimmed = rawKey.trim();
if (trimmed.length > 0) {
return trimmed;
}
}
return DEFAULT_AUTO_SYNC_DATABASE_KEY;
}
function toCandidateList(value: unknown): string[] {
if (Array.isArray(value)) {