feat: make skills available in codemode (#6763)
This commit is contained in:
@@ -8,6 +8,7 @@ use tracing::debug;
|
||||
|
||||
use super::super::agents::Agent;
|
||||
use crate::agents::code_execution_extension::EXTENSION_NAME as CODE_EXECUTION_EXTENSION;
|
||||
use crate::agents::skills_extension::EXTENSION_NAME as SKILLS_EXTENSION;
|
||||
use crate::agents::subagent_tool::SUBAGENT_TOOL_NAME;
|
||||
use crate::conversation::message::{Message, MessageContent, ToolRequest};
|
||||
use crate::conversation::Conversation;
|
||||
@@ -126,8 +127,11 @@ impl Agent {
|
||||
.await;
|
||||
if code_execution_active {
|
||||
let code_exec_prefix = format!("{CODE_EXECUTION_EXTENSION}__");
|
||||
let skills_prefix = format!("{SKILLS_EXTENSION}__");
|
||||
tools.retain(|tool| {
|
||||
tool.name.starts_with(&code_exec_prefix) || tool.name == SUBAGENT_TOOL_NAME
|
||||
tool.name.starts_with(&code_exec_prefix)
|
||||
|| tool.name.starts_with(&skills_prefix)
|
||||
|| tool.name == SUBAGENT_TOOL_NAME
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user