agent: Improve compatibility when using MCP servers with Gemini models (#28700)
WIP Release Notes: - agent: Improve compatibility when using MCPs with Gemini models
This commit is contained in:
parent
6c93d107c2
commit
2603f36737
27 changed files with 307 additions and 103 deletions
|
@ -1,5 +1,6 @@
|
|||
mod action_log;
|
||||
mod tool_registry;
|
||||
mod tool_schema;
|
||||
mod tool_working_set;
|
||||
|
||||
use std::fmt;
|
||||
|
@ -16,6 +17,7 @@ use project::Project;
|
|||
|
||||
pub use crate::action_log::*;
|
||||
pub use crate::tool_registry::*;
|
||||
pub use crate::tool_schema::*;
|
||||
pub use crate::tool_working_set::*;
|
||||
|
||||
pub fn init(cx: &mut App) {
|
||||
|
@ -51,8 +53,8 @@ pub trait Tool: 'static + Send + Sync {
|
|||
fn needs_confirmation(&self, input: &serde_json::Value, cx: &App) -> bool;
|
||||
|
||||
/// Returns the JSON schema that describes the tool's input.
|
||||
fn input_schema(&self, _: LanguageModelToolSchemaFormat) -> serde_json::Value {
|
||||
serde_json::Value::Object(serde_json::Map::default())
|
||||
fn input_schema(&self, _: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
Ok(serde_json::Value::Object(serde_json::Map::default()))
|
||||
}
|
||||
|
||||
/// Returns markdown to be displayed in the UI for this tool.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue