Commit log

92d6ee1 zed 0.184.7

Joseph T. Lyons created

6b221fb Derive Default for TaskId and SpawnInTerminal

Click to expand commit body
These were made Default in #29208, but rather than pull that entire commit in to fix this, I'm resolving manually.

Joseph T. Lyons created

6406105 agent: Add icon for Zed's max mode (#29610)

Click to expand commit body
Release Notes:

- N/A

Danilo Leal created

9bd7dcb agent: Enrich `grep` tool output with syntax information (#29601)

Click to expand commit body
The `grep` tool used to include 4 lines of context around the match, but
the lines included would often be unhelpful. This PR improves this
behavior by using the range of the parent syntax node that contains the
full line(s) matched.

The match headers will also now include symbol breadcrumbs so that the
model can already gather code structure before/without reading files.

````md
### impl GitRepository for RealGitRepository β€Ί fn compare_checkpoints β€Ί L1278-1284
```rust
                let result = git
                    .run(&[
                        "diff-tree",
                        "--quiet",
                        &left.commit_sha.to_string(),
                        &right.commit_sha.to_string(),
                    ])
```
````

This positively impacts the `add_arg_to_trait_method` eval example with
better diff output, fewer tool failures, and reduced total turns.

Note: We have some plans to use a an "elision" approach where we would
combine all matches for a given file, skipping lines between them while
keeping symbol declaration lines. The theory is that this would be map
more closely to the expected input for edits. For now, this PR is a
significant improvement.

Release Notes:

- Agent: Enrich `grep` tool output with syntax information

Agus Zubiaga created

597eb8f bedrock: Preserve thinking blocks for Bedrock (#29602)

Click to expand commit body
Fixes a regression from #29055, resolves #29290

Release Notes:

- agent: Fixed a regression that rendered Claude 3.7 Thinking unusable
on Bedrock.

Shardul Vaidya created

c14313e agent: Create `TerminalToolCard` and display shell output while it's running (#29546)

Click to expand commit body
Also, don't require a worktree to run the terminal tool.

Release Notes:

- N/A

JoΓ£o Marcos created

1bc14b7 language_models: Change default fast model for Zed provider (#29600)

Click to expand commit body
This PR changes the default fast model for the Zed provider from Claude
3.5 Haiku to Claude 3.5 Sonnet.

We don't offer Claude 3.5 Haiku to users.

Closes https://github.com/zed-industries/zed/issues/29505.

Release Notes:

- agent: Changed the default fast model for the Zed provider to Claude
3.5 Sonnet.

Marshall Bowers created

a108c68 Re-add code block formatting instructions (#29574)

Click to expand commit body
Re-enabled instructions about code block formatting.

In practice, the model doesn't seem to use these very often, but there's
no negative effect on evals. In a future PR, I'll experiment with adding
more evals around the model actually using the code blocks.

2 runs before: (`--repetitions=8`)
```
=================================================================
                            AGGREGATE
=================================================================


4 examples failed to run!
Average programmatic score: 37%
Average diff score: 66%
Average thread score: 93%


-----------------------------------------------------------------
                     CUMULATIVE TOOL METRICS
-----------------------------------------------------------------

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             Tool             β”‚   Uses   β”‚ Failures β”‚   Rate   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚edit_file                     β”‚   398    β”‚    53    β”‚   13%    β”‚
β”‚terminal                      β”‚    11    β”‚    1     β”‚    9%    β”‚
β”‚create_file                   β”‚    40    β”‚    2     β”‚    5%    β”‚
β”‚read_file                     β”‚   245    β”‚    8     β”‚    3%    β”‚
β”‚find_path                     β”‚    48    β”‚    0     β”‚    0%    β”‚
β”‚list_directory                β”‚    13    β”‚    0     β”‚    0%    β”‚
β”‚grep                          β”‚   133    β”‚    0     β”‚    0%    β”‚
β”‚thinking                      β”‚    18    β”‚    0     β”‚    0%    β”‚
β”‚diagnostics                   β”‚   130    β”‚    0     β”‚    0%    β”‚
```

```
=================================================================
                            AGGREGATE
=================================================================


1 examples failed to run!
Average programmatic score: 41%
Average diff score: 68%
Average thread score: 96%


-----------------------------------------------------------------
                     CUMULATIVE TOOL METRICS
-----------------------------------------------------------------

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             Tool             β”‚   Uses   β”‚ Failures β”‚   Rate   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚fetch                         β”‚    1     β”‚    1     β”‚   100%   β”‚
β”‚edit_file                     β”‚   553    β”‚    63    β”‚   11%    β”‚
β”‚read_file                     β”‚   349    β”‚    3     β”‚    1%    β”‚
β”‚diagnostics                   β”‚   158    β”‚    0     β”‚    0%    β”‚
β”‚find_path                     β”‚    70    β”‚    0     β”‚    0%    β”‚
β”‚list_directory                β”‚    10    β”‚    0     β”‚    0%    β”‚
β”‚thinking                      β”‚    45    β”‚    0     β”‚    0%    β”‚
β”‚grep                          β”‚   213    β”‚    0     β”‚    0%    β”‚
β”‚create_file                   β”‚    24    β”‚    0     β”‚    0%    β”‚
β”‚terminal                      β”‚    17    β”‚    0     β”‚    0%    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

1 run after this change:

```
=================================================================
                            AGGREGATE
=================================================================

Average programmatic score: 42%
Average diff score: 74%
Average thread score: 100%


-----------------------------------------------------------------
                     CUMULATIVE TOOL METRICS
-----------------------------------------------------------------

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             Tool             β”‚   Uses   β”‚ Failures β”‚   Rate   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚edit_file                     β”‚   534    β”‚    92    β”‚   17%    β”‚
β”‚read_file                     β”‚   325    β”‚    6     β”‚    2%    β”‚
β”‚list_directory                β”‚    6     β”‚    0     β”‚    0%    β”‚
β”‚thinking                      β”‚    12    β”‚    0     β”‚    0%    β”‚
β”‚create_file                   β”‚    16    β”‚    0     β”‚    0%    β”‚
β”‚diagnostics                   β”‚    49    β”‚    0     β”‚    0%    β”‚
β”‚grep                          β”‚   234    β”‚    0     β”‚    0%    β”‚
β”‚find_path                     β”‚    65    β”‚    0     β”‚    0%    β”‚
β”‚terminal                      β”‚    38    β”‚    0     β”‚    0%    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```


Release Notes:

- N/A

Richard Feldman created

a211571 agent: Support images via @file and the file context picker (#29596)

Click to expand commit body
Release Notes:

- agent: Add support for @mentioning images
- agent: Add support for including images via file context picker

---------

Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>

Bennet Bo Fenner and Oleksiy Syvokon created

747471c zed 0.184.6

Joseph T. Lyons created

8acd8a2 Fix gemini model token limits (#29584)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

13854b4 agent: Improve MCP tools compatibility with Gemini models (#29411)

Click to expand commit body
Release Notes:

- agent: Improve MCP tools compatibility with Gemini models

Bennet Bo Fenner created

f50dc72 Fix context_stack race in KeyContextView (#29324)

Click to expand commit body
cc @notpeter

Before this change we used our own copy of `cx.key_context()` when
matching.
This led to races where the context queried could be either before (or
after) the
context used in dispatching.

To avoid the race, gpui now passes out the context stack actually used
instead.

Release Notes:

- Fixed a bug where the Key Context View could show the incorrect
context,
  causing confusing results.

Conrad Irwin created

9e03eac ollama: Add Qwen3 and Gemma3 (default to 16K context) (#29580)

Click to expand commit body
If you have the VRAM you can increase the context by adding this to your
settings.json:

```json
  "language_models": {
    "ollama": {
      "available_models": [
        { "max_tokens": 65536, "name": "qwen3", "display_name": "Qwen3-64k" }
      ]
    }
  },
```

Release Notes:

- ollama: Add support for Qwen3. Defaults to 16K token context. See:
[Assistant Configuration
Docs](https://zed.dev/docs/assistant/configuration#ollama-context) to
increase.

Peter Tripp created

34bb705 ollama: Add DeepSeek v3 max token length (#29156)

Click to expand commit body
Add deepseek-v3 max token length for ollama

Release Notes:

- N/A

shenjack created

b2d49fb Refactor markdown formatting utilities to avoid building intermediate strings (#29511)

Click to expand commit body
These were nearly always used when using `format!` / `write!` etc, so it
makes sense to not have an intermediate `String`.

Release Notes:

- N/A

Michael Sloan created

5721089 Fix agent rules files for remote project by loading via buffer (#29440)

Click to expand commit body
When using the agent with a project shared by a collaborator, rules file
loading didn't work as it was trying to read from the client's
filesystem

Release Notes:

- Fixed rules file loading when using the agent with a project shared by
a collaborator.

Michael Sloan created

39483b3 title_bar: Put plan behind `new-billing` feature flag (#29540)

Click to expand commit body
This PR puts the displaying of the plan in the user menu behind the
`new-billing` feature flag instead of the old `zed-pro` feature flag.

Release Notes:

- N/A

Marshall Bowers created

aff5ac5 feature_flags: Add `FeatureFlag` suffix to feature flag types (#29392)

Click to expand commit body
This PR adds the `FeatureFlag` suffix to the feature flag types that
were missing them.

This makes the names easier to search in the codebase.

Release Notes:

- N/A

Marshall Bowers created

bf915e9 feature_flags: Remove `remoting` feature flag (#29390)

Click to expand commit body
This PR removes the `remoting` feature flag.

The feature is shipped, and we aren't referencing the flag anywhere
anymore.

Release Notes:

- N/A

Marshall Bowers created

cc8fe25 Agent: Include partial output if terminal tool fails (#29115)

Click to expand commit body
This PR addresses the behavior of the agent's terminal tool when the
executed command is interrupted or fails after producing some output.
Currently, if the command doesn't finish successfully, any partial
output captured before the interruption/failure is discarded, and only
an error message (or a generic cancellation message) is returned to the
LLM.

This change modifies the `run_command_limited` function in the terminal
tool to catch errors when awaiting the command's status (which includes
interruptions). In the case of such an error, it now includes any
partial stdout/stderr captured up to that point within the error message
returned to the `ToolUseState`. This ensures the LLM receives the
partial context even when the command doesn't complete cleanly, framed
appropriately as part of an error/interruption message.

Closes #29101

Release Notes:

- N/A

Mani Rash Ahmadi created

6476700 language_models: Count Google AI tokens through LLM service (#29319)

Click to expand commit body
This PR wires the counting of Google AI tokens back up.

It now goes through the LLM service instead of collab's RPC.

Still only available for Zed staff.

Release Notes:

- N/A

Marshall Bowers created

0a656c2 language_models: Pass up `mode` for completion requests through Zed (#29294)

Click to expand commit body
This PR makes it so we pass up the `mode` for completion requests
through the Zed provider.

Release Notes:

- N/A

Marshall Bowers created

93cf95f collab: Remove `CountLanguageModelTokens` RPC message (#29314)

Click to expand commit body
This PR removes the `CountLanguageModelTokens` RPC message from collab.

We were only using this for Google AI models through the Zed provider
(which is only available to Zed staff).

For now we're returning `0`, but will bring back soon.

Release Notes:

- N/A

Marshall Bowers created

8a68fad collab: Remove code for embeddings (#29310)

Click to expand commit body
This PR removes the embeddings-related code from collab and the
protocol, as we weren't using it anywhere.

Release Notes:

- N/A

Marshall Bowers created

b39f9e9 agent: Include grep-related instructions in the prompt only if the tool is available (#29536)

Click to expand commit body
This change updates the system prompt to conditionally include
`grep`-related instructions based on whether the `grep` tool is enabled.

Implementation details:
1. Add a `has_tool` handlebars helper.
2. Pass the `model` to all locations where the prompt is built.
3. Use `{{#if has_tool "grep"}}` in the system prompt to gate
`grep`-specific instructions.

Testing:
- Unit tests for the `hasTool` helper.
- Unit tests to verify that `grep`-related instructions are included /
omitted from the prompt as appropriate.
- Manual agent evaluation:
- Setup: Asked the Agent "List all impls of MyTrait in the project"
using a custom "No tools" profile (all tools disabled).
- Before the change: The Agent attempted to call `grep`, encountered an
error, then realized the tool was unavailable.
- After the change: The Agent immediately asked to enable a search tool.

Note: in principle, `grep`/`read_file` tool descriptions alone might be
enough, but to confirm this we need more evaluation. If it turns out to
be true, we'll be able to remove grep-specific instructions from the
system prompt and undo this change.

Release Notes:

- N/A

Oleksiy Syvokon created

7eeed54 agent: Add "max mode" toggle (#29549)

Click to expand commit body
This PR adds a "max mode" toggle to the Agent panel, for models that
support it.

Only visible to folks in the `new-billing` feature flag.

Icon is just a placeholder.

Release Notes:

- N/A

Marshall Bowers created

af292ed agent: Improve attached context display and show hovers for symbol / selection / rules / thread (#29551)

Click to expand commit body
* Brings back hover popover of selection context.

* Adds hover popover for symbol, rules, and thread context.

* Makes context attached to messages display the names / content at
attachment time.

* Adds the file name as the displayed parent of symbol context.

* Brings back `impl Component for AddedContext`

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>

Michael Sloan and Bennet Bo Fenner created

b1aa15f Use `u64` instead of `usize` in `ElementId` (#29493)

Click to expand commit body
Truncation to a 32 bit `usize` could cause two distinct IDs to be
considered the same element.

Release Notes:

- N/A

Michael Sloan created

2bfac79 zed 0.184.5

Joseph T. Lyons created

a62a6c4 askpass: Shell escape Zed path in askpass script (cherry-pick #29447) (#29449)

Click to expand commit body
Cherry-picked askpass: Shell escape Zed path in askpass script (#29447)

Closes #29439

Add shell escaping as well as additional sanity check for Zed path when
used in askpass. This caused issues on preview and nightly as the
standard paths for those releases contain spaces which were not escaped
appropriately leading to erroneous "Permission denied" errors from SSH
when the askpass script failed

Release Notes:

- Fixed a missing shell-escape in askpass resulting in erroneous
"Permission denied" errors when trying to connect to a remote server
over ssh (effecting preview release v0.184.1 and nightly only)

Co-authored-by: Ben Kunkle <ben@zed.dev>

gcp-cherry-pick-bot[bot] and Ben Kunkle created

d68df74 agent: Simplify elements of the thread design (#29533)

Click to expand commit body
Namely, this PR removes the layout shift when you click on a user
message to edit it and displays the feedback disclaimer only upon
hovering the thumbs up/down button container.

Release Notes:

- N/A

Danilo Leal created

17e2746 agent: Bring title editing back to text threads (#29425)

Click to expand commit body
This also fixes a little UI bug where the text thread title would push
the buttons away from the UI when there was still space.

Release Notes:

- agent: Made text thread titles editable again.

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>

Danilo Leal and Michael Sloan created

45ebaac agent tools: Make `read_file.end_line` inclusive (#29524)

Click to expand commit body
One motivation is that the outlines returned by `read_file` for large
files list line numbers assuming an inclusive `end_line`. As a result,
when the agent uses these outlines for `read_line` calls, it would
otherwise miss the last line.

Release Notes:

- N/A

Oleksiy Syvokon created

0f051dd Fix error when deserializing Gemini streams (#29470)

Click to expand commit body
Sometimes Gemini would report `Content` without a `parts` field.

Release Notes:

- Fixed a bug that would sometimes cause Gemini models to fail streaming
their response.

Antonio Scandurra created

18c2137 zed 0.184.4

Joseph T. Lyons created

d92de5e editor: Improve fuzzy match bucket logic for code completions (#29442)

Click to expand commit body
Add new test and improve fuzzy match bucket logic which results into far
better balance between LSP and fuzzy search.

Before:
<img width="500" alt="before"
src="https://github.com/user-attachments/assets/3e8900a6-c0ff-4f37-b88e-b0e3783b7e9a"
/>

After:
<img width="500" alt="after"
src="https://github.com/user-attachments/assets/738c074c-d446-4697-aac6-9814362e88db"
/>

Release Notes:

- N/A

Smit Barmase created

0078f67 editor: Add setting for snippet sorting behavior for code completion (#29429)

Click to expand commit body
Added `snippet_sort_order`, which determines how snippets are sorted
relative to other completion items. It can have the values `top`,
`bottom`, or `inline`, with `inline` being the default.

This mimics VS Code’s setting:
https://code.visualstudio.com/docs/editing/intellisense#_snippets-in-suggestions

Release Notes:

- Added support for `snippet_sort_order` to control snippet sorting
behavior in code completion menus.

Smit Barmase created

77f1609 ui: Add `inline_code` method to label (#29306)

Click to expand commit body
This makes it easy to have a label that looks like Markdown inline code
via the `inline_code(cx)` method.

Release Notes:

- N/A

Danilo Leal created

93302ab Fix inclusion of message when counting tokens from message editor (#29443)

Click to expand commit body
Accidentally omitted this in #29233

Release Notes:

- N/A

Michael Sloan created

7c93c8e agent: Render path search results with `ToolCard` (#28894)

Click to expand commit body
Implementing the `ToolCard` for the path_search tool. It also adds the
"jump to file" functionality if you expand the results.

Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Co-authored-by: Agus Zubiaga <hi@aguz.me>

Danilo Leal , Richard Feldman , and Agus Zubiaga created

01d2066 agent: Make markdown code blocks uncollapsed by default (#29424)

Click to expand commit body
Seeing the markdown code stream in is actually more helpful than hiding
parts of it; parts that you may be interested in.

Release Notes:

- N/A

Danilo Leal created

dfea962 agent: Allow to explictly disable tools when using `enable_all_context_servers` (#29414)

Click to expand commit body
Previously, all MCP tools would be completed regardless if they were
disabled/enabled for the profile. This meant that the "Write" profile
was always using all MCP tools, even if you disabled them in the
settings.

Now, when `enable_all_context_servers` is set to `true`, we will enable
all tools from all MCP servers by default but disable the ones that are
explicitly disabled for the profile.

Also fixes an issue where the tools would not show up as enabled when
using `enable_all_context_servers: true`

Release Notes:

- agent: Fix an issue where MCP tools could not be enabled/disabled

Bennet Bo Fenner created

0f3c56f Bump to 0.184.3 for @bennetbo

Zed Bot created

1cbdce4 assistant: Fix issue when using inline assistant with Gemini models (cherry-pick #29407) (#29409)

Click to expand commit body
Cherry-picked assistant: Fix issue when using inline assistant with
Gemini models (#29407)

Closes #29020

Release Notes:

- assistant: Fix issue when using inline assistant with Gemini models

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>

gcp-cherry-pick-bot[bot] and Bennet Bo Fenner created

745e7d6 language_models: Use `POST /completions` endpoint for Zed provider (#29389)

Click to expand commit body
This PR updates the Zed provider to use the `POST /completions`
endpoint.

There is no functional difference from `POST /completion`, but the
pluralized version reads better.

Release Notes:

- N/A

Marshall Bowers created

19de45c Bring back reload of agent context before sending message (#29385)

Click to expand commit body
Realized after merging #29233 that this behavior is desired

Release Notes:

- N/A

Michael Sloan created

f8c3a01 Remove unnecessary fields from the tool schemas (#29381)

Click to expand commit body
This PR removes two fields from JSON schemas (`$schema` and `title`),
which are not expected by any model provider, but were spuriously
included by our JSON schema library, `schemars`.

These added noise to requests and cost wasted input tokens.

### Old

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "FetchToolInput",
  "type": "object",
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "description": "The URL to fetch.",
      "type": "string"
    }
  }
}
```

### New:

```json
{
  "properties": {
    "url": {
      "description": "The URL to fetch.",
      "type": "string"
    }
  },
  "required": [
    "url"
  ],
  "type": "object"
}
```

- N/A

Max Brunsfeld created

08cb703 Restructure agent context (#29233)

Click to expand commit body
Simplifies the data structures involved in agent context by removing
caching and limiting the use of ContextId:

* `AssistantContext` enum is now like an ID / handle to context that
does not need to be updated. `ContextId` still exists but is only used
for generating unique `ElementId`.
* `ContextStore` has a `IndexMap<ContextSetEntry>`. Only need to keep a
`HashSet<ThreadId>` consistent with it. `ContextSetEntry` is a newtype
wrapper around `AssistantContext` which implements eq / hash on a subset
of fields.
* Thread `Message` directly stores its context.

Fixes the following bugs:

* If a context entry is removed from the strip and added again, it was
reincluded in the next message.
* Clicking file context in the thread that has been removed from the
context strip didn't jump to the file.
* Refresh of directory context didn't reflect added / removed files.
* Deleted directories would remain in the message editor context strip.
* Token counting requests didn't include image context.
* File, directory, and symbol context deduplication relied on
`ProjectPath` for identity, and so didn't handle renames.
* Symbol context line numbers didn't update when shifted

Known bugs (not fixed):

* Deleting a directory causes it to disappear from messages in threads.
Fixing this in a nice way is tricky. One easy fix is to store the
original path and show that on deletion. It's weird that deletion would
cause the name to "revert", though. Another possibility would be to
snapshot context metadata on add (ala `AddedContext`), and keep that
around despite deletion.

Release Notes:

- N/A

Michael Sloan created

43a04dc Treat invalid JSON in tool calls as failed tool calls (#29375)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>

Richard Feldman , Max , and Max Brunsfeld created