mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 03:54:43 -07:00
feat(core): add support for MCP progress updates (#19046)
This commit is contained in:
@@ -320,4 +320,31 @@ describe('<ToolMessage />', () => {
|
||||
);
|
||||
expect(lastFrame()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders progress information appended to description for executing tools', () => {
|
||||
const { lastFrame } = renderWithContext(
|
||||
<ToolMessage
|
||||
{...baseProps}
|
||||
status={CoreToolCallStatus.Executing}
|
||||
progressMessage="Working on it..."
|
||||
progressPercent={42}
|
||||
/>,
|
||||
StreamingState.Responding,
|
||||
);
|
||||
expect(lastFrame()).toContain(
|
||||
'A tool for testing (Working on it... - 42%)',
|
||||
);
|
||||
});
|
||||
|
||||
it('renders only percentage when progressMessage is missing', () => {
|
||||
const { lastFrame } = renderWithContext(
|
||||
<ToolMessage
|
||||
{...baseProps}
|
||||
status={CoreToolCallStatus.Executing}
|
||||
progressPercent={75}
|
||||
/>,
|
||||
StreamingState.Responding,
|
||||
);
|
||||
expect(lastFrame()).toContain('A tool for testing (75%)');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user