diff --git a/admin/app/utils/kb_warning_decision.ts b/admin/app/utils/kb_warning_decision.ts index cec59fa..4551566 100644 --- a/admin/app/utils/kb_warning_decision.ts +++ b/admin/app/utils/kb_warning_decision.ts @@ -12,9 +12,9 @@ * stall (which the binary "any chunks ⇒ embedded" check * used to mask). Surfaces a Retry affordance. */ -export type FileWarning = - | { kind: 'zero_chunks'; fileSizeBytes: number } - | { kind: 'partial_stall'; chunksEmbedded: number; chunksExpected: number } +import type { FileWarning } from '../../types/rag.js' + +export type { FileWarning } /** Files smaller than this are too small to flag as suspicious zero-chunk * cases — a 5 KB upload that produces 0 chunks is much more likely to be a diff --git a/admin/inertia/lib/api.ts b/admin/inertia/lib/api.ts index 628f4a0..950f593 100644 --- a/admin/inertia/lib/api.ts +++ b/admin/inertia/lib/api.ts @@ -5,8 +5,7 @@ import { FileEntry } from '../../types/files' import { CheckLatestVersionResult, SystemInformationResponse, SystemUpdateStatus } from '../../types/system' import { DownloadJobWithProgress, WikipediaState } from '../../types/downloads' import type { Country, CountryCode, CountryGroup, MapExtractPreflight } from '../../types/maps' -import { EmbedJobWithProgress } from '../../types/rag' -import type { FileWarning } from '../../app/utils/kb_warning_decision.js' +import { EmbedJobWithProgress, FileWarning } from '../../types/rag' import type { CategoryWithStatus, CollectionWithStatus, ContentUpdateCheckResult, ResourceUpdateInfo } from '../../types/collections' import { catchInternal } from './util' import { NomadChatResponse, NomadInstalledModel, NomadOllamaModel, OllamaChatRequest } from '../../types/ollama' diff --git a/admin/types/rag.ts b/admin/types/rag.ts index a50cb4c..8aaa0f6 100644 --- a/admin/types/rag.ts +++ b/admin/types/rag.ts @@ -40,4 +40,8 @@ export type RAGResult = { export type RerankedRAGResult = Omit & { finalScore: number -} \ No newline at end of file +} + +export type FileWarning = + | { kind: 'zero_chunks'; fileSizeBytes: number } + | { kind: 'partial_stall'; chunksEmbedded: number; chunksExpected: number } \ No newline at end of file