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 21:35:39 +00:00
committed by GitHub
parent a90f80725f
commit e8208643bb
3 changed files with 58 additions and 14 deletions
+8 -5
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 {