mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix: misaligned right border on tool calls ui and spacing in multiple tool calls ui (#6941)
This commit is contained in:
@@ -80,6 +80,7 @@ export const ToolGroupMessage: React.FC<ToolGroupMessageProps> = ({
|
|||||||
marginLeft={1}
|
marginLeft={1}
|
||||||
borderDimColor={hasPending}
|
borderDimColor={hasPending}
|
||||||
borderColor={borderColor}
|
borderColor={borderColor}
|
||||||
|
gap={1}
|
||||||
>
|
>
|
||||||
{toolCalls.map((tool) => {
|
{toolCalls.map((tool) => {
|
||||||
const isConfirming = toolAwaitingApproval?.callId === tool.callId;
|
const isConfirming = toolAwaitingApproval?.callId === tool.callId;
|
||||||
|
|||||||
@@ -71,19 +71,19 @@ describe('<ToolMessage />', () => {
|
|||||||
StreamingState.Idle,
|
StreamingState.Idle,
|
||||||
);
|
);
|
||||||
const output = lastFrame();
|
const output = lastFrame();
|
||||||
expect(output).toContain('✔'); // Success indicator
|
expect(output).toContain('√'); // Success indicator
|
||||||
expect(output).toContain('test-tool');
|
expect(output).toContain('test-tool');
|
||||||
expect(output).toContain('A tool for testing');
|
expect(output).toContain('A tool for testing');
|
||||||
expect(output).toContain('MockMarkdown:Test result');
|
expect(output).toContain('MockMarkdown:Test result');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('ToolStatusIndicator rendering', () => {
|
describe('ToolStatusIndicator rendering', () => {
|
||||||
it('shows ✔ for Success status', () => {
|
it('shows √ for Success status', () => {
|
||||||
const { lastFrame } = renderWithContext(
|
const { lastFrame } = renderWithContext(
|
||||||
<ToolMessage {...baseProps} status={ToolCallStatus.Success} />,
|
<ToolMessage {...baseProps} status={ToolCallStatus.Success} />,
|
||||||
StreamingState.Idle,
|
StreamingState.Idle,
|
||||||
);
|
);
|
||||||
expect(lastFrame()).toContain('✔');
|
expect(lastFrame()).toContain('√');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows o for Pending status', () => {
|
it('shows o for Pending status', () => {
|
||||||
@@ -125,7 +125,7 @@ describe('<ToolMessage />', () => {
|
|||||||
);
|
);
|
||||||
expect(lastFrame()).toContain('⊷');
|
expect(lastFrame()).toContain('⊷');
|
||||||
expect(lastFrame()).not.toContain('MockRespondingSpinner');
|
expect(lastFrame()).not.toContain('MockRespondingSpinner');
|
||||||
expect(lastFrame()).not.toContain('✔');
|
expect(lastFrame()).not.toContain('√');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows paused spinner for Executing status when streamingState is WaitingForConfirmation', () => {
|
it('shows paused spinner for Executing status when streamingState is WaitingForConfirmation', () => {
|
||||||
@@ -135,7 +135,7 @@ describe('<ToolMessage />', () => {
|
|||||||
);
|
);
|
||||||
expect(lastFrame()).toContain('⊷');
|
expect(lastFrame()).toContain('⊷');
|
||||||
expect(lastFrame()).not.toContain('MockRespondingSpinner');
|
expect(lastFrame()).not.toContain('MockRespondingSpinner');
|
||||||
expect(lastFrame()).not.toContain('✔');
|
expect(lastFrame()).not.toContain('√');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows MockRespondingSpinner for Executing status when streamingState is Responding', () => {
|
it('shows MockRespondingSpinner for Executing status when streamingState is Responding', () => {
|
||||||
@@ -144,7 +144,7 @@ describe('<ToolMessage />', () => {
|
|||||||
StreamingState.Responding, // Simulate app still responding
|
StreamingState.Responding, // Simulate app still responding
|
||||||
);
|
);
|
||||||
expect(lastFrame()).toContain('MockRespondingSpinner');
|
expect(lastFrame()).toContain('MockRespondingSpinner');
|
||||||
expect(lastFrame()).not.toContain('✔');
|
expect(lastFrame()).not.toContain('√');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ const ToolStatusIndicator: React.FC<ToolStatusIndicatorProps> = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{status === ToolCallStatus.Success && (
|
{status === ToolCallStatus.Success && (
|
||||||
<Text color={Colors.AccentGreen}>✔</Text>
|
<Text color={Colors.AccentGreen}>√</Text>
|
||||||
)}
|
)}
|
||||||
{status === ToolCallStatus.Confirming && (
|
{status === ToolCallStatus.Confirming && (
|
||||||
<Text color={Colors.AccentYellow}>?</Text>
|
<Text color={Colors.AccentYellow}>?</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user