feat: make skills available in codemode (#6763)

This commit is contained in:
Michael Neale
2026-01-29 14:26:54 +11:00
committed by GitHub
parent c8b02e0cc6
commit 7ea38402a3
+5 -1
View File
@@ -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
});
}