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(
2121 arguments : removeClosingTag ( "arguments" , toolArgs ) ,
2222 } )
2323
24- await cline . ask ( "tool" , partialMessage , toolUse . partial ) . catch ( ( ) => { } )
24+ await cline . ask ( "tool" , partialMessage , toolUse . partial ) . catch ( ( ) => { } )
2525 return
2626 }
2727
@@ -86,7 +86,17 @@ export async function useVSCLMT(
8686
8787 // Format the result for display
8888 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" ) {
90100 resultText = result
91101 } else if ( result && typeof result === "object" ) {
92102 resultText = JSON . stringify ( result , null , 2 )
You can’t perform that action at this time.
0 commit comments