File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/lib/editor/engine/chat Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ class LlmManager {
96
96
headers : {
97
97
'anthropic-beta' : 'output-128k-2025-02-19' ,
98
98
} ,
99
+ onStepFinish : ( { toolResults } ) => {
100
+ for ( const toolResult of toolResults ) {
101
+ this . emitMessagePart ( toolResult ) ;
102
+ }
103
+ } ,
99
104
} ) ;
100
105
const streamParts : TextStreamPart < ToolSet > [ ] = [ ] ;
101
106
for await ( const partialStream of fullStream ) {
Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ export class StreamResolver {
51
51
resolveToolCallPart (
52
52
payload : TextStreamPart < ToolSet > ,
53
53
) : TextPart | ToolCallPart | ToolResultPart | null {
54
- if ( payload . type === 'tool-call' ) {
54
+ // @ts -expect-error tool-result is included
55
+ if ( payload . type === 'tool-call' || payload . type === 'tool-result' ) {
55
56
return payload ;
56
57
} else if ( payload . type === 'text-delta' ) {
57
58
const textPart = {
You can’t perform that action at this time.
0 commit comments