fix(extract): auto-run the AI fallback when the addon is enabled

Booking import only fell back to the LLM when each user flipped an 'always retry with AI' toggle, so by default files kitinerary returned nothing for just failed. Run the fallback automatically whenever the AI Parsing addon is on (fallback-on-empty); drop the now-redundant per-user toggle and its setting.
This commit is contained in:
Maurice
2026-06-24 21:20:19 +02:00
parent 186625591a
commit 22813f8d81
4 changed files with 4 additions and 41 deletions
+1 -4
View File
@@ -29,9 +29,6 @@ export const DEFAULTABLE_USER_SETTING_KEYS = [
'llm_base_url',
'llm_multimodal',
'llm_api_key',
// "Always retry with AI" toggle — when on, the preview auto-runs the LLM on
// files kitinerary returns nothing for.
'llm_always_retry',
] as const;
type DefaultableKey = typeof DEFAULTABLE_USER_SETTING_KEYS[number];
@@ -44,7 +41,7 @@ const VALID_VALUES: Partial<Record<DefaultableKey, unknown[]>> = {
llm_provider: ['local', 'openai', 'anthropic'],
};
const BOOLEAN_KEYS = new Set<DefaultableKey>(['blur_booking_codes', 'mapbox_3d_enabled', 'mapbox_quality_mode', 'llm_multimodal', 'llm_always_retry']);
const BOOLEAN_KEYS = new Set<DefaultableKey>(['blur_booking_codes', 'mapbox_3d_enabled', 'mapbox_quality_mode', 'llm_multimodal']);
function parseValue(raw: string): unknown {
try { return JSON.parse(raw); } catch { return raw; }