File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ async function callSearchTool(client: Client): Promise<void> {
7373 } ;
7474 const searchResult = await client . request ( searchRequest , CallToolResultSchema ) ;
7575 log . debug ( 'Search result:' ) ;
76- searchResult . content . forEach ( ( item ) => {
76+ const resultContent = searchResult . content || [ ] ;
77+ resultContent . forEach ( ( item ) => {
7778 if ( item . type === 'text' ) {
7879 log . debug ( `\t${ item . text } ` ) ;
7980 }
@@ -95,7 +96,8 @@ async function callActor(client: Client): Promise<void> {
9596 } ;
9697 const actorResult = await client . request ( actorRequest , CallToolResultSchema ) ;
9798 log . debug ( 'Actor results:' ) ;
98- actorResult . content . forEach ( ( item ) => {
99+ const resultContent = actorResult . content || [ ] ;
100+ resultContent . forEach ( ( item ) => {
99101 if ( item . type === 'text' ) {
100102 log . debug ( `- ${ item . text } ` ) ;
101103 }
You can’t perform that action at this time.
0 commit comments