pub fn build_message_lines_incremental(
app: &ChatApp,
inner_width: usize,
bubble_max_width: usize,
old_cache: Option<&MsgLinesCache>,
) -> (Vec<Line<'static>>, Vec<(usize, usize)>, Vec<PerMsgCache>, Vec<Line<'static>>, usize)Expand description
增量构建所有消息的渲染行(P0 + P1 优化版本)
- P0:按消息粒度缓存,历史消息内容未变时直接复用渲染行
- P1:流式消息增量段落渲染,只重新解析最后一个不完整段落 返回 (渲染行列表, 消息起始行号映射, 按消息缓存, 流式稳定行缓存, 流式稳定偏移)