feat: 知识库更新,优化批量语音转写 - 合并索引 - 增加会话级批量转写处理 - 补充语音转写回归测试

This commit is contained in:
电摇小子
2026-08-06 20:31:08 +08:00
parent a0e8ab278f
commit 0ec2e6a0be
34 changed files with 2589 additions and 53 deletions
+12
View File
@@ -40,6 +40,8 @@ export interface KnowledgeSourceMessage {
text?: string
attachment?: KnowledgeAttachmentMetadata
voiceTranscript?: string
/** Local coverage state only. Error text is never copied into the index. */
voiceTranscriptState?: 'pending' | 'transcribed' | 'failed'
}
export interface KnowledgeNormalizedMessage extends KnowledgeSourceMessage {
@@ -171,10 +173,19 @@ export interface KnowledgeEvidence {
/** Unix epoch milliseconds. */
timestamp: number
messageIds: string[]
/** The source type belongs to the original message, not the retrieval method. */
sourceKind: KnowledgeMessageKind
text: string
score?: number
}
export interface KnowledgeVoiceCoverage {
voiceMessageCount: number
transcribedVoiceCount: number
failedVoiceCount: number
voiceCoverageComplete: boolean
}
/** A bounded, local summary of a single conversation retrieval. */
export interface KnowledgeConversationRetrieval {
conversationId: string
@@ -255,6 +266,7 @@ export interface KnowledgeSearchResult {
indexedChunkCount: number
timings: KnowledgeSearchTimings
conversationRetrieval?: KnowledgeConversationRetrieval
voiceCoverage?: KnowledgeVoiceCoverage
}
/** Renderer-facing request. Chat timestamps use Unix seconds in the existing UI. */