assistant2: Show scripting tool in the tool selector (#26484)

This PR adds the scripting tool to the tool selector.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-03-11 17:35:39 -04:00 committed by GitHub
parent a90f80725f
commit e8208643bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 58 additions and 14 deletions

View file

@ -349,11 +349,14 @@ impl Thread {
if use_tools {
let mut tools = Vec::new();
tools.push(LanguageModelRequestTool {
name: ScriptingTool::NAME.into(),
description: ScriptingTool::DESCRIPTION.into(),
input_schema: ScriptingTool::input_schema(),
});
if self.tools.is_scripting_tool_enabled() {
tools.push(LanguageModelRequestTool {
name: ScriptingTool::NAME.into(),
description: ScriptingTool::DESCRIPTION.into(),
input_schema: ScriptingTool::input_schema(),
});
}
tools.extend(self.tools().enabled_tools(cx).into_iter().map(|tool| {
LanguageModelRequestTool {