mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
feat: exclude subagent tool from code_execution filtering (#6531)
Signed-off-by: rabi <ramishra@redhat.com>
This commit is contained in:
@@ -17,6 +17,7 @@ use crate::providers::toolshim::{
|
||||
};
|
||||
|
||||
use crate::agents::code_execution_extension::EXTENSION_NAME as CODE_EXECUTION_EXTENSION;
|
||||
use crate::agents::subagent_tool::SUBAGENT_TOOL_NAME;
|
||||
#[cfg(test)]
|
||||
use crate::session::SessionType;
|
||||
use rmcp::model::Tool;
|
||||
@@ -128,7 +129,9 @@ impl Agent {
|
||||
.await;
|
||||
if code_execution_active {
|
||||
let code_exec_prefix = format!("{CODE_EXECUTION_EXTENSION}__");
|
||||
tools.retain(|tool| tool.name.starts_with(&code_exec_prefix));
|
||||
tools.retain(|tool| {
|
||||
tool.name.starts_with(&code_exec_prefix) || tool.name == SUBAGENT_TOOL_NAME
|
||||
});
|
||||
}
|
||||
|
||||
// Stable tool ordering is important for multi session prompt caching.
|
||||
|
||||
Reference in New Issue
Block a user