assistant2: Remove "Tools" switch (#26485)

This PR removes the "Tools" switch from Assistant 2, as we can manage
tools from the tool selector now.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-03-11 17:46:51 -04:00 committed by GitHub
parent 2b94a35aaa
commit d43bcc04db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 34 deletions

View file

@ -342,12 +342,10 @@ impl Thread {
&mut self,
model: Arc<dyn LanguageModel>,
request_kind: RequestKind,
use_tools: bool,
cx: &mut Context<Self>,
) {
let mut request = self.to_completion_request(request_kind, cx);
if use_tools {
request.tools = {
let mut tools = Vec::new();
if self.tools.is_scripting_tool_enabled() {
@ -366,8 +364,8 @@ impl Thread {
}
}));
request.tools = tools;
}
tools
};
self.stream_completion(request, model, cx);
}
@ -753,7 +751,7 @@ impl Thread {
Vec::new(),
cx,
);
self.send_to_model(model, RequestKind::Chat, true, cx);
self.send_to_model(model, RequestKind::Chat, cx);
}
/// Cancels the last pending completion, if there are any pending.