E2E Claude tests (#34702)
- **Fix cancellation of tool calls** - **Make tool_call test more resilient** - **Fix tool call confirmation test** Release Notes: - N/A
This commit is contained in:
parent
fd05f17fa7
commit
cfe1adc792
6 changed files with 188 additions and 38 deletions
|
@ -664,7 +664,7 @@ impl AcpThread {
|
|||
cx: &mut Context<Self>,
|
||||
) -> Result<ToolCallRequest> {
|
||||
let project = self.project.read(cx).languages().clone();
|
||||
let Some((_, call)) = self.tool_call_mut(tool_call_id) else {
|
||||
let Some((idx, call)) = self.tool_call_mut(tool_call_id) else {
|
||||
anyhow::bail!("Tool call not found");
|
||||
};
|
||||
|
||||
|
@ -675,6 +675,8 @@ impl AcpThread {
|
|||
respond_tx: tx,
|
||||
};
|
||||
|
||||
cx.emit(AcpThreadEvent::EntryUpdated(idx));
|
||||
|
||||
Ok(ToolCallRequest {
|
||||
id: tool_call_id,
|
||||
outcome: rx,
|
||||
|
@ -768,8 +770,13 @@ impl AcpThread {
|
|||
let language_registry = self.project.read(cx).languages().clone();
|
||||
let (ix, call) = self.tool_call_mut(id).context("Entry not found")?;
|
||||
|
||||
call.content = new_content
|
||||
.map(|new_content| ToolCallContent::from_acp(new_content, language_registry, cx));
|
||||
if let Some(new_content) = new_content {
|
||||
call.content = Some(ToolCallContent::from_acp(
|
||||
new_content,
|
||||
language_registry,
|
||||
cx,
|
||||
));
|
||||
}
|
||||
|
||||
match &mut call.status {
|
||||
ToolCallStatus::Allowed { status } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue