Commit log

1b1070e Add tracing needed for LLM rate limit dashboards (#16388)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>

Max Brunsfeld and Marshall created

9ef3306 Add feature flags to seed script (#16385)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

0fdc9d0 context_servers: Log errors from detached context server tasks (#16377)

Click to expand commit body
Logged several of the detached tasks that before would silently fail if
the context server wasn't in compliance.

Release Notes:

- N/A

Kyle Kelley created

907d762 Allow display name of custom Anthropic models to be customized (#16376)

Click to expand commit body
Also added some docs for our settings.

Release Notes:

- N/A

Nathan Sobo created

ae9e6a9 Allow rerunning tasks with unknown termination status (#16374)

Kirill Bulatov created

e36e605 assistant: Fine-tune error toast design (#16373)

Click to expand commit body
Just some super small padding and absolute-positioning tweaks. 

---

Release Notes:

- N/A

Danilo Leal created

35cd397 collab: Allow enabling feature flags for all users (#16372)

Click to expand commit body
This PR adds a new `enabled_for_all` column to the `feature_flags` table
to allow enabling a feature flag for all users.

Release Notes:

- N/A

Marshall Bowers created

2180dbd assistant: Add action footer and refine slash command popover (#16360)

Click to expand commit body
- [x] Put the slash command popover on the footer
- [x] Refine the popover (change it to a picker)
- [x] Add more options dropdown on the assistant's toolbar
- [x] Add quote selection button on the footer

---

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>

Danilo Leal , Piotr Osiewicz , Nate Butler , and Kirill Bulatov created

23d56a1 Add configuration flow for inline assist button (#16369)

Click to expand commit body
This adds a configuration prompt when using the inline assist button in
the editor.

Release Notes:

- N/A

Mikayla Maki created

a944187 collab: Fix writing LLM rate limit events to Clickhouse (#16367)

Click to expand commit body
This PR fixes the writing of LLM rate limit events to Clickhouse.

We had a table in the table name: `llm_rate_limits` instead of
`llm_rate_limit_events`.

I also extracted a helper function to write to Clickhouse so we can use
it anywhere we need to.

Release Notes:

- N/A

Marshall Bowers created

6cfbb54 Switch icon (#16363)

Click to expand commit body
Updates instances of the `MagicWand` icon to our more recent `Sparkle` /
`ZedAssistant` icon in places where we reference inline assist.

Before:

![CleanShot 2024-08-16 at 13 41
58@2x](https://github.com/user-attachments/assets/67af27a2-a09b-44bb-a8af-2bafcbbd9038)

After:
![CleanShot 2024-08-16 at 13 48
34@2x](https://github.com/user-attachments/assets/229ccc8e-8a93-44c1-abe0-7b6e22ca93e2)


Release Notes:

- Updated inline assist icon in the editor & terminal.

Nate Butler created

54d92a9 zed 0.149.1

Peter Tripp created

a89f768 Manually rewind preview version to previous preview.

Peter Tripp created

7a5acc0 collab: Rework model name checks (#16365)

Click to expand commit body
This PR reworks how we do checks for model names in the LLM service.

We now normalize the model names using the models defined in the
database.

Release Notes:

- N/A

Marshall Bowers created

7a68f14 Merge tag 'nightly' into v0.149.1_cherry

Peter Tripp created

463ac7f Correct H1 text for assistant documentation

Joseph T Lyons created

ee27114 Remove redundant assistant content (#16364)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

ebac9a7 Combine assistant documentation (#16362)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

4558505 Fix more bugs in files (#16241)

Click to expand commit body
Fixes:
- [x] an issue where directories would only match by prefix, causing
both a directory and a file to be matched if in the same directory
- [x] An issue where you could not continue a file completion when
selecting a directory, as `tab` on a file would always run the command.
This effectively disabled directory sub queries.
- [x] Inconsistent rendering of files and directories in the slash
command

Release Notes:

- N/A

---------

Co-authored-by: max <max@zed.dev>

Mikayla Maki and max created

a3a6ebc Small fixes to content generation prompt (#16359)

Click to expand commit body
Fixed the output format section of the content_prompt.hbs template
getting rendered away by handlebars. Also fixed a leftover hardcoded
"Rust" in the rewrite section snippet. (follow-up to #16333)

Release Notes:

- N/A

jvmncs created

b4f5f50 Support 8192 output tokens for Claude Sonnet 3.5 (#16358)

Click to expand commit body
Release Notes:

- Added support for 8192 output tokens from Claude Sonnet 3.5
(https://x.com/alexalbert__/status/1812921642143900036)

Roy Williams created

7eab57a Add a task for running zed in "local release" mode (#16357)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

f1a2638 Do not enable copilot for always read-only editors (#16356)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

0fe22f2 After streaming generation is over, show a regular, batch diff in the file altered (#16350)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created

f7f5a25 repl: Apply border for error output on left (#16334)

Kyle Kelley created

40d97fd windows: Fix missing title bar on `prompt library` (#16302)

Click to expand commit body
Closes #16297

It seems that currently we can't draw custom title bar. I have checked
the `title_bar` crate, it seems to be `zed` only.

Before:

![Screenshot 2024-08-16
004350](https://github.com/user-attachments/assets/e11aa0bb-9d3e-47d5-b488-d3b8220158cc)

After:

![Screenshot 2024-08-16
004235](https://github.com/user-attachments/assets/028b4eb2-c878-4ea7-87e3-22817caefa00)


Release Notes:

- N/A

张小白 created

ad44b45 Improve content generation prompt to reduce over-generation (#16333)

Click to expand commit body
I focused on cases where we're inserting doc comments or annotations
above symbols.

I added 5 new examples to the content generation prompt, covering
various scenarios:

1. Inserting documentation for a Rust struct
2. Writing docstrings for a Python class
3. Adding comments to a TypeScript method
4. Adding a derive attribute to a Rust struct
5. Adding a decorator to a Python class

These examples demonstrate how to handle different languages and common
tasks like adding documentation, attributes, and decorators.

To improve context integration, I've made the following changes:

1. Added a `transform_context_range` that includes 3 lines before and
after the transform range
2. Introduced `rewrite_section_prefix` and `rewrite_section_suffix` to
provide more context around the section being rewritten
3. Updated the prompt template to include this additional context in a
separate code snippet

Release Notes:

- Reduced instances of over-generation when inserting docs or
annotations above a symbol.

Nathan Sobo created

bac39d7 assistant: Only push text content if not empty with image content (#16270)

Click to expand commit body
If you submit an image with empty space above it and text below, it will
fail with this error:


![image](https://github.com/user-attachments/assets/a4a2265e-815f-48b5-b09e-e178fce82ef7)

Now instead it fails with an error about needing a message.

<img width="640" alt="image"
src="https://github.com/user-attachments/assets/72b267eb-b288-40a5-a829-750121ff16cc">

It will however work with text above and empty text below the image now.

Release Notes:

- Improved conformance with Anthropic Images in Chat Completions API

Kyle Kelley created

46fb917 Implement Anthropic prompt caching (#16274)

Click to expand commit body
Release Notes:

- Adds support for Prompt Caching in Anthropic. For models that support
it this can dramatically lower cost while improving performance.

Roy Williams created

09b6e3f Improve workflow step view (#16329)

Click to expand commit body
* Improve the tab title: give it an icon, and indicate the step index.
* Display the line number ranges that the symbols resolve to.
* Don't open duplicate tabs for the same step

Release Notes:

- N/A

Max Brunsfeld created

364a58a Move context tests into their own file (#16327)

Click to expand commit body
This makes it easier to use the outline view to navigate `context.rs`,
and reduces the indentation level of the tests.

Release Notes:

- N/A

Max Brunsfeld created

c896ff2 Remove workflow inspector, clean up workflow code (#16325)

Click to expand commit body
Now that there's a dedicated, user-facing view for each workflow step,
we don't need the inspector functionality. This PR also cleans up some
naming around workflow steps and step resolutions.

Release Notes:

- N/A

Max Brunsfeld created

da2bfbd repl: Scale the text_style font_size and line_height (#16308)

Click to expand commit body
Replaces #16273.

Release Notes:

- repl: Fixed scaling of stdout/stderr line heights

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Nate Butler <iamnbutler@gmail.com>

Kyle Kelley , Mikayla , and Nate Butler created

0b40716 Update assistant docs (#16324)

Click to expand commit body
Release Notes:

- N/A

Joseph T. Lyons created

b151241 assistant: Improve the empty state for the prompt library (#16320)

Click to expand commit body
This PR improves the empty state of the prompt library.

The right-hand side of the library is now dedicated to an empty state
that guides the user to create their first prompt.

Additionally, the message in the picker now reads "No prompts." when
there are no prompts.

#### No prompts

<img width="1136" alt="Screenshot 2024-08-15 at 6 20 26 PM"
src="https://github.com/user-attachments/assets/f9af2b5d-c4d3-4e2c-9ba2-f17e89f19bb7">

#### No prompts that match the search

<img width="1136" alt="Screenshot 2024-08-15 at 5 55 07 PM"
src="https://github.com/user-attachments/assets/2cd4ff9b-958d-4bd0-90d3-dca62b1a91a0">

Release Notes:

- N/A

Marshall Bowers created

f65b2b9 assistant: Fix toggling the model selector via keybind (#16319)

Click to expand commit body
This PR restores the ability to toggle the model selector via a keybind
after it was lost in #15693.

Release Notes:

- Restored the ability to toggle the model selector in the Assistant via
a keybinding (Preview only).

Marshall Bowers created

776442f Add a workflow step resolution view (#16315)

Click to expand commit body
You can now click on a step header (the words `Step 3`, etc) to open a
new tab containing a dedicated view for the resolution of that step.
This view looks similar to a context editor, and has sections for the
step input, the streaming tool output, and the interpreted results.

Hitting `cmd-enter` in this view re-resolves the step.


https://github.com/user-attachments/assets/64d82cdb-e70f-4204-8697-b30df5a645d5



Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>

Max Brunsfeld and Nathan created

583959f collab: Add support for reading boolean values from `.env.toml` (#16317)

Click to expand commit body
This PR adds support for reading boolean values from `.env.toml`, since
it wasn't supported previously.

Release Notes:

- N/A

Marshall Bowers created

9233418 collab: Attach GitHub login to LLM spans (#16316)

Click to expand commit body
This PR updates the LLM service to include the GitHub login on its
spans.

We need to pass this information through on the LLM token, so it will
temporarily be `None` until this change is deployed and new tokens have
been issued.

Release Notes:

- N/A

Marshall Bowers created

df20bae danger: Don't look for `#NNNN`, as it's not specific enough (#16313)

Click to expand commit body
This PR updates the regex we use to search for issues to not search for
`#NNNN`, as it's not specific enough.

It currently catches issue numbers from other repos, which are then
linked to random Zed issues/PRs that happen to have the same number:

<img width="935" alt="Screenshot 2024-08-15 at 3 50 29 PM"
src="https://github.com/user-attachments/assets/b779e503-3027-43e2-b355-e81d8d094694">

As well as catching PRs:

<img width="924" alt="Screenshot 2024-08-15 at 3 48 59 PM"
src="https://github.com/user-attachments/assets/6c2f7594-9234-4454-97da-5a33a1844892">

Given that:

1. We can't distinguish any given `#NNNN` as an issue _and_ can't ensure
it belongs to the Zed repo
2. Any issue/PR referenced as `#NNNN` will already create a backlink

It seems that looking for these is causing more noise than signal.

Release Notes:

- N/A

Marshall Bowers created

cb423bc Remove `tooltip_text` from extension manifests (#16312)

Click to expand commit body
This PR removes the `tooltip_text` from the extension manifests.

We stopped reading this value in #16306, as it wasn't being used, so we
don't need to include it in the manifest anymore.

Release Notes:

- N/A

Marshall Bowers created

5e05821 collab: Attach `user_id` to LLM spans (#16311)

Click to expand commit body
This PR updates the LLM service to attach the user ID to the spans.

Release Notes:

- N/A

Marshall Bowers created

ff83e5b Improve workflow suggestion steps and debug info (#16309)

Click to expand commit body
Release Notes:

- N/A

---------

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

Kirill Bulatov , Nathan Sobo , and Bennet Bo Fenner created

6b7664e Fix bugs preventing non-staff users from using LLM service (#16307)

Click to expand commit body
- db deadlock in GetLlmToken for non-staff users
- typo in allowed model name for non-staff users

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Joseph <joseph@zed.dev>

Max Brunsfeld , Marshall , and Joseph created

931883a extension: Remove `tooltip_text` from `SlashCommandManifestEntry` (#16306)

Click to expand commit body
This PR removes the `tooltip_text` field from
`SlashCommandManifestEntry`s.

The `tooltip_text` is currently only used to set the `menu_text` on a
slash command, which is only used for featured slash commands.

Since slash commands from extensions are not currently able to be
featured, we don't need extension authors to provide this field in the
manifest.

This is a backwards-compatible change.

Release Notes:

- N/A

Marshall Bowers created

e982ff7 zed_extension_api: Start a list of pending changes (#16305)

Click to expand commit body
This PR starts a list of pending changes for the Zed extension API.

We'll want to keep this list updated as we note things that we want to
change in the next version of the extension API. This will help with
batching breaking changes together so that we're not constantly creating
new versions of the extension API for one-off changes.

Release Notes:

- N/A

Marshall Bowers created

0b3e5b2 assistant: Support retrying empty workflow step (#16301)

Click to expand commit body
Co-Authored-by: Nathan <nathan@zed.dev>
Co-Authored-by: Kirill <kirill@zed.dev>

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Kirill <kirill@zed.dev>

Bennet Bo Fenner , Nathan , and Kirill created

7434b56 docs: Link to `slash-commands-example` extension (#16304)

Click to expand commit body
This PR updates the slash command extension docs to link to the
`slash-commands-example` extension, for a quick start.

Release Notes:

- N/A

Marshall Bowers created

b764174 docs: Add docs for defining slash commands in extensions (#16303)

Click to expand commit body
This PR adds docs for defining slash commands within extensions.

Release Notes:

- N/A

Marshall Bowers created

c45adce Run slash commands both on enter and on argument completion that requires it (#16283)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created