mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 20:04:55 +00:00
feat(ai): interrupt tool batch on queued messages
This commit is contained in:
parent
6a319f9c3c
commit
117af076c4
3 changed files with 242 additions and 6 deletions
|
|
@ -795,6 +795,8 @@ The Agent API streams events during execution, allowing you to build reactive UI
|
|||
|
||||
This continues until the assistant produces a response without tool calls.
|
||||
|
||||
**Queued messages**: If you provide `getQueuedMessages` in the loop config, the agent checks for queued user messages after each tool call. When queued messages are found, any remaining tool calls from the current assistant message are skipped and returned as error tool results (`isError: true`) with the message "Skipped due to queued user message." The queued user messages are injected before the next assistant response.
|
||||
|
||||
### Event Flow Example
|
||||
|
||||
Given a prompt asking to calculate two expressions and sum them:
|
||||
|
|
@ -1139,4 +1141,4 @@ If you get "The requested model is not supported" error, enable the model manual
|
|||
|
||||
## License
|
||||
|
||||
MIT
|
||||
MIT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue