From 22e660392453109f8efef65e5b4a3da59821a52d Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Sun, 23 Aug 2026 01:39:56 +0530 Subject: [PATCH] feat(fetch-requests): support llama_parse pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix PipelineType union: "llama_parser" → "llama_parse" (matches backend enum) - Add "llama_extract" to SSEEventStep union - PipelineStepper: advance Extract stage on llama_extract events Dropdown/badge rendering is OpenAPI-spec-driven and picks the new value up automatically; no other changes required. --- src/FetchRequest/components/PipelineStepper.tsx | 8 +++++++- src/features/fetch-requests/fetch-requests.models.ts | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/FetchRequest/components/PipelineStepper.tsx b/src/FetchRequest/components/PipelineStepper.tsx index fce4931..d4280b0 100644 --- a/src/FetchRequest/components/PipelineStepper.tsx +++ b/src/FetchRequest/components/PipelineStepper.tsx @@ -29,7 +29,13 @@ function computeProgressPercent( let pct = 0; - if (seenSteps.has("raw_lines") || seenSteps.has("txn_blocks")) pct += 10; + if ( + seenSteps.has("raw_lines") || + seenSteps.has("txn_blocks") || + seenSteps.has("llama_extract") + ) { + pct += 10; + } if (txnBlockCount > 0) { const current = Math.max(liveCount, stepStats.txn_dicts ?? 0); diff --git a/src/features/fetch-requests/fetch-requests.models.ts b/src/features/fetch-requests/fetch-requests.models.ts index e7c76e1..a3614f6 100644 --- a/src/features/fetch-requests/fetch-requests.models.ts +++ b/src/features/fetch-requests/fetch-requests.models.ts @@ -26,7 +26,7 @@ export interface EmailSource { txn_dicts_count?: number; } -export type PipelineType = "heuristic" | "llm" | "llama_parser"; +export type PipelineType = "heuristic" | "llm" | "llama_parse"; export interface FetchRequestCreate { source: FileSource | EmailSource; @@ -90,7 +90,7 @@ export interface ResolveAmbiguityPayload { export type SSEEventStep = | "load_content" | "raw_lines" | "txn_blocks" | "txn_dicts" | "resume_extract" | "extract" | "paused" | "complete" | "enrich" - | "save_expenses" | "pipeline"; + | "save_expenses" | "pipeline" | "llama_extract"; export type SSEEventStatus = | "started" | "completed" | "skipped" | "paused" | "progress" | "failed";