zed/crates/agent
Bennet Bo Fenner 9955c4579d
agent: Simplify tool schemas for enums (#55763)
Previously schemars generated oneOf variants for these enums (because we
added inline comments), making the schemas more complicated than they
had to be.

E.g. `edit_file` `mode`

Before:
```json
{
  "mode": {
    "description": "The mode of operation on the file. Possible values:\n- 'write': Replace the entire contents of the file. If the file doesn't exist, it will be created. Requires 'content' field.\n- 'edit': Make granular edits to an existing file. Requires 'edits' field.\n\nWhen a file already exists or you just created it, prefer editing it as opposed to recreating it from scratch.",
    "oneOf": [
      {
        "description": "Overwrite the file with new content (replacing any existing content).\nIf the file does not exist, it will be created.",
        "type": "string",
        "const": "write"
      },
      {
        "description": "Make granular edits to an existing file",
        "type": "string",
        "const": "edit"
      }
    ]
  }
}
```

After:
```json
{
  "mode": {
    "description": "The mode of operation on the file. Possible values:\n- 'write': Replace the entire contents of the file. If the file doesn't exist, it will be created. Requires 'content' field.\n- 'edit': Make granular edits to an existing file. Requires 'edits' field.\n\nWhen a file already exists or you just created it, prefer editing it as opposed to recreating it from scratch.",
    "type": "string",
    "enum": ["write", "edit"]
  }
}
```

Release Notes:

- N/A
2026-05-05 12:39:41 +00:00
..
src agent: Simplify tool schemas for enums (#55763) 2026-05-05 12:39:41 +00:00
Cargo.toml agent: Remove old edit file tool (#55612) 2026-05-04 09:54:39 +00:00
LICENSE-GPL Rename assistant2 to agent (#27887) 2025-04-02 00:40:47 +00:00