mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Interrupt API request if user executes tool
This commit is contained in:
@@ -1910,13 +1910,13 @@ export class Cline {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
// we need to let the request finish for openrouter to get generation details
|
// PREV: we need to let the request finish for openrouter to get generation details
|
||||||
// if (this.didAlreadyUseTool) {
|
// UPDATE: it's better UX to interrupt the request at the cost of the api cost not being retrieved
|
||||||
// // a tool has been called, so interrupt the assistant's response to present the user's feedback
|
if (this.didAlreadyUseTool) {
|
||||||
// assistantMessage +=
|
assistantMessage +=
|
||||||
// "\n\n[Response interrupted by a tool use. Only one tool may be used per message.]"
|
"\n\n[Response interrupted by a tool use result. Only one tool may be used at a time and should be placed at the end of the message.]"
|
||||||
// break
|
break
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// abandoned happens when extension is no longer waiting for the cline instance to finish aborting (error is thrown here when any function in the for loop throws due to this.abort)
|
// abandoned happens when extension is no longer waiting for the cline instance to finish aborting (error is thrown here when any function in the for loop throws due to this.abort)
|
||||||
|
|||||||
Reference in New Issue
Block a user