File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export async function useVSCLMT(
21
21
arguments : removeClosingTag ( "arguments" , toolArgs ) ,
22
22
} )
23
23
24
- await cline . ask ( "tool" , partialMessage , toolUse . partial ) . catch ( ( ) => { } )
24
+ await cline . ask ( "tool" , partialMessage , toolUse . partial ) . catch ( ( ) => { } )
25
25
return
26
26
}
27
27
@@ -86,7 +86,17 @@ export async function useVSCLMT(
86
86
87
87
// Format the result for display
88
88
let resultText : string
89
- if ( typeof result === "string" ) {
89
+ if ( result instanceof vscode . LanguageModelToolResult ) {
90
+ resultText = result . content
91
+ . map ( part => {
92
+ if ( typeof part === 'object' && part !== null && 'value' in part && typeof part . value === 'string' ) {
93
+ // Assuming LanguageModelTextPart
94
+ return part . value
95
+ }
96
+ return String ( part )
97
+ } )
98
+ . join ( '\n\n' )
99
+ } else if ( typeof result === "string" ) {
90
100
resultText = result
91
101
} else if ( result && typeof result === "object" ) {
92
102
resultText = JSON . stringify ( result , null , 2 )
You can’t perform that action at this time.
0 commit comments