feat(frontend): wire personNames to TrainingHistory in OcrTrainingCard
Extends Run interface with personId and QUEUED status, TrainingInfo with personNames map, and passes it through to TrainingHistory for per-sender model column display. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,8 @@ import { m } from '$lib/paraglide/messages.js';
|
||||
|
||||
interface Run {
|
||||
id: string;
|
||||
status: 'RUNNING' | 'DONE' | 'FAILED';
|
||||
personId?: string;
|
||||
status: 'RUNNING' | 'DONE' | 'FAILED' | 'QUEUED';
|
||||
blockCount: number;
|
||||
documentCount: number;
|
||||
modelName: string;
|
||||
@@ -21,6 +22,7 @@ interface TrainingInfo {
|
||||
ocrServiceAvailable?: boolean;
|
||||
lastRun?: Run | null;
|
||||
runs?: Run[];
|
||||
personNames?: Record<string, string>;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
@@ -88,5 +90,8 @@ async function startTraining() {
|
||||
<h3 class="mt-6 mb-3 text-xs font-bold tracking-widest text-ink-3 uppercase">
|
||||
{m.training_history_heading()}
|
||||
</h3>
|
||||
<TrainingHistory runs={(trainingInfo?.runs ?? []).filter((r) => r.modelName !== 'blla')} />
|
||||
<TrainingHistory
|
||||
runs={(trainingInfo?.runs ?? []).filter((r) => r.modelName !== 'blla')}
|
||||
personNames={trainingInfo?.personNames ?? {}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user