fix: 修复system消息渲染到聊天界面+AI说了做但没调用工具直接停止的问题
This commit is contained in:
@@ -136,6 +136,8 @@ export function renderMessages(): void {
|
||||
|
||||
for (let i = 0; i < msgs.length; i++) {
|
||||
const msg = msgs[i];
|
||||
// 跳过 system 消息(Plan Mode 进度等内部状态消息不展示给用户)
|
||||
if (msg.role === 'system') continue;
|
||||
// 只跳过既无内容也无 think 也无工具的空消息
|
||||
if (msg.role === 'assistant' && !msg.content && !msg.think && (!msg.toolCalls || msg.toolCalls.length === 0)) continue;
|
||||
appendMessageDOM(msgs[i], i);
|
||||
|
||||
Reference in New Issue
Block a user