@@ -128,7 +128,7 @@ export const axCreateDefaultColorLogger = (
128128 if ( result . thoughtBlock ?. data || result . thought ) {
129129 lines . push (
130130 cl . gray (
131- `[thought ${ result . thoughtBlock ?. encrypted ? ' (redacted)' : '' } ] ` +
131+ `[THOUGHT ${ result . thoughtBlock ?. encrypted ? ' (redacted)' : '' } ]\n ` +
132132 ( result . thoughtBlock ?. data ?? result . thought ?? '' )
133133 )
134134 ) ;
@@ -149,15 +149,24 @@ export const axCreateDefaultColorLogger = (
149149 const streamingContent =
150150 thought || typedData . value . delta || typedData . value . content || '' ;
151151 formattedMessage = thought
152- ? cl . gray ( `[thought] ${ thought } ` )
152+ ? cl . gray ( `[THOUGHT]\n ${ thought } ` )
153153 : cl . cyanBright ( streamingContent ) ;
154- return ;
154+ break ;
155155 }
156156 case 'ChatResponseStreamingDoneResult' : {
157157 formattedMessage = `\n${ cl . cyanBright ( '[ CHAT RESPONSE ]' ) } \n${ divider } \n` ;
158158 if ( typedData . value . content ) {
159159 formattedMessage += cl . cyanBright ( typedData . value . content ) ;
160160 }
161+ if ( typedData . value . thoughtBlock ?. data || typedData . value . thought ) {
162+ formattedMessage += `\n` ;
163+ formattedMessage += cl . gray (
164+ `[THOUGHT${ typedData . value . thoughtBlock ?. encrypted ? ' (redacted)' : '' } ]\n` +
165+ ( typedData . value . thoughtBlock ?. data ??
166+ typedData . value . thought ??
167+ '' )
168+ ) ;
169+ }
161170 if ( typedData . value . functionCalls ) {
162171 formattedMessage += cl . cyanBright (
163172 JSON . stringify ( typedData . value . functionCalls , null , 2 )
@@ -279,7 +288,20 @@ export const axCreateDefaultTextLogger = (
279288 case 'ChatResponseResults' :
280289 formattedMessage = '\n[ CHAT RESPONSE ]\n' ;
281290 typedData . value . forEach ( ( result , i ) => {
282- formattedMessage += result . content || '[No content]' ;
291+ const lines : string [ ] = [ ] ;
292+ if ( result . thoughtBlock ?. data || result . thought ) {
293+ lines . push (
294+ `[thought${ result . thoughtBlock ?. encrypted ? ' (redacted)' : '' } ] ` +
295+ ( result . thoughtBlock ?. data ?? result . thought ?? '' )
296+ ) ;
297+ }
298+ if ( result . content ) {
299+ lines . push ( result . content ) ;
300+ }
301+ if ( lines . length === 0 ) {
302+ lines . push ( '[No content]' ) ;
303+ }
304+ formattedMessage += lines . join ( '\n' ) ;
283305 if ( i < typedData . value . length - 1 )
284306 formattedMessage += `\n${ divider } \n` ;
285307 } ) ;
@@ -296,6 +318,14 @@ export const axCreateDefaultTextLogger = (
296318 if ( typedData . value . content ) {
297319 formattedMessage += typedData . value . content ;
298320 }
321+ if ( typedData . value . thoughtBlock ?. data || typedData . value . thought ) {
322+ formattedMessage += `\n` ;
323+ formattedMessage +=
324+ `[thought${ typedData . value . thoughtBlock ?. encrypted ? ' (redacted)' : '' } ] ` +
325+ ( typedData . value . thoughtBlock ?. data ??
326+ typedData . value . thought ??
327+ '' ) ;
328+ }
299329 if ( typedData . value . functionCalls ) {
300330 formattedMessage += JSON . stringify (
301331 typedData . value . functionCalls ,
0 commit comments