@@ -86,7 +86,6 @@ export const dispatchRunTools = async (props: DispatchToolModuleProps): Promise<
86
86
} ) ;
87
87
88
88
// Check interactive entry
89
- const interactiveResponse = lastInteractive ;
90
89
props . node . isEntry = false ;
91
90
const hasReadFilesTool = toolNodes . some (
92
91
( item ) => item . flowNodeType === FlowNodeTypeEnum . readFiles
@@ -143,7 +142,7 @@ export const dispatchRunTools = async (props: DispatchToolModuleProps): Promise<
143
142
} )
144
143
}
145
144
] ;
146
- if ( interactiveResponse ) {
145
+ if ( lastInteractive && isEntry ) {
147
146
return value . slice ( 0 , - 2 ) ;
148
147
}
149
148
return value ;
@@ -183,7 +182,7 @@ export const dispatchRunTools = async (props: DispatchToolModuleProps): Promise<
183
182
toolModel,
184
183
maxRunToolTimes : 30 ,
185
184
messages : adaptMessages ,
186
- interactiveEntryToolParams : interactiveResponse ?. toolParams
185
+ interactiveEntryToolParams : lastInteractive ?. toolParams
187
186
} ) ;
188
187
}
189
188
if ( toolModel . functionCall ) {
@@ -194,7 +193,7 @@ export const dispatchRunTools = async (props: DispatchToolModuleProps): Promise<
194
193
toolNodes,
195
194
toolModel,
196
195
messages : adaptMessages ,
197
- interactiveEntryToolParams : interactiveResponse ?. toolParams
196
+ interactiveEntryToolParams : lastInteractive ?. toolParams
198
197
} ) ;
199
198
}
200
199
@@ -224,7 +223,7 @@ export const dispatchRunTools = async (props: DispatchToolModuleProps): Promise<
224
223
toolNodes,
225
224
toolModel,
226
225
messages : adaptMessages ,
227
- interactiveEntryToolParams : interactiveResponse ?. toolParams
226
+ interactiveEntryToolParams : lastInteractive ?. toolParams
228
227
} ) ;
229
228
} ) ( ) ;
230
229
0 commit comments