2b92508
assistant2: Include previous messages in the thread in the completion request (#21184)
Click to expand commit body
This PR makes it so previous messages in the thread are included when
constructing the completion request, instead of only sending up the most
recent user message.
Release Notes:
- N/A
This PR removes an unnecessary `Pane` that was copied over from
`assistant::AssistantPanel` to `assistant2::AssistantPanel`.
Release Notes:
- N/A
Marshall Bowers
created
9ee1aba
assistant2: Stream in completion text (#21182)
Click to expand commit body
This PR makes it so that the completion text streams into the message
list rather than being buffered until the end.
Release Notes:
- N/A
Marshall Bowers
created
91a565f
Simplify BufferStore's local vs remote state (#21180)
Click to expand commit body
This is a pure refactor, motivated by wanting to introduce to the
BufferStore new logic for opening staged and committed changes.
I found the `BufferStoreImpl` trait a little bit confusing, particularly
how the different implementors of the trait held a handle back to the
owning buffer store. I was able to reduce the amount of code
considerably (-78 lines) by using a two-variant enum instead, similar to
what we do for `LspStore`, `WorktreeStore` and `Worktree`.
Release Notes:
- N/A
This PR adds in rudimentary functionality for sending messages to the
LLM in `assistant2`.
<img width="1079" alt="Screenshot 2024-11-25 at 1 49 11β―PM"
src="https://github.com/user-attachments/assets/5accb749-c034-4fb2-bf55-3ae5bc9529ad">
Release Notes:
- N/A
Attempts to reduce the diagnostics flicker, when editing very
fundamental parts of the large code base in Rust.
https://github.com/user-attachments/assets/dc3f9c21-8c6e-48db-967b-040649fd00da
Release Notes:
- N/A
This reverts #20824 and #20899. After adding them last week we came to
the conclusion that the hints are too distracting in everyday use, see
#21128 for more details.
Release Notes:
- N/A
This PR adds documentation for context servers.
Release Notes:
- N/A
Marshall Bowers
created
b83f104
Do not reuse render cache for nested items whose parents are re-rendered (#21165)
Click to expand commit body
Fixes a bug with terminal splits panicking during writing a command in
the command input
Release Notes:
- N/A
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
Kirill Bulatov
and
Antonio Scandurra
created
08b214d
Rename 'chat' to 'thread' in assistant2 (#21141)
Click to expand commit body
Release Notes:
- N/A
Nathan Sobo
created
aa58cab
Fix offline workspace deserialization with assistant2 (#21159)
5b0fa6e
Hide AI hints on line ends so we can discuss more (#21128)
Click to expand commit body
@bennetbo @as-cii @mrnugget I'm really not liking the hints about AI on
every line. It feels too distracting to me and damaging to the user
experience. I'm wondering if we can hide them and work with design for
other ideas. Or at least talk it through.
Release Notes:
- N/A
Nathan Sobo
created
e85848a
pylsp: Prefer version from user venv (#21069)
Click to expand commit body
Closes #ISSUE
Release Notes:
- pylsp will now use version installed in user venv, if one is
available.
Piotr Osiewicz
created
20bffaf
python: Highlight docstrings for classes and modules (#20486)
Click to expand commit body
Release Notes:
- Add `string.doc` python syntax highlighting to class and module-level
docstrings.
Previously, only docstrings inside python functions were labeled as
`string.doc`, but docstrings can exist at the class or module level too.
This adds the more specific string type for each of those.
*Before*:
<img width="288" alt="image"
src="https://github.com/user-attachments/assets/5a6c4c9d-709c-40e2-8316-31c95084a1a9">
*After*:
<img width="294" alt="image"
src="https://github.com/user-attachments/assets/8212bfa2-2288-4623-aa63-f748a2295ada">
Carroll Wainwright
created
3dcb94c
Correct more app event inconsistencies (#21129)
Click to expand commit body
- Unify welcome page event type string structure
- Differentiate between metric telemetry event and diagnostic telemetry
event
Release Notes:
- N/A
Joseph T. Lyons
created
0395d1b
Clean up app event transformations (#21115)
Click to expand commit body
This needs scrutinized. Detailed breakdown of what events I kept and
threw out here:
https://zed.dev/channel/app-events-17178/notes
I also removed a few fake events and tossed out json properties that
were being inserted for things we don't have logic to track. See PR
review comments below.
I think the only bad data we have are that we were identifying all node,
pnpm, and yarn projects as 'node' in the `project_type` property, so a
few days of lost data there.
Release Notes:
- N/A
Joseph T. Lyons
created
628b96f
assistant2: Sketch in chat editor (#21116)
Click to expand commit body
This PR sketches in the chat editor for `assistant2`.
<img width="1136" alt="Screenshot 2024-11-23 at 1 56 23β―PM"
src="https://github.com/user-attachments/assets/6e979995-c0cf-4a46-8694-fc4a8646336f">
Release Notes:
- N/A
This PR sketches in the toolbar for `assistant2`.
<img width="1136" alt="Screenshot 2024-11-23 at 12 39 49β―PM"
src="https://github.com/user-attachments/assets/ed56fc36-54c8-48d4-8446-6c1f182fcef2">
Release Notes:
- N/A
Marshall Bowers
created
3a04089
Factor out language model selector into its own crate (#21113)
Click to expand commit body
This PR factors the language model selector out into its own
`language_model_selector` crate so that it can be reused in
`assistant2`.
Also renamed it from `ModelSelector` to `LanguageModelSelector` to be a
bit more specific.
Release Notes:
- N/A
This PR breaks ground on a new `assistant2` crate.
In order to see this new version of the assistant, both of the following
must be true:
1. The `assistant2` feature flag is enabled for your user
- It is **not** currently enabled for all staff.
2. You are running a development build of Zed
The intent here is to enable the folks working on `assistant2` to
incrementally land work onto `main` without breaking use of the current
Assistant for anyone.
<img width="1136" alt="Screenshot 2024-11-23 at 10 46 08β―AM"
src="https://github.com/user-attachments/assets/5723a13f-5be1-4486-9460-ead7329ba78e">
Release Notes:
- N/A
Marshall Bowers
created
f30de48
docs: Proto Language is by extension not native (#21096)
Click to expand commit body
Fixes docs to reflect that Protobuf support is via extension.
Comment out references ProtoLS formatter.
Need to test both protols and protobuf-language-server to ensure both work.
Closes https://github.com/zed-industries/zed/issues/21077
* BREAKING: rename `file_finder::OpenMenu` into
`file_finder::ToggleMenu`
* Display the keybinding for menu toggling when the menu is open
* Fix `enter` not working in the menu
Release Notes:
- Fixed enter not working and menu toggle binding not shown in the file
finder menu
This PR overhauls extension registration in order to make it more
modular.
The `extension` crate now contains an `ExtensionHostProxy` that can be
used to register various proxies that the extension host can use to
interact with the rest of the system.
There are now a number of different proxy traits representing the
various pieces of functionality that can be provided by an extension.
The respective crates that provide this functionality can implement
their corresponding proxy trait in order to register a proxy that the
extension host will use to register the bits of functionality provided
by the extension.
Release Notes:
- N/A
Marshall Bowers
created
c9f2c27
Improve error handling and resource cleanup in `linux/x11/window.rs` (#21079)
Click to expand commit body
* Fixes registration of event handler for xinput-2 device changes,
revealed by this improvement.
* Pushes `.unwrap()` panic-ing outwards to callers.
* Includes a description of what the X11 call was doing when a failure
was encountered.
* Fixes a variety of places where the X11 reply wasn't being inspected
for failures.
* Destroys windows on failure during setup. New structure makes it
possible for the caller of `open_window` to carry on despite failures,
and so partially initialized window should be removed (though all calls
I looked at also panic currently).
Considered pushing this through `linux/x11/client.rs` too but figured
it'd be nice to minimize merge conflicts with #20853.
Release Notes:
- N/A
Michael Sloan
created
8240a52
Prevent panels from being resized past the edge of the workspace (#20637)
Click to expand commit body
Closes #20593
Release Notes:
- Fixed a bug where it is possible to get in near-unrecoverable panel
state by resizing the panel past the edge of the workspace.
Co-authored-by: Trace <violet.white.batt@gmail.com>
Mikayla Maki
and
Trace
created
c28f5b1
Allow overrides for json-language-server settings (#20748)
Click to expand commit body
Closes #20739
The JSON LSP adapter now merges user settings with cached settings, and
util::merge_json_value_into pushes array contents from source to target.
Closes https://github.com/zed-industries/zed/issues/13246
Supersedes: https://github.com/zed-industries/zed/pull/16192
I couldn't push to the git fork this user was using, so here's the exact
same PR but with some style nits implemented.
Release Notes:
- Added image rendering to the Markdown preview
---------
Co-authored-by: dovakin0007 <dovakin0007@gmail.com>
Co-authored-by: dovakin0007 <73059450+dovakin0007@users.noreply.github.com>
Mikayla Maki
,
dovakin0007
, and
dovakin0007
created
becc363
Cleanup file_scan_inclusions in default.json (#21073)
Peter Tripp
created
1a0a8a9
Fix picker new_path_prompt throwing "file exists" when saving (#21080)
Click to expand commit body
Fix for getting File exists "os error 17" with `"use_system_path_prompts": false,`
This was reproducible when the first worktree is a non-folder worktree
(e.g. setting.json) so we were trying to create the new file with a path
under ~/.config/zed/settings.json/newfile.ext
Co-authored-by: Conrad Irwin <conrad@zed.dev>
659b1c9
Add the option to hide both the task and command lines in the task output (#20920)
Click to expand commit body
The goal is to be able to hide these lines from a task output:
```sh
β΅ Task `...` finished successfully
β΅ Command: ...
```
---------
Co-authored-by: Peter Tripp <peter@zed.dev>
Hugo Cardante
and
Peter Tripp
created
cb8028c
Use `Extension` trait when registering extension context servers (#21070)
Click to expand commit body
This PR updates the extension context server registration to go through
the `Extension` trait for interacting with extensions rather than going
through the `WasmHost` directly.
Release Notes:
- N/A
This PR adds a function, WindowContext::drop_image, to manually remove a
RenderImage from the sprite atlas. In addition, PlatformAtlas::remove
was added to support this behavior. Previously, there was no way to
request a RenderImage to be removed from the sprite atlas, and since
they are not removed automatically the sprite would remain in video
memory once added until the window was closed. This PR allows a
developer to request the image be dropped from memory manually, however
it does not add automatic removal.
Release Notes:
- N/A
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
william341
,
Piotr Osiewicz
, and
Mikayla Maki
created
852fb51
Canonicalize paths when opening workspaces (#21039)
Click to expand commit body
Closes #17161
Release Notes:
- Added symlink resolution when opening projects from within Zed.
Previously this only happened within zed's cli, but that broke file
watching on Linux when opening a symlinked directory.
Conrad Irwin
created
d489f96
Don't name `ExtensionLspAdapter` in `ExtensionRegistrationHooks` (#21064)
Click to expand commit body
This PR updates the `ExtensionRegistrationHooks` trait to not name the
`ExtensionLspAdapter` type.
This helps decouple the two.
Release Notes:
- N/A
Marshall Bowers
created
b4659bb
Fix inaccurate Ollama context length for qwen2.5 models (#20933)
Click to expand commit body
Since Ollama/llama.cpp do not currently YARN for context length
extension, the context length is limited to `32768`. This can be
confirmed by the Ollama model card.
See corresponding issue on Ollama repo :
https://github.com/ollama/ollama/issues/6865
Co-authored-by: Patrick Samson <1416027+patricksamson@users.noreply.github.com>
Peter Tripp
and
Patrick Samson
created
d5f2bca
Filter LSP code actions based on the requested kinds (#20847)
Click to expand commit body
I've observed that Zed's implementation of [Code Actions On
Format](https://zed.dev/docs/configuring-zed#code-actions-on-format)
uses the
[CodeActionContext.only](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionContext)
parameter to request specific code action kinds from the server. The
issue is that it does not filter out code actions from the response,
believing that the server will do it.
The [LSP
specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionContext)
says that the client is responsible for filtering out unwanted code
actions:
```js
/**
* Requested kind of actions to return.
*
* Actions not of this kind are filtered out by the client before being
* shown. So servers can omit computing them.
*/
only?: CodeActionKind[];
```
This PR will filter out unwanted code action on the client side.
I have initially encountered this issue because the [ZLS language
server](https://github.com/zigtools/zls) (until
https://github.com/zigtools/zls/pull/2087) does not filter code action
based on `CodeActionContext.only` so Zed runs all received code actions
even if they are explicitly disabled in the `code_actions_on_format`
setting.
Release Notes:
- Fix the `code_actions_on_format` setting when used with a language
server like ZLS
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Techatrix
and
Piotr Osiewicz
created
114c462
Maintain selection on file/dir deletion in project panel (#20577)
Click to expand commit body
Closes #20444
- Focus on next file/dir on deletion.
- Focus on prev file/dir in case where it's last item in worktree.
- Tested when multiple files/dirs are being deleted.
Release Notes:
- Maintain selection on file/dir deletion in project panel.
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
14ea462
Add `fs::MTime` newtype to encourage `!=` instead of `>` (#20830)
Click to expand commit body
See ["mtime comparison considered
harmful"](https://apenwarr.ca/log/20181113) for details of why
comparators other than equality/inequality should not be used with
mtime.
Release Notes:
- N/A