feat: Enhance OAuth module and OpenRouter client functionality
- Updated OAuth module to include unused imports for better clarity. - Refactored OpenRouterClient to improve chat functionality and added support for tools in chat requests. - Modified internet tools (Download, Fetch, Search) to use a more flexible internet mode check. - Introduced new Bash tools for managing background jobs (BashOutput, BashKill). - Enhanced workflow tool to parse and execute workflow scripts with arguments. - Updated status and workflow views to reflect new agent and findings counts. - Added IPC protocol definitions for client requests and state payloads.
This commit is contained in:
@@ -1,24 +1,3 @@
|
||||
use crate::tool::{ToolCtx, all_tools};
|
||||
use serde_json::Value;
|
||||
use anyhow::Result;
|
||||
|
||||
pub fn execute_tool_call(name: &str, args: &Value, ctx: &ToolCtx) -> Result<String> {
|
||||
let tools = all_tools();
|
||||
for tool in &tools {
|
||||
if tool.name() == name {
|
||||
return tool.run(ctx, args);
|
||||
}
|
||||
}
|
||||
Err(anyhow::anyhow!("tool not found: {}", name))
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
pub fn execute_deferred_tool(name: &str, args: &Value, ctx: &ToolCtx) -> Result<String> {
|
||||
let tools = all_tools();
|
||||
for tool in &tools {
|
||||
if tool.name() == name {
|
||||
return tool.run(ctx, args);
|
||||
}
|
||||
}
|
||||
Err(anyhow::anyhow!("deferred tool not found: {}", name))
|
||||
}
|
||||
// Tool execution dispatch — superseded by inline per-tool call in
|
||||
// app::runtime::actions::execute_one_tool within the SubmitInput loop.
|
||||
// This module is preserved as a placeholder.
|
||||
|
||||
Reference in New Issue
Block a user