Skip to content

Commit c3b5d63

Browse files
baxenampcode-com
andcommitted
address comments
Amp-Thread-ID: https://ampcode.com/threads/T-019c548c-70ef-76f5-b64d-3dca51658b9f Co-authored-by: Amp <amp@ampcode.com>
1 parent b1641b3 commit c3b5d63

File tree

5 files changed

+635
-539
lines changed

5 files changed

+635
-539
lines changed

crates/goose/src/agents/agent.rs

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ use super::final_output_tool::FinalOutputTool;
1313
use super::platform_tools;
1414
use super::tool_execution::{ToolCallResult, CHAT_MODE_TOOL_SKIPPED_RESPONSE, DECLINED_RESPONSE};
1515
use crate::action_required_manager::ActionRequiredManager;
16-
use crate::agents::code_summary_tool::{
17-
create_summarize_tool, handle_summarize_tool, SUMMARIZE_TOOL_NAME,
18-
};
1916
use crate::agents::extension::{ExtensionConfig, ExtensionResult, ToolInfo};
2017
use crate::agents::extension_manager::{get_parameter_names, ExtensionManager};
2118
use crate::agents::extension_manager_extension::MANAGE_EXTENSIONS_TOOL_NAME_COMPLETE;
@@ -511,34 +508,7 @@ impl Agent {
511508
}
512509

513510
debug!("WAITING_TOOL_START: {}", tool_call.name);
514-
let result: ToolCallResult = if tool_call.name == SUMMARIZE_TOOL_NAME {
515-
let provider = match self.provider().await {
516-
Ok(p) => p,
517-
Err(e) => {
518-
return (
519-
request_id,
520-
Err(ErrorData::new(
521-
ErrorCode::INTERNAL_ERROR,
522-
format!("Failed to get provider: {}", e),
523-
None,
524-
)),
525-
);
526-
}
527-
};
528-
529-
let arguments = tool_call
530-
.arguments
531-
.clone()
532-
.map(Value::Object)
533-
.unwrap_or(Value::Object(serde_json::Map::new()));
534-
535-
handle_summarize_tool(
536-
provider,
537-
session.id.clone(),
538-
arguments,
539-
session.working_dir.clone(),
540-
)
541-
} else if self.is_frontend_tool(&tool_call.name).await {
511+
let result: ToolCallResult = if self.is_frontend_tool(&tool_call.name).await {
542512
// For frontend tools, return an error indicating we need frontend execution
543513
ToolCallResult::from(Err(ErrorData::new(
544514
ErrorCode::INTERNAL_ERROR,
@@ -790,7 +760,7 @@ impl Agent {
790760
prefixed_tools.push(final_output_tool.tool());
791761
}
792762

793-
prefixed_tools.push(create_summarize_tool());
763+
794764
}
795765

796766
prefixed_tools

0 commit comments

Comments
 (0)