v0.16.19: 修复日志面板清空、URL误传文件工具、网络工具超时、结果截断

This commit is contained in:
2026-08-02 19:09:29 +08:00
parent e140e735de
commit e4f83bd09a
13 changed files with 295 additions and 196 deletions
+19
View File
@@ -583,6 +583,25 @@ export function appendAssistantPlaceholder(): void {
scrollToBottom();
}
/**
* 确保 loading 占位符存在 — 如果当前没有 loading 占位符,创建一个。
* 用于中间轮次 THINKING 开始前,确保用户看到"正在思考..."状态。
*/
export function ensureLoadingPlaceholder(): void {
if (currentPlaceholder && currentPlaceholder.classList.contains('loading') && currentPlaceholder.isConnected) {
return;
}
// 当前 placeholder 不存在或不是 loading 状态 → 清理旧 placeholder 并创建新的
if (currentPlaceholder && !currentPlaceholder.classList.contains('loading') && currentPlaceholder.isConnected) {
// 上一轮的 placeholder 已经被 updateLastAssistantMessage 转为正常消息但未通过 renderMessages 固化
// 不需要移除,直接追加新的 loading
}
if (currentPlaceholder && !currentPlaceholder.isConnected) {
currentPlaceholder = null;
}
appendAssistantPlaceholder();
}
// R34: 加载提示旋转动画
const LOADING_HINTS = [
'正在思考...',