Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent2: Use inline enums in `now` and `edit_file` tools JSON schema (#37397)
Francisd677c98f437c
diff --git a/crates/agent2/src/tools/edit_file_tool.rs b/crates/agent2/src/tools/edit_file_tool.rsindex f86bfd25f74..ae37dc1f134 100644--- a/crates/agent2/src/tools/edit_file_tool.rs+++ b/crates/agent2/src/tools/edit_file_tool.rs@@ -83,6 +83,7 @@ struct EditFileToolPartialInput {#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)]#[serde(rename_all = "lowercase")]+#[schemars(inline)]pub enum EditFileMode {Edit,Create,diff --git a/crates/agent2/src/tools/now_tool.rs b/crates/agent2/src/tools/now_tool.rsindex 9467e7db68b..49068be0dd9 100644--- a/crates/agent2/src/tools/now_tool.rs+++ b/crates/agent2/src/tools/now_tool.rs@@ -11,6 +11,7 @@ use crate::{AgentTool, ToolCallEventStream};#[derive(Debug, Serialize, Deserialize, JsonSchema)]#[serde(rename_all = "snake_case")]+#[schemars(inline)]pub enum Timezone {/// Use UTC for the datetime.Utc,