Skip to content

Commit f8be4d3

Browse files
committed
fix(notes): 清偿TD-C——list_events失败留日志线索
1 parent 14340db commit f8be4d3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎app/src-tauri/src/commands_session_note.rs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,20 @@ pub(crate) fn apply_note_structure(
7878
.as_deref()
7979
.map(ProfileKind::parse)
8080
.unwrap_or(ProfileKind::Lecture);
81+
// TD-2026-08-20-C:list_events 失败不再静默——事件缺失时章节检测回退
82+
// OCR/gap 近似(诚实降级语义不变),但留日志线索(purify_config 同模式)
83+
let events = match db.list_events(session.id) {
84+
Ok(ev) => ev,
85+
Err(e) => {
86+
eprintln!("[notes] list_events 失败(章节检测回退 OCR/gap 近似): {e}");
87+
Vec::new()
88+
}
89+
};
8190
let detail = SessionDetail {
8291
session: session.clone(),
8392
segments: segments.to_vec(),
8493
ocr_blocks: ocr_blocks.to_vec(),
85-
events: db.list_events(session.id).unwrap_or_default(),
94+
events,
8695
screens: Vec::new(),
8796
};
8897
let analysis = analyze_session_opt(&detail, kind, &env.symbol);

0 commit comments

Comments
 (0)