Location: src/types/index.ts (around lines 61-70)
Finding: TranscriptionResult (and the related Token type) in src/types/index.ts appears unused. The runtime transcription pipeline uses shapes from src/lib/transcription/types.ts (chunkText, text, words, totalDuration, isFinal) and src/lib/model/types.ts (text, words with start_time/end_time). The central src/types/index.ts definition has different fields (text, tokens, isFinal, timestamp) and is not imported by the transcription or model code; only RecordingState, ModelState, BackendType from the same file are used (e.g. by appStore).
Suggested fix: Either (1) remove the unused TranscriptionResult and Token from src/types/index.ts and do a repo-wide search to ensure no stale imports reference them, or (2) define a single canonical TranscriptionResult (and Token if needed) that matches the actual runtime shape used elsewhere (e.g. align to chunkText/text/words/totalDuration/isFinal and optional words as in lib/transcription and lib/model), export it from the central types module, and update other modules to import that canonical type so the public API is consistent. Ensure re-exports for RecordingState, ModelState, and BackendType remain intact.
Verification: No imports of TranscriptionResult or Token from src/types in the codebase; transcription and model code use their local types.
Location:
src/types/index.ts(around lines 61-70)Finding:
TranscriptionResult(and the relatedTokentype) insrc/types/index.tsappears unused. The runtime transcription pipeline uses shapes fromsrc/lib/transcription/types.ts(chunkText, text, words, totalDuration, isFinal) andsrc/lib/model/types.ts(text, words with start_time/end_time). The centralsrc/types/index.tsdefinition has different fields (text, tokens, isFinal, timestamp) and is not imported by the transcription or model code; only RecordingState, ModelState, BackendType from the same file are used (e.g. by appStore).Suggested fix: Either (1) remove the unused
TranscriptionResultandTokenfromsrc/types/index.tsand do a repo-wide search to ensure no stale imports reference them, or (2) define a single canonicalTranscriptionResult(and Token if needed) that matches the actual runtime shape used elsewhere (e.g. align to chunkText/text/words/totalDuration/isFinal and optional words as in lib/transcription and lib/model), export it from the central types module, and update other modules to import that canonical type so the public API is consistent. Ensure re-exports for RecordingState, ModelState, and BackendType remain intact.Verification: No imports of
TranscriptionResultorTokenfromsrc/typesin the codebase; transcription and model code use their local types.