agent: Show a notice when reaching consecutive tool use limits (#29833)
This PR adds a notice when reaching consecutive tool use limits when using normal mode. Here's an example with the limit artificially lowered to 2 consecutive tool uses: https://github.com/user-attachments/assets/32da8d38-67de-4d6b-8f24-754d2518e5d4 Release Notes: - agent: Added a notice when reaching consecutive tool use limits when using a model in normal mode.
This commit is contained in:
parent
10a7f2a972
commit
f0515d1c34
6 changed files with 134 additions and 25 deletions
|
@ -66,15 +66,16 @@ pub struct LanguageModelCacheConfiguration {
|
|||
|
||||
#[derive(Debug, PartialEq, Clone, Copy, Serialize, Deserialize)]
|
||||
#[serde(tag = "status", rename_all = "snake_case")]
|
||||
pub enum QueueState {
|
||||
pub enum CompletionRequestStatus {
|
||||
Queued { position: usize },
|
||||
Started,
|
||||
ToolUseLimitReached,
|
||||
}
|
||||
|
||||
/// A completion event from a language model.
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
|
||||
pub enum LanguageModelCompletionEvent {
|
||||
QueueUpdate(QueueState),
|
||||
QueueUpdate(CompletionRequestStatus),
|
||||
Stop(StopReason),
|
||||
Text(String),
|
||||
Thinking {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue