File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -2874,8 +2874,16 @@ export class Cline extends EventEmitter<ClineEvents> {
28742874 } )
28752875 . filter ( Boolean )
28762876 . join ( "\n\n" ) || "(Empty response)"
2877- await this . say ( "mcp_server_response" , resourceResultPretty )
2878- pushToolResult ( formatResponse . toolResult ( resourceResultPretty ) )
2877+
2878+ // handle images (image must contain mimetype and blob)
2879+ let images : string [ ] = [ ]
2880+ resourceResult ?. contents . forEach ( ( item ) => {
2881+ if ( item . mimeType ?. startsWith ( "image" ) && item . blob ) {
2882+ images . push ( item . blob )
2883+ }
2884+ } ) ;
2885+ await this . say ( "mcp_server_response" , resourceResultPretty , images )
2886+ pushToolResult ( formatResponse . toolResult ( resourceResultPretty , images ) )
28792887 break
28802888 }
28812889 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments