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
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"]`.
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.
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
b4fbb9bc08/crates/editor/src/element.rs (L7160-L7164)
as well as
b4fbb9bc08/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
b4fbb9bc08/crates/editor/src/editor.rs (L16404)
with
b4fbb9bc08/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
b4fbb9bc08/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
b4fbb9bc08/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
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
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
* 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 ...
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.
- 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
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>
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
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
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
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
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
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
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.
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
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.
Extracts authorization logic to a single method and add early
returns in message handlers to prevent sending requests when the model
configuration is invalid or terms haven't been accepted.
This was allowing for the TOS popup to show up even for logged out users
because they could bypass the disabled button with the keybinding.
Now the behavior should be the same either way, that the request isn't
made unless they can send it.
The text thread already has a banner to tell the user to configure a
model provider, so I don't think we need to pop up a separate modal,
since the button is disabled anyway.
Release Notes:
- N/A
Closes#30056
Apparently the API supports the "default" field now, so we can remove
that transformation.
However, optional is not supported
See https://ai.google.dev/api/caching#Schema
Release Notes:
- agent: Improve tool schema compatibility for Gemini models
As discussed and explained in
https://github.com/zed-industries/zed/pull/26893#discussion_r2074102719
This PR fixes an issue where we would have zero-divisions during
scrollbar layouting for small files.
This happened due to the fact that for small files,
9c1b2afa49/crates/editor/src/element.rs (L8562-L8563)
would be `NaN`, since `(total_text_units - text_units_per_page).max(0.)`
would return `0.`, which we would divide by.
However, this was neccessary to be in place, as this prevented the
scroll thumb from being rendered for small files: Due to this being
`NaN`, the thumb origin would be `Pixels(NaN)`, which prevented the
rendering of the scrollbar thumb.
This PR fixes this behavior by accounting for this scenario and changing
the thumb bounds to be an `Option<Bounds<Pixels>>` instead. This
furthermore has the advantage that we have to compute the thumb only
once and storing it in the layout, which was previously not possible.
Most notably, this enables scrollbar markers to show for smaller files:
https://github.com/user-attachments/assets/9fa5d240-8795-4fae-9933-aed144df4f5e
Currently, no markers are shown due to the fact that `Pixels(NaN)` is
set as the origin point.
Also, I changed that the cursor style will only be changed on the
scrollbar hitbox when we will actually show a thumb. This way, for small
files (where viewport > content size) the cursor will not change when a
user hovers with their mouse over the scrollbars hitbox.
Theoretically, I could also include the change mentioned in
https://github.com/zed-industries/zed/pull/26893#discussion_r2076316956
here. Given the introduction of the minimap as well as #29316 and the
cursor style taken care of here, removing the guard would not change
anything and creates the possibility to soon introduce scrollbars for
auto height editors. Please let me know whether we want to have this in
this PR or whether I shall create a seperate one.
Release Notes:
- Enabled scrollbar marker rendering for small files.