fix(core): accurately reflect subagent tool failure in UI (#23187)

This commit is contained in:
Abhi
2026-03-23 21:56:00 -04:00
committed by GitHub
parent 89ca78837e
commit a1f9af3fa7
8 changed files with 91 additions and 5 deletions

View File

@@ -182,4 +182,25 @@ describe('<SubagentProgressDisplay />', () => {
);
expect(lastFrame()).toMatchSnapshot();
});
it('renders error tool status correctly', async () => {
const progress: SubagentProgress = {
isSubagentProgress: true,
agentName: 'TestAgent',
recentActivity: [
{
id: '7',
type: 'tool_call',
content: 'run_shell_command',
args: '{"command": "echo hello"}',
status: 'error',
},
],
};
const { lastFrame } = await render(
<SubagentProgressDisplay progress={progress} terminalWidth={80} />,
);
expect(lastFrame()).toMatchSnapshot();
});
});

View File

@@ -40,6 +40,13 @@ exports[`<SubagentProgressDisplay /> > renders correctly with file_path 1`] = `
"
`;
exports[`<SubagentProgressDisplay /> > renders error tool status correctly 1`] = `
"Running subagent TestAgent...
x run_shell_command echo hello
"
`;
exports[`<SubagentProgressDisplay /> > renders thought bubbles correctly 1`] = `
"Running subagent TestAgent...