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>
This PR also introduces `Context::processor`, a sibling of
`Context::listener` that takes a strong pointer to entity and allows for
a return result.
Release Notes:
- N/A
Co-authored-by: Mikayla <mikayla@zed.dev>
Also introduces an extension point for other adapters to do this if it
turns out they also send this information.
Release Notes:
- N/A (JS locator is still gated)
Partially reverts #30682
A uniform list is desirable for the scrolling behavior, but this breaks
badly when there are collapsed entries or entries without paths, both of
which seem common with the JS adapter.
It would be nice to go back to a uniform list if we can come up with a
set of design tweaks that allow all entries to be the same height.
Release Notes:
- Debugger Beta: fixed an issue that caused entries in the stack frame
list to overlap in some situations.
- [x] pass LSP tasks into list_debug_scenarios
- [x] load LSP tasks only once for both modals
- [x] align ordering
- [x] improve appearance of LSP debug task icons
- [ ] reconsider how `add_current_language_tasks` works
- [ ] add a test
Release Notes:
- Debugger Beta: Added debuggable LSP tasks to the "Debug" tab of the
new process modal.
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
I think using `Debugger Program` and `~/bin/debugger` here makes it seem
like that field is for specifying the path to the debugger itself, and
not the program being debugged.
Release Notes:
- N/A
Also includes a clarity refactoring to remove
`ignore_completion_provider`.
Closes#15549
Release Notes:
- Fixed completions menu closing on typing after being requested while
`show_completions_on_input: false`.
The terminal tool card used a fixed height and scrolling, but this meant
that it was too tall for commands that only outputted a few lines, and
the nested scrolling was undesirable.
This PR makes the card be as too as needed to fit the entire output (no
scrolling), and allows the user to collapse it to fewer lines when
applicable. Making it work the same way as the edit tool card. In fact,
both tools now use a shared UI component.
https://github.com/user-attachments/assets/1127e21d-1d41-4a4b-a99f-7cd70fccbb56
Release Notes:
- Agent: Display full terminal output
- Agent: Allow collapsing terminal output
Release Notes:
- Debugger Beta: `shift-escape` (`workspace::ToggleZoom`) now zooms the
entire debug panel; `alt-shift-escape` (`debugger::ToggleExpandItem`)
triggers the old behavior of zooming a specific item.
Release Notes:
- Debugger Beta: if there is no stopped or running session, `f5` now
reruns the last session, or opens the new session modal if there is no
previously-run session.
Also adds reuse of the markdown documentation cache even when
completions are re-queried, so that markdown documentation doesn't
flicker when `is_incomplete: true` (completions provided by rust
analyzer always set this)
Release Notes:
- Added support for filtering language server completions instead of
re-querying.
This PR updates the name of the `NewSessionModal` to `NewProcessModal`
(to reflect it's new purpose), changes the tabs in the modal to read
`Run | Debug | Attach | Launch` and changes the associated types in code
to match the tabs. In addition, this PR adds a few labels to the text
fields in the `Launch` tab, and adds a link to open the associated
settings file. In both debug.json files, added links to the zed.dev
debugger docs.
Release Notes:
- Debugger Beta: Improve the new process modal
When we moved to schema-based debug configs, we've added validate_config
- a trait method
that is supposed to both validate the configuration and determine
whether it is a launch configuration
or an attach configuration.
The validation bit is a bit problematic though - we received reports on
Discords about
scenarios not starting up properly; it turned out that Javascript's
implementation was overly strict.
Thus, I got rid of any code that tries to validate the config - let's
let the debug adapter itself
decide whether it can digest the configuration or not. validate_config
is now left unimplemented for most
DebugAdapter implementations (except for PHP), because all adapters use
`request`: 'launch'/'attach' for that.
Let's leave the trait method in place though, as nothing guarantees this
to be true for all adapters.
cc @Anthony-Eid
Release Notes:
- debugger: Improved error messages when the debug scenario is not
valid.
- debugger: Fixed cases where valid configs were rejected.
…ailed (#31291)"
This reverts commit aab76208b5.
Closes#31737
I cannot repro the original issue that this commit was trying to solve
anymore.
Release Notes:
- N/A
Release Notes:
- Debugger Beta: added a button to the quick action bar to start a debug
session or spawn a task, depending on which of these actions was taken
most recently.
- Debugger Beta: incorporated the tasks modal into the new session modal
as an additional tab.
---------
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
Co-authored-by: Julia Ryan <p1n3appl3@users.noreply.github.com>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Mikayla <mikayla@zed.dev>
Release Notes:
- Debugger Beta: Added a spinner to the debug panel when a session is
starting up.
---------
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Julia <julia@zed.dev>
Add `(child)` instead of using the same label.
Release Notes:
- Debugger Beta: Made child sessions appear distinct from their parents
in the session selector.
@osiewicz @SomeoneToIgnore If you guys have time to look this over it
would be greatly appreciated. I wanted to move the bug fix into the task
resolution code but wasn't sure if there was a reason that we didn't
already.
The bug is caused by an env variable being empty when we send it as a
terminal command. When the shell resolves all the env variables there's
an extra space that gets added due to the empty env variable being
placed between two other variables.
Closes#31240
Release Notes:
- debugger beta: Fix a bug where debug main Rust runner action wouldn't
work
Closes #ISSUE
Release Notes:
- debugger: Python tests/main functions can now we debugged from the
gutter.
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
I added a test to this too as one of my first steps of improving
`NewSessionModal`'s test coverage.
Release Notes:
- debugger beta: Select saved debug config when opening debug.json from
`NewSessionModal`
test that check's that each conversion works properly based on the
adapter's config validation function.
Co-authored-by: Zed AI \<ai@zed.dev\>
Release Notes:
- debugger beta: Fix bug where Go/GDB configuration's wouldn't work from
NewSessionModal
This PR adds actions for copying variable names and values and editing
variable values from the variable list. Previously these were only
accessible using the mouse. It also fills in keybindings for expanding
and collapsing entries on Linux that we already had on macOS.
Release Notes:
- Debugger Beta: Added the `variable_list::EditVariable`,
`variable_list::CopyVariableName`, and
`variable_list::CopyVariableValue` actions and default keybindings.
This works the same as selecting the first history match in the new
session modal.
Release Notes:
- Debugger Beta: Added the `debugger: rerun last session` action, bound
by default to `alt-f4`.
Editing JSON styles is not very helpful for bringing style changes back
to the actual code. This PR adds a buffer that pretends to be Rust,
applying any style attribute identifiers it finds. Also supports
completions with display of documentation. The effect of the currently
selected completion is previewed. Warning diagnostics appear on any
unrecognized identifier.
https://github.com/user-attachments/assets/af39ff0a-26a5-4835-a052-d8f642b2080c
Adds a `#[derive_inspector_reflection]` macro which allows these methods
to be enumerated and called by their name. The macro code changes were
95% generated by Zed Agent + Opus 4.
Release Notes:
* Added an element inspector for development. On debug builds,
`dev::ToggleInspector` will open a pane allowing inspecting of element
info and modifying styles.
This regression happens because our tests weren't properly catching this
edge case anymore. I updated the tests to only send the raw config to
the Fake Adapter Client.
Release Notes:
- debugger beta: Fix bug where launch args were sent twice
If gdb doesn't send a thread name we display the thread's process id in
the thread drop down menu instead now.
Co-authored-by: Remco Smits \<djsmits12@gmail.com\>
Release Notes:
- debugger beta: Handle bug where DAPs don't send thread names
- Make remembering focus work with `ActivatePaneDown` as well
- Tone down the console's focus-in behavior so clicking doesn't
misbehave
Release Notes:
- N/A
This PR replaces some `update()` calls with either `read()` or
`read_with()` when the `update()` call performed read-only operations on
the entity.
Many more likely exist, will follow-up with more PRs.
Release Notes:
- N/A
Release Notes:
- Debugger Beta: Fixed a bug where environment variables were not
substituted in debug tasks in some cases.
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Remco Smits <djsmits12@gmail.com>