fix: resolve magic scan crash and implement context-aware AI languages

- Fixed SQL syntax error in magicScan caused by single quotes
- Implemented dynamic locale-aware AI suggestions (Technical: EN, Custom Tags: Localized)
- Updated Dexie schema to version 2 (added locale to pending_scans)
- Fixed missing bottle_id in UploadQueue synchronization
- Installed missing dexie dependencies via pnpm
This commit is contained in:
2025-12-19 14:06:13 +01:00
parent 60ca3a6190
commit f52cfb80fc
9 changed files with 61 additions and 22 deletions

View File

@@ -5,6 +5,7 @@ export interface PendingScan {
imageBase64: string;
timestamp: number;
provider?: 'gemini' | 'nebius';
locale?: string;
}
export interface PendingTasting {
@@ -45,8 +46,8 @@ export class WhiskyDexie extends Dexie {
constructor() {
super('WhiskyVault');
this.version(1).stores({
pending_scans: '++id, timestamp',
this.version(2).stores({
pending_scans: '++id, timestamp, locale',
pending_tastings: '++id, bottle_id, tasted_at',
cache_tags: 'id, category, name',
cache_buddies: 'id, name'