feat(owner): add platform-level owner profile types and matching

Add deterministic owner matching in core (exact platformId first, then
normalized-name fallback limited to whatsapp/line/instagram), plus
OwnerProfile preferences fields shared across Electron and CLI Web.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
diguaandClaude Fable 5 committed 2026-06-13 13:16:52 +08:00
1 parent 82a6be4fcb
commit 7589515eeb
6 files changed
+362

No files matched your search

+4
View File
@@ -68,6 +68,8 @@ const DEFAULTS: Preferences = {
},
filterHistory: [],
thinkingLevels: {},
ownerProfilesByPlatform: {},
ownerPromptDismissedSessionIds: [],
}
export class PreferencesManager {
@@ -152,6 +154,8 @@ export class PreferencesManager {
wordFilter: partial.wordFilter ? { ...DEFAULTS.wordFilter, ...partial.wordFilter } : { ...DEFAULTS.wordFilter },
filterHistory: partial.filterHistory ?? DEFAULTS.filterHistory,
thinkingLevels: partial.thinkingLevels ?? DEFAULTS.thinkingLevels,
ownerProfilesByPlatform: partial.ownerProfilesByPlatform ?? DEFAULTS.ownerProfilesByPlatform,
ownerPromptDismissedSessionIds: partial.ownerPromptDismissedSessionIds ?? DEFAULTS.ownerPromptDismissedSessionIds,
}
}