Refactor ToolCallStatus enum to flat variants (#36356)
Replace nested Allowed variant with distinct statuses for clearer status handling. Release Notes: - N/A
This commit is contained in:
parent
da8a692ec0
commit
5895fac377
3 changed files with 72 additions and 70 deletions
|
@ -134,7 +134,9 @@ pub async fn test_tool_call(server: impl AgentServer + 'static, cx: &mut TestApp
|
|||
matches!(
|
||||
entry,
|
||||
AgentThreadEntry::ToolCall(ToolCall {
|
||||
status: ToolCallStatus::Allowed { .. },
|
||||
status: ToolCallStatus::Pending
|
||||
| ToolCallStatus::InProgress
|
||||
| ToolCallStatus::Completed,
|
||||
..
|
||||
})
|
||||
)
|
||||
|
@ -212,7 +214,9 @@ pub async fn test_tool_call_with_permission(
|
|||
assert!(thread.entries().iter().any(|entry| matches!(
|
||||
entry,
|
||||
AgentThreadEntry::ToolCall(ToolCall {
|
||||
status: ToolCallStatus::Allowed { .. },
|
||||
status: ToolCallStatus::Pending
|
||||
| ToolCallStatus::InProgress
|
||||
| ToolCallStatus::Completed,
|
||||
..
|
||||
})
|
||||
)));
|
||||
|
@ -223,7 +227,9 @@ pub async fn test_tool_call_with_permission(
|
|||
thread.read_with(cx, |thread, cx| {
|
||||
let AgentThreadEntry::ToolCall(ToolCall {
|
||||
content,
|
||||
status: ToolCallStatus::Allowed { .. },
|
||||
status: ToolCallStatus::Pending
|
||||
| ToolCallStatus::InProgress
|
||||
| ToolCallStatus::Completed,
|
||||
..
|
||||
}) = thread
|
||||
.entries()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue