@@ -45,6 +45,10 @@ export const ToolMessageBlock = ({ message, onRemove, compact = false, onFork, o
4545 const getToolLabel = ( message : ToolMessage ) : ReactNode => {
4646 const defaultLabel = ( ) => t ( 'toolMessage.toolLabel' , { server : formatName ( message . serverName ) , tool : formatName ( message . toolName ) } ) ;
4747
48+ if ( isStreaming ) {
49+ return defaultLabel ( ) ;
50+ }
51+
4852 switch ( message . serverName ) {
4953 case AIDER_TOOL_GROUP_NAME :
5054 switch ( message . toolName ) {
@@ -177,20 +181,15 @@ export const ToolMessageBlock = ({ message, onRemove, compact = false, onFork, o
177181
178182 const content = (
179183 < div className = "text-2xs whitespace-pre-wrap text-text-tertiary bg-bg-secondary relative p-3" >
180- { Object . keys ( message . args ) . length > 0 && (
184+ { ! isStreaming && Object . keys ( message . args ) . length > 0 && (
181185 < div className = "mb-3" >
182- < div className = "font-semibold mb-1 text-text-secondary" >
183- { t ( 'toolMessage.arguments' ) }
184- { isStreaming && < span className = "ml-2 text-text-muted-light italic font-normal text-2xs" > { t ( 'toolMessage.preparing' ) } </ span > }
185- </ div >
186- < pre
187- className = { `whitespace-pre-wrap max-h-[400px] overflow-y-auto scrollbar-thin scrollbar-track-bg-primary-light scrollbar-thumb-bg-secondary-light hover:scrollbar-thumb-bg-fourth bg-bg-primary-light p-2 rounded text-text-secondary text-2xs${ isStreaming ? ' animate-pulse' : '' } ` }
188- >
186+ < div className = "font-semibold mb-1 text-text-secondary" > { t ( 'toolMessage.arguments' ) } </ div >
187+ < pre className = "whitespace-pre-wrap max-h-[400px] overflow-y-auto scrollbar-thin scrollbar-track-bg-primary-light scrollbar-thumb-bg-secondary-light hover:scrollbar-thumb-bg-fourth bg-bg-primary-light p-2 rounded text-text-secondary text-2xs" >
189188 { JSON . stringify ( message . args , null , 2 ) }
190189 </ pre >
191190 </ div >
192191 ) }
193- { isStreaming && Object . keys ( message . args ) . length === 0 ? (
192+ { isStreaming ? (
194193 < div className = "text-xs italic text-text-muted-light" > { t ( 'toolMessage.preparing' ) } </ div >
195194 ) : isExecuting ? (
196195 < div className = "text-xs italic text-text-muted-light" > { t ( 'toolMessage.executing' ) } </ div >
@@ -215,7 +214,7 @@ export const ToolMessageBlock = ({ message, onRemove, compact = false, onFork, o
215214 </ div >
216215 </ div >
217216 { /* Tool Specific Content */ }
218- { renderToolSpecificContent ( ) }
217+ { ! isStreaming && renderToolSpecificContent ( ) }
219218 </ div >
220219 ) ;
221220
0 commit comments