File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ export class VisionWorker implements PipelineWorker {
139139 source : 'vision' ,
140140 model : ipcResult . modelUsed ,
141141 processingTimeMs : ipcResult . processingTimeMs ,
142+ // P2-4:采集时刻时间戳(截图时刻,非提取完成时刻)——时间轴对齐依据
143+ capturedAt : screenshotData . timestamp ?? Date . now ( ) ,
142144 structured : {
143145 formulas : ipcResult . formulas ,
144146 diagrams : ipcResult . diagrams ,
Original file line number Diff line number Diff line change @@ -63,9 +63,11 @@ export function processExtractionResult(
6363 } ) ;
6464
6565 // 将结果送入 CrossFusionEngine 进行交叉融合
66+ // P2-4 采集期对齐:融合时间戳用采集时刻(capturedAt),非处理完成时刻
67+ const alignedAt = result . capturedAt ?? Date . now ( ) ;
6668 if ( result . source === 'vision' ) {
6769 crossFusion . addVisionResult (
68- Date . now ( ) ,
70+ alignedAt ,
6971 result . text ,
7072 result . confidence ,
7173 result . structured ,
@@ -75,7 +77,7 @@ export function processExtractionResult(
7577 | Array < { start : number ; end : number ; text : string } >
7678 | undefined ;
7779 crossFusion . addAudioResult (
78- Date . now ( ) ,
80+ alignedAt ,
7981 result . text ,
8082 result . confidence ,
8183 segments ,
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ export interface ScreenshotData {
2929 height : number ;
3030 hasChanged : boolean ; // 变化检测结果
3131 changeScore ?: number ; // 变化分数 (0-1)
32+ /** P2-4 采集时刻时间戳(主进程截图时刻;缺失时回退处理时刻) */
33+ timestamp ?: number ;
3234}
3335
3436// 音频块数据
@@ -54,6 +56,8 @@ export interface ExtractionResult {
5456 model ?: string ; // 使用的模型名称
5557 processingTimeMs : number ;
5658 structured ?: Record < string , unknown > ; // 结构化数据(如 LaTeX 公式、图表描述)
59+ /** P2-4 采集时刻时间戳(截图/音频的采集时刻,非处理完成时刻)——时间轴对齐依据 */
60+ capturedAt ?: number ;
5761}
5862
5963// Worker 处理器接口
You can’t perform that action at this time.
0 commit comments