@@ -12,10 +12,11 @@ import type {
1212 SubagentToolResponseHistoryItem ,
1313 SubagentThoughtHistoryItem ,
1414 SubagentToolSummaryHistoryItem ,
15+ DynamicToolCallChunkHistoryItem ,
1516} from '../../types.js' ;
1617import { MarkdownDisplay } from '../../utils/MarkdownDisplay.js' ;
1718import { SubagentToolCallDisplay } from './SubagentToolCallDisplay.js' ;
18- import { debugLogger } from '@google/gemini-cli-core' ;
19+ // import { debugLogger } from '@google/gemini-cli-core';
1920
2021interface SubagentHistoryDisplayProps {
2122 history : SubagentHistoryItem [ ] ;
@@ -27,6 +28,7 @@ type SubagentTurn = {
2728 toolCall ?: SubagentToolCallHistoryItem ;
2829 toolResponse ?: SubagentToolResponseHistoryItem ;
2930 toolSummary ?: SubagentToolSummaryHistoryItem ;
31+ dynamicToolCall ?: DynamicToolCallChunkHistoryItem ;
3032 subagentHistory ?: SubagentHistoryItem [ ] ;
3133} ;
3234
@@ -93,6 +95,13 @@ export const SubagentHistoryDisplay: React.FC<SubagentHistoryDisplayProps> = ({
9395 lastTurn . thought = item ;
9496 }
9597 break ;
98+ case 'dynamic_tool_call_chunk' :
99+ // debugLogger.log('overriding dynamic tool call chunk');
100+ lastTurn . dynamicToolCall = {
101+ type : 'dynamic_tool_call_chunk' ,
102+ data : { chunk : item . data . chunk } ,
103+ } ;
104+ break ;
96105 case 'tool_call' :
97106 if ( lastTurn . toolCall ) {
98107 acc . push ( { toolCall : item } ) ;
@@ -108,7 +117,7 @@ export const SubagentHistoryDisplay: React.FC<SubagentHistoryDisplayProps> = ({
108117 break ;
109118 case 'tool_summary_chunk' :
110119 // Overwrite the previous toolSummary with the new chunk, enabling streaming.
111- debugLogger . log ( 'overriding tool summary chunk' ) ;
120+ // debugLogger.log('overriding tool summary chunk');
112121 lastTurn . toolSummary = {
113122 type : 'tool_summary' ,
114123 data : { summary : item . data . summary } ,
@@ -195,6 +204,20 @@ export const SubagentHistoryDisplay: React.FC<SubagentHistoryDisplayProps> = ({
195204 />
196205 </ Box >
197206 ) }
207+ { turn . dynamicToolCall && (
208+ < Box
209+ flexDirection = "column"
210+ marginBottom = { 1 }
211+ width = { availableWidth }
212+ borderStyle = "single"
213+ borderColor = "green"
214+ paddingX = { 1 }
215+ paddingY = { 0 }
216+ >
217+ < Text color = "green" > Generating Tool Call:</ Text >
218+ < Text > { turn . dynamicToolCall . data . chunk } </ Text >
219+ </ Box >
220+ ) }
198221 { turn . toolCall && (
199222 < Box width = { availableWidth } >
200223 < SubagentToolCallDisplay
0 commit comments