mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
feat: Modify loading indicator to support a paused state (#506)
This commit is contained in:
parent
e993181628
commit
91ee02898a
10 changed files with 542 additions and 50 deletions
|
|
@ -6,7 +6,11 @@
|
|||
|
||||
import React, { useMemo } from 'react';
|
||||
import { Box } from 'ink';
|
||||
import { IndividualToolCallDisplay, ToolCallStatus } from '../../types.js';
|
||||
import {
|
||||
IndividualToolCallDisplay,
|
||||
StreamingState,
|
||||
ToolCallStatus,
|
||||
} from '../../types.js';
|
||||
import { ToolMessage } from './ToolMessage.js';
|
||||
import { ToolConfirmationMessage } from './ToolConfirmationMessage.js';
|
||||
import { Colors } from '../../colors.js';
|
||||
|
|
@ -15,12 +19,14 @@ interface ToolGroupMessageProps {
|
|||
groupId: number;
|
||||
toolCalls: IndividualToolCallDisplay[];
|
||||
availableTerminalHeight: number;
|
||||
streamingState?: StreamingState;
|
||||
}
|
||||
|
||||
// Main component renders the border and maps the tools using ToolMessage
|
||||
export const ToolGroupMessage: React.FC<ToolGroupMessageProps> = ({
|
||||
toolCalls,
|
||||
availableTerminalHeight,
|
||||
streamingState,
|
||||
}) => {
|
||||
const hasPending = !toolCalls.every(
|
||||
(t) => t.status === ToolCallStatus.Success,
|
||||
|
|
@ -72,6 +78,7 @@ export const ToolGroupMessage: React.FC<ToolGroupMessageProps> = ({
|
|||
? 'low'
|
||||
: 'medium'
|
||||
}
|
||||
streamingState={streamingState}
|
||||
/>
|
||||
</Box>
|
||||
{tool.status === ToolCallStatus.Confirming &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue