So this changes the behavior for providing variables for autocompletion inside the debug console if the adapter does not support autocompletion.
Before this change you would get variables based on the selected stack frame. But this is not correct, as you cannot use variables that are not in scope anymore. So changing it to only provide variables for the current(first) stack frame we should provide variables that could always be used for autocompletion and for expressions.
* Remove output editor
* Implement output grouping
* Remove OutputGroup when we found the end position
* Fix make gutter smaller
* Render placeholder
* Show group end on the same level as group start
* Add tests
* Add support for collapsed grouped output
* Fix crease placeholder is not showing up
* Don't trim output multiple times
* Update tests
* Fix clippy
* WIP Start work to send all dap client requests with request_dap
* Continue work on converting dap client requests
* WIP setup dap command for proto dap requests
* WIP dap command
Co-authored-by: Remco Smits <djsmits12@gmail.com>
* revert "WIP dap command"
This reverts commit fd2a6832b667aa23caf588c3ab55243319bc1654.
Co-authored-by: Remco Smits <djsmits12@gmail.com>
* More WIP with Dap Command trait
Co-authored-by: Remco Smits <djsmits12@gmail.com>
* Get step over command to work with remote dap clients
Co-authored-by: Remco Smits <djsmits12@gmail.com>
* Fix thread status not being set to stop on remote debug panel items
* Create a inner wrapper type to use for dap remote step requests
* Implement step in,back,out for remote debugger sessions
* Add Continue Command
* Add more dap command impls
TerminateThreads, Pause, and Disconnect. As well as a shutdown session request downstream clients can send to host
* Add Disconnect & Terminate dap command impls
* Add basic dap proxy test over collab
* Fix clippy error
* Start work on syncing breakpoint thread status
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Carter Canedy <cartercanedy42@gmail.com>
* WIP Fix thread status not syncing
* Add thread state model's to remote debug panels when setting panel items
* Sync thread state on step out command
---------
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Carter Canedy <cartercanedy42@gmail.com>
* Switch debug session exited without hitting breakpoint to toast notification
* Move notify below the thread event, so we register the thread is added
---------
Co-authored-by: Remco Smits <djsmits12@gmail.com>
I updated the tests so we don't reuse the debug panel item for each operation, instead we request a new instance each time so we can ensure the status actually changed.
* WIP
* Add assert helper for variable list visual entries
* Wip rework toggle entry (scope/variable) code
* Remove commented code
* Move colors to struct
* Add entry to selection if you click on them
* Add selected option to visual entries assert
* Use pretty assertions for visual entries assert helper
* Use focus handle method to give focus handle
* Register select first and last actions
* Correctly format selected entry
* Add tests helper to get active debug panel item
* Add tests for keyboard navigation
* Remove not needed comment
* Move other tests to test helper
This also removes a test that is duplicated with the keyboard navigation tests, it covers the same
* Update console test to use new test helper
* Fix failing test
I forgot to update the test, because we now always send a body back in a error case.
* Fix clippyyyy
Not sure why scroll was janky with `Autoscroll::newest()`, but this
appears to fix it. Probably better to conditionally do the autoscroll
requests anyway.
Release Notes:
- N/A
Closes#18737
Release notes:
- Improved LSP debug logs by defaulting to soft wrap and folding a
suffix of long lines. Also adds autoscroll, so if the cursor is on the
last line of the logs they will scroll like `tail`.
When thread status is not Stopped users are unable to click buttons. So the thread status
needs to be reset if any of the above requests fail or else a user loses to ability to
click any of the debug buttons related to those requests
- Move function queries under constant queries to avoid uppercase
functions highlighted as constants
- Merge keywords and remove duplicates
- Highlights type aliases on import
- Highlights literal built-in types (null, undefined, true, false) as
`@type.builtin`
Confused about case-based queries, should they be rewritten?
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR also removes the `ThumbsUp` action that wasn't being triggered
correctly. We didn't have it's counterpart `ThumbsDown`, too, so I
mostly assumed it would be harmless to remove `ThumbsUp` as well.
<img width="800" alt="Screenshot 2025-01-10 at 6 18 44 PM"
src="https://github.com/user-attachments/assets/9fd5da9f-9dff-454d-9f31-c02f1370b937"
/>
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR makes it so we install `cargo-nextest` with `cargo install
cargo-nextest --locked` in CI.
According to the
[docs](https://nexte.st/docs/installation/from-source/), this is the
**only** supported way to install `cargo-nextest` when building from
source.
Release Notes:
- N/A
This PR removes some unneeded `#[allow(unused)]`s from the context types
in Assistant2.
We're using these fields now, so we no longer need to suppress the
unused lint.
Release Notes:
- N/A
Before this change, inline completion would displace the user's
selection. Unfortunately this brings less visibility to the inline
completion, I think a good solution to this will be to display a chunk
of the completion inline in the menu, and have a WIP change for that.
Since the current behavior is frustrating, not blocking this improvement
on that
Release Notes:
- N/A
Add a missing } in the multiple formatters example in the configuring
Zed section of the manual.
Release Notes:
- Fixed a missing } in the multiple formatters doc example
We weren't showing the keybinding in none of the places where the model
selector was visible. Also, I took advantage of the opportunity to
change the keybinding for two reasons:
1. `cmd-shift-m` caused conflict if on an editor (inline assistant case)
2. `cmd-opt-/` is the one Cursor uses; so consistency with something
that might be already consolidated sounds like a low-hanging fruit
| Editor Inline Assist | Terminal Inline Assist | Assistant Panel |
|--------|--------|--------|
| <img width="1336" alt="Screenshot 2025-01-10 at 11 01 24 AM"
src="https://github.com/user-attachments/assets/0782f217-025f-4bc0-b2fa-64b3524c968b"
/> | <img width="1336" alt="Screenshot 2025-01-10 at 11 01 29 AM"
src="https://github.com/user-attachments/assets/d05a3b5c-33fd-4593-b1d8-aa9944de816a"
/> | <img width="1336" alt="Screenshot 2025-01-10 at 11 01 33 AM"
src="https://github.com/user-attachments/assets/8cb075e7-ccde-46f5-aa05-d20a9d42b286"
/> |
Release Notes:
- N/A
The context picker will now display up to 6 recent files/threads to add
as a context:
<img
src="https://github.com/user-attachments/assets/80c87bf9-70ad-4e81-ba24-7a624378b991"
width=400>
Note: We decided to use a `ContextMenu` instead of `Picker` for the
initial one since the latter didn't quite fit the design for the
"Recent" section.
Release Notes:
- N/A
---------
Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Follow-up of https://github.com/zed-industries/zed/pull/22866
Added a config option to the markdown renderer to omit code copying
buttons, and used those for editor hover popovers.
Such popovers are quite frequent in language servers' hover responses,
e.g. rust-analyzer on `.clone()` hover may respond with
```
{"jsonrpc":"2.0","id":119,"result":{"contents":{"kind":"markdown","value":"\n```rust\nalloc::string::String\n```\n\n```rust\nfn clone(&self) -> Self\n```\n\n---\n\nReturns a copy of the value.\n\n# Examples\n\n```rust\nlet hello = \"Hello\"; // &str implements Clone\n\nassert_eq!(\"Hello\", hello.clone());\n```"},"range":{"start":{"line":518,"character":24},"end":{"line":518,"character":29}}}}
```
(note multiple code blocks sent)


Sounds that editor has either to use a different way to copy popover's
data (so the entire text gets copied, not just its code blocks), or at
least better handle hover popover's hovering to show the button.
Release Notes:
- N/A
Before this commit downstream clients in active debug sessions relied
on the host to send them the active debug line. This had three main
limitations (Which are solved by this commit)
1. Downstream clients didn't have the ability to click on their own stack
frame list and go to that frame's location
2. Downstream clients would always follow the host when checking out stack
frames even from a different debug adapter or thread
3. If a user joins an active debug session they wouldn't have an active
debug line until the host's debug adapter sent another stop event