857134d
Fix handling of unicode when counting codeblock lines (#30364)
Click to expand commit body
Release Notes: - N/A
Michael Sloan created
857134d
Fix handling of unicode when counting codeblock lines (#30364)
Release Notes: - N/A
Michael Sloan created
d8980c2
windows: Remove extra empty line when loading default settings (#30344)
On Windows, lines in a file end with `\r\n`, so using
`chunk.split('\n')` leaves a trailing `\r` at the end of each line. This
ends up introducing extra blank lines in the final output.
I didn't use `chunk.split('\r\n')` because some of the input have
already had its line endings normalized to just `\n`. If we switch to
splitting on `\r\n`, that input wouldn't be handled correctly.
#### Before
https://github.com/user-attachments/assets/22cc5a79-c3a7-4824-a3bc-d66d2261852f
#### After
https://github.com/user-attachments/assets/720f1d67-75e6-482d-b6a5-9f3aa9f321ce
Release Notes:
- N/A
张小白 created
299a0bc
search: Ensure inputs located in the toolbar match the background color of the toolbar (#30355)
Closes #30267 This ensures they do not differ in color as described in the issue. Currently: <img width="1182" alt="grafik" src="https://github.com/user-attachments/assets/7ccc5116-f6b4-4ffc-80fc-b5b51c49a8f2" /> This PR: <img width="1182" alt="grafik" src="https://github.com/user-attachments/assets/dcff631a-c1a8-423e-847c-8678a77e7a8e" /> Alternatively, we could potentially color the surrounding containers with the editor background, but I think this way around is more reasonable for the toolbar. Release Notes: - Improved background coloring for search inputs located in the toolbar.
Finn Evers created
cfb06ba
debugger: Shutdown debug adapter client on terminated event (#30278)
I noticed some problems where we have hanging debug sessions after they've been terminated. This should hopefully fix most cases of this, if not all. Release Notes: - N/A
Anthony Eid created
b88ba44
editor: Fix function completion expansion in string contexts and call expressions (#30351)
Closes #27582 Now, when accepting function completion, it doesn't expand with parentheses and arguments in the following cases: 1. If it's in a string (like `type Foo = MyClass["sayHello"]` instead of `type Foo = MyClass["sayHello(name)"]`) 2. If it's in a call expression (like `useRef<HTMLDivElement>(null)` over `useRef(initialValue)<HTMLDivElement>(null)`) This is a follow-up to https://github.com/zed-industries/zed/pull/30312, more like cleaner version of it. Release Notes: - Fixed an issue where accepting a method as an object string in JavaScript would incorrectly expand. E.g. `MyClass["sayHello(name)"]` instead of `MyClass["sayHello"]`.
Smit Barmase created
851ab13
gpui: Bump blade, objc2, objc2-metal, and naga (#30347)
tidely created
5249345
chore: remove redundant word in comment (#30338)
remove redundant word in comment Release Notes: - remove redundant word in comment Signed-off-by: yetyear <flite@outlook.com>
yeahyear created
1b593f6
Include `EditAgent`'s raw output when inspecting thread (#30337)
This allows us to debug the raw edits that were generated when people report feedback, when running evals and when opening the thread as Markdown. Release Notes: - Improved debug output for agent threads.
Antonio Scandurra created
ea7756b
deps: Update aws-lc-rs to 1.13.1 (#30332)
To pull in https://github.com/aws/aws-lc/pull/2381 which fixes build on MinGW with Clang Release Notes: - N/A
Maksim Bondarenkov created
1ecd00a
editor: Ensure minimap is shown when `show_minimap` is toggled to `true` (#30326)
Follow-up of #30285 This PR ensures the action added in the linked PR also works when the user does not have the minimap enabled via settings. Currently, the toggle only works when the user has already enabled the minimap in their settings. This happens because in https://github.com/zed-industries/zed/blob/b4fbb9bc085733d2f771cd440ff57305cf6eebeb/crates/editor/src/element.rs#L7160-L7164 as well as https://github.com/zed-industries/zed/blob/b4fbb9bc085733d2f771cd440ff57305cf6eebeb/crates/editor/src/element.rs#L1542 we check for the user configuration before reserving space for the minimap as well as layouting it and because in https://github.com/zed-industries/zed/blob/b4fbb9bc085733d2f771cd440ff57305cf6eebeb/crates/editor/src/editor.rs#L16404 with https://github.com/zed-industries/zed/blob/b4fbb9bc085733d2f771cd440ff57305cf6eebeb/crates/editor/src/editor_settings.rs#L132-L134 we would not even create a minimap when the user disabled it via their settings. --- This PR fixes this by ensuring a minimap is created on the toggle issue as well as lifting some of the restrictions. Since we are always only returning a minimap in https://github.com/zed-industries/zed/blob/b4fbb9bc085733d2f771cd440ff57305cf6eebeb/crates/editor/src/editor.rs#L16443-L16445 when `show_minimap` is set to `true`, we can assume in the rendering code that if a minimap is present, it should be layouted and rendered no matter if `ShowMinimap` is currently set to `Never`. We can do this since `show_minimap` always reflects the current user configuration, see https://github.com/zed-industries/zed/blob/b4fbb9bc085733d2f771cd440ff57305cf6eebeb/crates/editor/src/editor.rs#L18163-L18164 I also removed the minimap deletion/recreation on the toggling of `show_minimap`, since this is not really needed - once we have stored a minimap editor within the editor, `show_minimap` is sufficient to ensure that it is only shown when the user requests it. Notice that we still will never create a minimap unless neccesary. Lastly, I updated the `supports_minimap` check to account for the fact that the minimap is currently disabled entirely for multibuffers. --- One thing I ~~did not tackle here~~ tackled in the second commit is that due to `show_minimap` now being exposed to the user, it is possible to enable the minimap for all full mode editors, e.g. the agent text thread editor <img width="592" alt="grafik" src="https://github.com/user-attachments/assets/5f6c0e8b-45f9-44e8-9625-9d51c1480f98" /> which should most likely not be possible when the minimap is programmatically disabled. Release Notes: - N/A
Finn Evers created
29c31f0
Implement rendering of images with data urls in markdown (#30322)
Fixes #28266  Release Notes: - Added support for rendering images with data URLs in markdown. This can show up in hover documentation provided by language servers. Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Max Brunsfeld and Mikayla Maki created
c512d43
agent: Render edit tool error as markdown (#30325)
Release Notes: - agent: Render edit tool error as markdown and allow selecting it
Agus Zubiaga created
05a6c31
languages: Fix python indent block for more keywords (#30323)
Add `with`, `while`, `match`, `class` and `case` keywords as indent block. Release Notes: - N/A
Smit Barmase created
9810745
agent: Fix autoscrolling to history entry (#30321)
We were still using entry indexes to scroll, but the list now includes the separators as items, so the indexes need to be translated Release Notes: - agent: Fix autoscrolling to history entry when navigating via keyboard
Agus Zubiaga created
4b61d4b
agent: Fix message editor's button positions when expanded (#30311)
Fixes an issue introduced by #29959 which caused the message editor to overflow from the agent panel bounds, making the bottom buttons invisible when the editor was expanded (cmd+esc). Fixing this required changing the base structure of the agent panel, but things seem to work as expected: https://github.com/user-attachments/assets/fc4c97fb-f7cb-4f54-a268-c30fbcb1649f Release Notes: - agent: Fix message editor's button positions when expanded
Agus Zubiaga created
b4fbb9b
Use ESC to cancel dragging in Zed (#30318)
Closes https://github.com/zed-industries/zed/issues/11887 ESC is always captured in terminal due to https://github.com/zed-industries/zed/blob/980bfae331dd5078bbba9fe0f3993d9ad5ca6e29/crates/terminal/src/terminal.rs#L1339-L1353 so this part is not fixed. Otherwise, all other drags are cancelled when ESC is pressed: https://github.com/user-attachments/assets/6e70a1e5-c244-420b-9dec-ae2ac2997a59 Release Notes: - Allowed to use ESC to cancel dragging in Zed
Kirill Bulatov created
83378b8
agent: Show checkmark for current profile, not default profile (#30314)
Closes #ISSUE Release Notes: - agent: Fixed a bug that caused the profile selector to display a checkmark next to the wrong profile.
Cole Miller created
648d005
bedrock: Fix UX bug (#28350)
Closes #29072, #28390, Release Notes: - AWS Bedrock: Fixed case where user couldn't delete manually added AWS credentials. --------- Co-authored-by: Marshall Bowers <git@maxdeviant.com> Co-authored-by: Peter Tripp <peter@zed.dev>
Shardul Vaidya , Marshall Bowers , and Peter Tripp created
a8312d6
Allow to temporarily toggle diagnostics in the editor (#30316)
* Adds a `diagnostics_max_severity: null` editor settings that has previous hardcoded default, `warning` * Make inline diagnostics to inherit this setting by default (can be overridden with its own max_severity setting) * Allows to toggle diagnostics in the editor menu and via new action, `editor::ToggleDiagnostics` Closes https://github.com/zed-industries/zed/issues/4686 Release Notes: - N/A *or* Added/Fixed/Improved ...
Kirill Bulatov created
9e5d115
editor: Fix TypeScript auto-import breaking generic function calls (#30312)
Closes #29982
When auto-importing TypeScript functions with generic type arguments
(like `useRef<HTMLDivElement>(null)`), the language server returns
snippets with placeholders (e.g., `useRef(${1:initialValue})$0`). While
useful for new function calls, this behavior breaks existing code when
renaming functions that already have parameters.
For example, completing `useR^<HTMLDivElement>(null)` incorrectly
results in `useRef(initialValue)^<HTMLDivElement>(null)`.
Related upstream issue:
https://github.com/microsoft/TypeScript/issues/51758
Similar workaround fix:
https://github.com/pmizio/typescript-tools.nvim/pull/147
Release Notes:
- Fixed TypeScript auto-import behavior where functions with generic
type arguments (like `useRef<HTMLDivElement>(null)`) would incorrectly
insert snippet placeholders, breaking the syntax.
Smit Barmase created
822580c
collab: Check if the user has a payment method before upgrading to Zed Pro (#30310)
This PR adds a check for if the user has a payment method before attempting to upgrade them to Zed Pro. Release Notes: - N/A
Marshall Bowers created
8b764a5
Add a test for remote tool use by the agent (#30289)
- Adds a new smoke test for the use of the read_file tool by the agent in an SSH project - Fixes the SSH shutdown sequence to use a timer from the app's executor instead of always using a real timer - Changes the main executor loop for tests to advance the clock automatically instead of panicking with `parked with nothing left to run` when there is a delayed task Release Notes: - N/A
Cole Miller created
660b4ce
collab: Add intent for updating payment method (#30306)
This PR adds a new `ManageSubscriptionIntent` for initiating a session to update the user's payment method. Release Notes: - N/A
Marshall Bowers created
e74ae89
Add support for `ctrl-backspace` in terminal (delete word backward) (#30139)
Peter Tripp created
b0a6146
docs: Add missing quote in JSON snippet (#30303)
Release Notes: - N/A
gak created
77945fc
Support `find_project_path` being given absolute paths (#30283)
Sometimes models return absolute paths even though we ask them not to (including sometimes returning `/dev/null`). Currently we assume we're always given a relative path, which leads to a panic in debug builds. Now we just support being given absolute paths. Release Notes: - N/A --------- Co-authored-by: Agus Zubiaga <hi@aguz.me>
Richard Feldman and Agus Zubiaga created
6827bf1
collab: Remove legacy claims from LLM token (#30294)
This PR removes some legacy claims related to the old billing from the LLM token. We already stopped reading this in the LLM Worker. Also removed an outdated feature flag check that restricted access to obtaining an LLM token. Release Notes: - N/A
Marshall Bowers created
2b6280a
Add minimap into the editor controls (#30285)
Follow-up of https://github.com/zed-industries/zed/pull/26893 Release Notes: - N/A
Kirill Bulatov created
f21780c
Remove individual URL overrides for LLM service (#30290)
This PR removes the individual URL overrides for the LLM service. We initially had `ZED_PREDICT_EDITS_URL` to allow for directing traffic to the LLM Worker back when there was still the split of the Collab-based LLM Service and the Cloudflare-based LLM Worker. But now that all of the LLM functionality has been moved into the Worker, we can just direct all traffic there. Release Notes: - N/A
Marshall Bowers created
c64dc82
Add a `terminal::RerunTask` action (#30288)
Bounded this action to the same defaults `task::Rerun` is bound to. Unlike the `task::Rerun` which will always rerun the latest task, this command reruns the current task tab, if focused. The task is not in scope when the terminal pane is not focused, and falls back to the regular rerun if invoked on a task-less terminal tab. This way, we can add a proper tooltip to the terminal tab reruns: <img width="231" alt="image" src="https://github.com/user-attachments/assets/2cdd7458-5ba2-4cc7-a10b-3e2db059f1ca" /> Release Notes: - Added `terminal::RerunTask` task action
Kirill Bulatov created
9268308
assistant_context_editor: Remove suggest edits (#30286)
This PR removes the code for the "Suggest Edits" functionality from Assistant1. This feature was already disabled entirely with the launch of the Agent, we're just cleaning up the unused code. Release Notes: - N/A
Marshall Bowers created
7fb52dd
Add a divider below "Usage" in the Edit Prediction menu (#30284)
As it felt untidy without it. Release Notes: - N/A
Danilo Leal created
dc01aef
debugger: Update New Session Modal (#30018)
This PR simplifies the new session modal by flattening its three modes and updating the UI to be less noisy. The new UI also defaults to the Debug Scenario Picker, and allows users to save debug scenarios created in the UI to the active worktree's .zed/debug.json file. Release Notes: - N/A
Anthony Eid created
e9a756b
Make `copilot::SignIn` open sign-in modal when needed (#30239)
Also: * Makes sign out show status notifications and errors. * Reinstall now prompts for sign-in after start. Addresses some of #29250, but not all of it. Release Notes: - N/A
Michael Sloan created
203cb7a
Restyle notification close control (#30262)
Follow-up of https://github.com/zed-industries/zed/pull/30015 Merges suppress and close buttons into one, with `shift` changing the state and showing different tooltips. Currently, there's no tooltip for notification suppress action, hence none is displayed in the video: https://github.com/user-attachments/assets/678c4d76-a86e-4fe9-8d7b-92996470a8a8 Release Notes: - N/A
Kirill Bulatov created
93b88a9
Remove not implemented minimap settings (#30253)
Closes https://github.com/zed-industries/zed/issues/30250 Based on https://github.com/zed-industries/zed/pull/26893#issuecomment-2847338831 Release Notes: - N/A
Kirill Bulatov created
85fda90
Do not remove the item from pane twice (#30254)
Probably a merge artifact? Release Notes: - N/A
Kirill Bulatov created
b343a8a
language_models: Improve subscription states in the Agent configuration view (#30252)
This PR improves the subscription states in the Agent configuration view to the new billing system. Zed Free (legacy): <img width="638" alt="Screenshot 2025-05-08 at 8 42 59 AM" src="https://github.com/user-attachments/assets/7b62d4c1-2a9c-4c6a-aa8f-060730b6d7b3" /> Zed Free (new): <img width="640" alt="Screenshot 2025-05-08 at 8 43 56 AM" src="https://github.com/user-attachments/assets/8a48448e-813e-4633-955d-623d3e6d603c" /> Zed Pro trial: <img width="641" alt="Screenshot 2025-05-08 at 8 45 52 AM" src="https://github.com/user-attachments/assets/1ec7ee62-e954-48e7-8447-4584527307c9" /> Zed Pro: <img width="636" alt="Screenshot 2025-05-08 at 8 47 21 AM" src="https://github.com/user-attachments/assets/f934b2e3-0943-4b78-b8dc-0a31e731d8fb" /> Release Notes: - agent: Improved the subscription-related information in the configuration view.
Marshall Bowers created
3a3d3c0
Improve token counting for OpenAI models (#30242)
tiktoken_rs is a bit behind (and even upstream tiktoken doesn't have all of these models) We were incorrectly using the cl100k tokenizer for some models that actually use the o200k tokenizers. So that is updated. I also made the match arms specific so that we do a better job of catching whether or not tiktoken-rs accurately supports new models we add in. I will also do a PR upstream to see if we can move some of this logic back out if tiktoken better supports the newer models. Release Notes: - Improved tokenizer support for openai models.
Ben Brandt created
ee56706
debugger: Fix up Rust test tasks definitions (#30232)
Closes #ISSUE Release Notes: - N/A --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Piotr Osiewicz and Conrad Irwin created
3cc8850
settings: Migration for fixing duplicated `agent` keys (#30237)
As a byproduct, this fixes bug where it's impossible to change Agent profile Closes #30000 Release Notes: - N/A
Oleksiy Syvokon created
9f6809a
Reuse conversation cache when streaming edits (#30245)
Release Notes: - Improved latency when the agent applies edits.
Antonio Scandurra created
032022e
agent: Tweak wording when configuring profiles (#30027)
cc @danilo-leal Release Notes: - N/A Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Bennet Bo Fenner and Danilo Leal created
b091581
debugger/extensions: Revert changes to extension store related to language config (#30225)
Revert #29945 Release Notes: - N/A --------- Co-authored-by: Conrad <conrad@zed.dev>
Piotr Osiewicz and Conrad created
20387f2
windows: Fix atomic write (#30234)
Superseded #30222 On Windows, `MoveFileExW` fails if another process is holding a handle to the file. This PR fixes that issue by switching to `ReplaceFileW` instead. I’ve also added corresponding tests. According to [this Microsoft research paper](https://www.microsoft.com/en-us/research/wp-content/uploads/2006/04/tr-2006-45.pdf) and the [official documentation](https://learn.microsoft.com/en-us/windows/win32/fileio/deprecation-of-txf#applications-updating-a-single-file-with-document-like-data), `ReplaceFileW` is considered an atomic operation. even though the official docs don’t explicitly state whether `MoveFileExW` or `ReplaceFileW` is guaranteed to be atomic. Release Notes: - N/A
张小白 created
4b5158b
indexed_docs: Remove some unnecessary cloning (#30236)
Other small patch to reduce allocations. `.iter().cloned().collect()` calls `Clone` per element, whereas `.into_iter().collect()` preallocates the `Vec`. The Zed repo for example has up to 1700 packages on some build configurations, meaning this change theoretically saves up to 1699 allocations. It's likely the compiler has already optimized this away, but it's good to be explicit. Release Notes: - N/A
tidely created
a61958e
language: Remove some unnecessary cloning (#30229)
Another tiny patch to reduce allocations `.iter().cloned().collect()` calls `Clone` per element, whereas `into_iter().collect()` preallocates memory Release Notes: - N/A
tidely created
d06d0e6
Use fit instead of center for Agent following (#30228)
Makes it easier to review the Agent edits since more of the previous edits will be visible on screen. Release Notes: - N/A
Ben Brandt created
e8b6787
workspace: Remove excess clone (#30226)
Remove excess clone when invoking callback in workspace Release Notes: - N/A
tidely created
fcf066a
fs: Fall back from atomic write to regular fs write when file handle is in use on Windows (#30222)
Closes #30054 For reference, another way to work around this is to drop the file handle which we can't do in this case, as it would require reopening the settings.json worktree, which is a rather unpleasant fix. Another approach might be to open the file handle with some special flags, but I couldn't get that to work at the time of writing. Release Notes: - Fixed "Backup and Update" in settings migration not working on Windows.
Smit Barmase created