fix: keep generation progress out of chat history
This commit is contained in:
@@ -102,3 +102,29 @@ test('puzzle workspace hides keyword fill before two turns', () => {
|
||||
|
||||
expect(screen.queryByRole('button', { name: '补充剩余设定' })).toBeNull();
|
||||
});
|
||||
|
||||
test('puzzle workspace does not render progress action messages as chat bubbles', () => {
|
||||
render(
|
||||
<PuzzleAgentWorkspace
|
||||
session={{
|
||||
...baseSession,
|
||||
messages: [
|
||||
...baseSession.messages,
|
||||
{
|
||||
id: 'message-action-result-1',
|
||||
role: 'assistant',
|
||||
kind: 'action_result',
|
||||
text: '拼图结果页草稿已生成。',
|
||||
createdAt: '2026-04-24T10:01:00.000Z',
|
||||
},
|
||||
],
|
||||
}}
|
||||
onBack={() => {}}
|
||||
onSubmitMessage={() => {}}
|
||||
onExecuteAction={() => {}}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText('画面主体已经清楚,继续收束剩余关键词。')).toBeTruthy();
|
||||
expect(screen.queryByText('拼图结果页草稿已生成。')).toBeNull();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user