File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ function extractTextFromMessageEntry(entry: unknown, depth = 0): string {
352352 }
353353 }
354354
355- return extractTextFromValue ( entry , depth + 1 , false ) ;
355+ return extractTextFromValue ( entry , depth + 1 , false /* allow all types when falling back */ ) ;
356356}
357357
358358/**
@@ -362,6 +362,10 @@ function extractTextFromMessageEntry(entry: unknown, depth = 0): string {
362362 * from newest to oldest, returning the first user-role message with textual content.
363363 */
364364function extractTextFromAgentInput ( input : unknown ) : string {
365+ if ( input == null ) {
366+ return '' ;
367+ }
368+
365369 if ( typeof input === 'string' ) {
366370 return input . trim ( ) ;
367371 }
@@ -408,10 +412,6 @@ function extractTextFromAgentInput(input: unknown): string {
408412 }
409413 }
410414
411- if ( input == null ) {
412- return '' ;
413- }
414-
415415 return String ( input ) ;
416416}
417417
You can’t perform that action at this time.
0 commit comments