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
|
@ -2,7 +2,7 @@ use anyhow::{Context as _, Result, anyhow};
|
|||
use assistant_tool::{ActionLog, Tool};
|
||||
use gpui::{App, Entity, Task};
|
||||
use language::{self, Anchor, Buffer, ToPointUtf16};
|
||||
use language_model::LanguageModelRequestMessage;
|
||||
use language_model::{LanguageModelRequestMessage, LanguageModelToolSchemaFormat};
|
||||
use project::{self, LspAction, Project};
|
||||
use regex::Regex;
|
||||
use schemars::JsonSchema;
|
||||
|
@ -97,10 +97,7 @@ impl Tool for CodeActionTool {
|
|||
IconName::Wand
|
||||
}
|
||||
|
||||
fn input_schema(
|
||||
&self,
|
||||
format: language_model::LanguageModelToolSchemaFormat,
|
||||
) -> serde_json::Value {
|
||||
fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result<serde_json::Value> {
|
||||
json_schema_for::<CodeActionToolInput>(format)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue