fix: 修复会话归组和文件预览编码

This commit is contained in:
shiyue
2026-08-07 10:54:08 +08:00
parent 3ddf21af85
commit 5ad2839b2c
21 changed files with 765 additions and 42 deletions

View File

@@ -3480,6 +3480,7 @@
syncFileBrowserSelection();
state.previewTitleEl.textContent = data.name || '文件预览';
const metaParts = [formatFileSize(data.size || 0)];
if (data.encoding) metaParts.push(String(data.encoding).toUpperCase());
if (data.updatedAt) metaParts.push(timeAgo(data.updatedAt));
if (data.truncated) metaParts.push(`仅显示前 ${formatFileSize(data.previewBytes || 0)}`);
if (targetLine) metaParts.push(`${targetLine}`);
@@ -5765,7 +5766,9 @@
currentModel = snapshot.model || '';
if (!preserveStreaming) {
renderMessages(snapshot.messages || [], {
immediate: !!options.immediate,
// 历史分片加载期间必须一次性渲染当前快照;异步倒序批次会与
// session_history_chunk 的 prepend 并发,造成消息视觉顺序错乱。
immediate: !!options.immediate || !!snapshot.historyPending,
baseIndex: snapshot.historyBaseIndex || 0,
});
scheduleAdvancedSearchJump();