- Add `300ms` delay for it to consider it as selection drag instead of
an attempt to make a new selection.
- Add cursor icon while dragging the selection.
This is same as what chromium does:
https://chromium.googlesource.com/chromium/blink/+/master/Source/core/input/EventHandler.cpp#142
Release Notes:
- Fixed issue where you accidentally end up dragging the selection where
intent was to make a new one instead. To drag selection now, you need to
hold just a little longer before dragging.
Send `runtimeExecutable` and `runtimeArgs` instead of `program` and
`args` to avoid the DAP implicitly wrapping the command in `node`.
This means that putting `pnpm vitest <file>` as the command in the
launch modal will work, as will this in debug.json:
```
[
{
"adapter": "JavaScript",
"type": "pwa-node",
"label": "Label",
"request": "launch",
"program": "pnpm",
"args": ["vitest", "<file>"],
"cwd": "/Users/name/project"
}
]
```
Release Notes:
- Debugger Beta: made it possible to use commands like `pnpm
<subcommand> <args>` in the launch modal and debug.json
Now if you click the triangle you get runnables, if you click the
lightning bolt you get code actions, if you trigger the code actions
menu with the mouse/keyboard you still get both.
Release Notes:
- Fixed the run/code actions menu to not duplicate content when opened
from the respective icons.
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Remove unnecessary alias attributes from Model enum variants and add
max_output_tokens limits for all OpenAI models. Also fix
supports_system_messages to explicitly handle all model variants.
Release Notes:
- N/A
After this PR we can run all the in-tree launch.json examples from [this
repo](https://github.com/microsoft/vscode-recipes).
Things done:
- Fill in default cwd at a lower level for all adapters
- Update launch.json parsing for DebugScenario changes
- Imitate how VS Code normalizes the `type` field for JS debug tasks
- Make version field optional
- Extend the variable replacer a bit
Release Notes:
- Debugger Beta: fixed issues preventing loading and running of debug
tasks from VS Code's launch.json.
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Closes #ISSUE
Release Notes:
- debugger: Re-running a debug scenario that has been edited on disk now
uses the latest version
Co-authored-by: Piotr Osiewicz <peterosiewicz@gmail.com>
This PR makes it a lot cleaner to write code completion tests. It
doesn't contain any logical changes, just refactoring.
Before, we used to depend on hard-coded values of fuzzy score and its
positions for tests. Now we don't need them, as fuzzy crate will handle
that for us. This is possible because fuzzy match score isn't dependent
on relative candidates or the number of candidates; rather, it's just a
one-to-one mapping for each candidate and its score.
This also makes it test robust for future purposes if there are changes
in fuzzy score logic.
Before:
```rs
SortableMatch {
string_match: StringMatch { // -> whole struct provided by fuzzy crate
candidate_id: 1115,
score: 1.0,
positions: vec![],
string: "Item".to_string(),
},
is_snippet: false, // -> changed to snippet kind
sort_text: Some("16"),
sort_kind: 3, // -> changed to function, constant, variable kind
sort_label: "Item",
},
```
After:
```rs
CompletionBuilder::function("Item", "16")
```
Release Notes:
- N/A
- Pass the right test name filter
- Limit the number of forks used by the testing pool in the spirit of
#32473
Release Notes:
- Debugger Beta: switched to running vitest tests serially when
debugging.
Adds some jitter to avoid the issue that all requests will retry at
roughly the same time in eval where we have a lot of concurrent
requests.
Release Notes:
- N/A
This allows us to support debugging with a debug adapter not managed by
Zed. Note that this is not a user facing change, as DebugAdapterBinary
is used to determine how to spawn a debugger. Thus, this should not
break any configs or anything like that.
Closes #ISSUE
Release Notes:
- N/A
Closes#7334
# Changes
This PR makes the minimum width allocated for line numbers in the side
gutter configurable in units of character width via the
`"line_number_base_width"` attribute in `gutter` settings. Set the
previously hard coded value of `4` as default.
Together with other settings (`"folds"`, `"breakpoints"`,...) this gives
the user control over the gutter width.
If the number of lines exceedes the base width, the number of digits in
the largest line number is chosen instead. This is consistent with
previous behaviour.
Screenshot for reference:
<img width="1104" alt="Screenshot 2025-06-03 at 12 15 29"
src="https://github.com/user-attachments/assets/77c869ad-164b-4b74-8e39-8be43d740ad4"
/>
P.S.: This is my first time contributing to zed (yay!🎉). Let me know if
i'm missing something.
Release Notes:
- Make minimum line number width in gutter configurable
These `if` condition checks were removed in #30828, and this PR adds
them back. This is especially important in the handling of
`WM_NCHITTEST`, where all the calculations are based on the assumption
that `hide_title_bar = true`.
Release Notes:
- N/A
When editing a message, cancel any in-progress completion before
starting a new request to prevent overlapping model responses.
Release Notes:
- agent: Fixed previous completion not cancelling when editing a
previous message
Closes#32456https://github.com/zed-industries/zed/pull/32007 added showing
pre-emptive keys for multi-key bindings. But for certain keys like
"control", "backspace", "escape", "shift", "f1", etc., shouldn't be
shown as these keys would not end up in buffer after pending input
delay. This PR changes it to use just `key_char`, as it represents
actual text that will end up in buffer and is `None` for all mentioned
keys.
fad4c17c97/crates/gpui/src/platform/keystroke.rs (L14-L21)
cc @ConradIrwin
Release Notes:
- Fixed issue where triggering multi-key binding like "shift",
"control", etc. would write them to the buffer for a short time.
- [x] Manual Testing(Tested this with Qwen2.5 VL 32B Instruct (free) and
Llama 4 Scout (free), Llama 4 Maverick (free). Llama models have some
issues in write profile due to one of the in built tools schema, so I
tested it with minimal profile.
Closes #ISSUE
Release Notes:
- Add image support to OpenRouter models
---------
Signed-off-by: Umesh Yadav <umesh4257@gmail.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Closes#31373
We kill the DAP process in our `on_app_quit` handler, but the debuggee
might not be killed. Try to make this more reliable by making the DAP
process its own process group leader, and killing that entire process
group when quitting Zed.
I also considered going through the normal DAP shutdown sequence here,
but that seems dicey in a quit handler. There's also the DAP
`ProcessEvent` but it seems we can't rely on that as e.g. the JS DAP
doesn't send it.
Release Notes:
- Debugger Beta: Fixed debuggee processes not getting cleaned up when
quitting Zed.
Closes#32159
This PR refines the scope to match just the function name with **the
type argument** instead of the whole call expression.
Matching to whole call expression prevented methods from expanding
inside the function argument. For example, `const foo =
bar(someMethod(2)^);` instead of `const foo = bar(someMethod^)`;
Follow-up for https://github.com/zed-industries/zed/pull/30312,
https://github.com/zed-industries/zed/pull/30351. Mistakenly regressed
since https://github.com/zed-industries/zed/pull/31872 when we stopped
receiving `insert_range` for this particular case and fallback to
`replace_range`.
Release Notes:
- Fixed issue where code completion in TypeScript function arguments
sometimes omitted the dot separator, for example resulting in
`NumberparseInt` instead of `Number.parseInt(string)`.
---------
Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
As part of this I refactored the logic that enabled/disabled actions in
the debugger to happen at action registration time instead of using
command palette filters. This allows the menu to grey out actions correctly.
Release Notes:
- Add a "Run" menu to contain tasks and debugger
When no locator or valid config is found we expose the invalid config
error message to the user now.
Closes#32067
Release Notes:
- debugger beta: Improve error message when starting a debugger session
with an invalid configuration
The new dap-types version has a default to cwd for the
RunInTerminalRequest
Closes#31695
Release Notes:
- debugger beta: Fix panic that occurred when a debug adapter sent an
invalid `RunInTerminal` request
Now, every JS/TS-related file will get their package.json script
contents added as tasks:
<img width="1020" alt="image"
src="https://github.com/user-attachments/assets/5bf80f80-fd72-4ba8-8ccf-418872895a25"
/>
To achieve that, `fn associated_tasks` from the `ContextProvider` was
made asynchronous and the related code adjusted.
Release Notes:
- Added initial `package.json` scripts task autodetection
---------
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Closes #ISSUE
Release Notes:
- Debugger Beta: fixed an issue where the terminal pane of the debug
panel would be empty when debugging JavaScript.
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
In #31872 I changed the behavior of completions to not filter instead of
requerying completions when `is_incomplete: false`. Unfortunately this
also stopped filtering completions when `is_incomplete: true` - we still
want to filter the incomplete completions so that the menu updates
quickly even when completions are slow. This does mean that the
completions menu will display partial results, hopefully only briefly
while waiting for fresh completions.
Thanks to @mikayla-maki for noticing the regression. Thankfully just in
time to fix it before this makes it into a stable release. Leaving off
release notes since I will cherry-pick this to the current preview
version, 190.x, and there probably won't be a preview release before the
next stable.
Release Notes:
- N/A
JavaScript debugger is using a phantom stack frame to delineate await
points; that frame reuses a frame ID of 0, which collides with other
frames returned from that adapter.
934075df8c/src/adapter/stackTrace.ts (L287)
The bug has since been fixed in
https://github.com/microsoft/vscode-js-debug/issues/2234, but we'll need
to wait for a new release of node debugger for that to make a
difference. Until then..
Release Notes:
- Fixed a bug with JavaScript debugging which led to stack trace list
containing excessive amount of `await` entries.
---------
Co-authored-by: Conrad Irwin <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This appears to fix some cases where we fail to launch JS tests under
the debugger.
Release Notes:
- N/A (node locator is still gated)
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Closes #ISSUE
Release Notes:
- Debugger Beta: made the debug panel UI more helpful when an invalid
configuration is sent to the debug adapter.
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Since `tldr` and `quickdraw` use the same kind of task syntax as RSpec,
I don't think it's necessary to have separate examples.
cc @joeldrapper @vitallium
Release Notes:
- N/A