feat: Enable frontend tools (#1778)

This commit is contained in:
Bradley Axen
2025-04-03 14:12:42 -07:00
committed by GitHub
parent 51edc0c7af
commit c8f8963545
16 changed files with 684 additions and 132 deletions
+4 -2
View File
@@ -12,8 +12,7 @@ use super::extension::{ExtensionConfig, ExtensionResult};
use crate::message::Message;
use crate::providers::base::Provider;
use crate::session;
use mcp_core::prompt::Prompt;
use mcp_core::protocol::GetPromptResult;
use mcp_core::{prompt::Prompt, protocol::GetPromptResult, Content, ToolResult};
/// Session configuration for an agent
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -68,4 +67,7 @@ pub trait Agent: Send + Sync {
/// Get a reference to the provider used by this agent
async fn provider(&self) -> Arc<Box<dyn Provider>>;
/// Handle a tool result from the frontend
async fn handle_tool_result(&self, id: String, result: ToolResult<Vec<Content>>);
}