修复:完整展示AI原文并穿插图表,统一运行反馈与变化符号

This commit is contained in:
2026-11-02 12:03:37 +08:00
parent cf8e25a30d
commit 903fa94c00
35 changed files with 1016 additions and 172 deletions
+4 -3
View File
@@ -158,10 +158,10 @@ test('settled process is collapsed, with the original records retained inside',(
assert.doesNotMatch(html,/<details class="analysis-process-history analysis-agent-process" open/);
}
});
test('running process stays folded by default while retaining its current records inside',()=>{
test('running process is expanded by default while retaining its current records inside',()=>{
const html=renderToStaticMarkup(React.createElement(Process,{turn:processTurn('RUNNING')}));
assert.match(html,/读取数据/);assert.match(html,/<details class="analysis-process-history analysis-agent-process"/);
assert.doesNotMatch(html,/<details class="analysis-process-history analysis-agent-process" open/);
assert.match(html,/<details class="analysis-process-history analysis-agent-process" open/);
});
test('a submitted follow-up rearms following only when its own turn is rendered',()=>{
@@ -329,7 +329,8 @@ test('agent process interleaves thoughts, tool calls and text with one runtime h
]};
const html=renderToStaticMarkup(React.createElement(Process,{turn,metadata:React.createElement('span',null,'运行时长 25秒')}));
assert.equal((html.match(/运行时长/g)||[]).length,1);
const positions=['先核对范围','我来查询两个期间。','读取数据','再整理结果'].map(value=>html.indexOf(value));
assert.doesNotMatch(html,/我来查询两个期间。/);
const positions=['先核对范围','读取数据','再整理结果'].map(value=>html.indexOf(value));
assert.ok(positions.every((p,i)=>p>=0&&(!i||p>positions[i-1])));
assert.equal((html.match(/class="analysis-thinking-block"/g)||[]).length,2);
for(const hidden of ['model-hidden','任务理解','整理结论','analysis-thinking-heading','展示接口实际返回'])assert.ok(!html.includes(hidden),hidden);