agent: Generate a notification when reaching tool use limit (#31894)
When reaching the consecutive tool call limit, the agent gets blocked and without a notification, you wouldn't know that. This PR adds the ability to be notified when that happens, and you can use either sound _and_ toast, or just one of them. Release Notes: - agent: Added support for getting notified (via toast and/or sound) when reaching the consecutive tool call limit.
This commit is contained in:
parent
b16911e756
commit
63c1033448
4 changed files with 13 additions and 0 deletions
|
@ -1673,6 +1673,7 @@ impl Thread {
|
|||
}
|
||||
CompletionRequestStatus::ToolUseLimitReached => {
|
||||
thread.tool_use_limit_reached = true;
|
||||
cx.emit(ThreadEvent::ToolUseLimitReached);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2843,6 +2844,7 @@ pub enum ThreadEvent {
|
|||
},
|
||||
CheckpointChanged,
|
||||
ToolConfirmationNeeded,
|
||||
ToolUseLimitReached,
|
||||
CancelEditing,
|
||||
CompletionCanceled,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue