This change pulls in https://github.com/kvark/blade/pull/135 and updates
the simplelog dependency for compatibility with that.
Release Notes:
- linux: Show link to troubleshooting docs when we can't open a window
The biggest hurdle turned out to be use of `Arc<Language>` in maps, as
`clippy::mutable_key_type` started triggering on it (due to - I suppose
- internal mutability on `HighlightMap`?). I switched over to using
`LanguageId` as the key type in some of the callsites, as that's what
`Language` uses anyways for it's hash/eq, though I've still had to
suppress the lint outside of language crate.
/cc @maxdeviant , le clippy guru.
Release Notes:
- N/A
Release Notes:
- Move snippet support into core editor experience, marking the official
extension as deprecated. Snippets now show up in any buffer (including
plain text buffers).
This PR consists of two main changes:
1. The first commit changes the `open` crate for opening URLs/paths for
the `OpenURI` desktop portal. This fixes the activation token not being
passed to programs (at least on KDE).
2. The second commit implements the window `activate()` API on Wayland.
This allows KWin and Mutter to show a visual indicator when the window
is requesting attention. (see
https://github.com/zed-industries/zed/issues/12557)
![image](https://github.com/zed-industries/zed/assets/71973804/ce148f8e-28fd-4249-8f8d-3a5828ed6f83)
Release Notes:
- N/A
This PR renames the `ui_text_field` crate to `ui_input` to make it a bit
more generic.
We'll likely end up with multiple kinds of input components in this
crate.
Release Notes:
- N/A
This PR updates the `extension` crate's tests to use a dedicated test
extension for its tests instead of the real Gleam extension.
As the Gleam extension continues to evolve, it makes it less suitable to
use as a test fixture:
1. For a while now, the test has failed locally due to me having `gleam`
on my $PATH, which causes the extension's `get_language_server_command`
to go down a separate codepath.
2. With the addition of the `indexed_docs_providers` the test was
hanging indefinitely.
While these problems are likely solvable, it seems reasonable to have a
dedicated extension to use as a test fixture. That way we can do
whatever we need to exercise our test criteria.
The `test-extension` is a fork of the Gleam extension with some
additional functionality removed.
Release Notes:
- N/A
This PR does some organization in the workspace's `Cargo.toml`.
Namely, ensuring the dependency lists of internal and external
dependencies remain separate.
Release Notes:
- N/A
This PR begins the process of making the backing infrastructure for the
`/rustdoc` command more generic such that it can be applied to
additional documentation providers.
In this PR we:
- Rename the `rustdoc` crate to `indexed_docs` as a more general-purpose
name
- Start moving rustdoc-specific functionality into
`indexed_docs::providers::rustdoc`
- Add an `IndexedDocsRegistry` to hold multiple `IndexedDocsStore`s (one
per provider)
We haven't yet removed the rustdoc-specific bits in the `DocsIndexer`.
That will follow soon.
Release Notes:
- N/A
This PR extracts a singular title bar (`title_bar::TitleBar`) from
`ui::TitleBar` and
`collab_ui::collab_titlebar_item::CollabTitlebarItem`.
This is a first step towards organizing title bar things into one place,
and standardizing platform titlebar/window control implementations.
Release Notes:
- N/A
Bumping the image crate for better support of image formats.
The latest version does not have a `BGRA` type it only has `RGBA` it
doesn't really matter as the size is the same but the type name is a
little confusing as we need it as `BGRA`. Also there is no `into_bgra8`
but we can use `into_rgba8` but then it must be converted before
creating the `ImageData`.
Release Notes:
- N/A
codegen-units determines how many object files are used when building a
single crate. By default it is set to 256 in dev builds and to 16 in
release builds. Higher values can get in the way of optimizations, but
they should help when performing an incremental build (as higher
granularity means that it's less likely we'd have to rebuild the whole
crate). When we were tinkering with Linux builds we found that we're
spreading ourselves too thin at times; large values of codegen-units
were making builds of smaller crates, such as file_finder, redundantly
long, where some CGs were miniscule. This PR significantly reduces the #
of CGs we use in dev builds. This means that an incremental build of a
crate might have to rebuild a bit more, but overall, we should be
spending *less* time in multicrate builds.
As a result of this change, incremental build of gpui (`cargo build;
touch crates/gpui/src/gpui.rs; cargo build`) goes down from 29-32s to
22s on my machine. Same scenario for editor: 13s to 11s. I've ran `cargo
clean` before executing each run
Release Notes:
- N/A
Co-authored-by: Thorsten <thorsten@zed.dev>
Fixes https://github.com/zed-industries/zed/issues/13073
Note that, contrary to the issue's text, we're still shipping a
statically bundled sqlite3 after this PR. We use enough new features of
sqlite, like `sqlite3_error_offset` and `STRICT`, that our minimum
version (v3.38.0) is higher than is presumably accessible on Ubuntu.
Release Notes:
- N/A
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Based on the work on GLES support of @kvark, only two pieces were
missing for usable GLES support:
- https://github.com/kvark/blade/pull/125 was upstreamed 2 weeks ago and
is contained in the currently referenced zed-industries/blade fork
- https://github.com/kvark/blade/pull/126 was upstreamed 17 hours ago
and is not contained in the zed-industries fork. As the zed-industries
fork was also upstreamed in https://github.com/kvark/blade/pull/128, we
can switch back to mainline blade.
If you don't want to switch back to mainline blade, please integrate
https://github.com/kvark/blade/pull/126 to your fork.
Release Notes:
- Fix GLES backend (#9581)
Note that right now we can't attach a language server to arbitrary
buffer, which is why I've listed a bunch of languages verbatim.
See
https://github.com/zed-industries/simple-completion-language-server/tree/main
for docs on how to define your snippets. They should be placed in
~/.config/zed/snippets ; `snippets.(toml|json)` file can be used to
define language-agnostic snippets, and any other name (e.g.
`python.toml`) will apply only to buffers of that particular type.
There's https://github.com/rafamadriz/friendly-snippets you can use as a
repository of snippets, for your convenience.
Fixes https://github.com/zed-industries/zed/issues/4611
Release Notes:
- Added support for snippets via simple-completion-language-server
This PR extracts the definition of the various Zed paths out of `util`
and into a new `paths` crate.
`util` is for generic utils, while these paths are Zed-specific. For
instance, `gpui` depends on `util`, and it shouldn't have knowledge of
these paths, since they are only used by Zed.
Release Notes:
- N/A
Run any Jupyter kernel in Zed on any buffer (editor):
<img width="1074" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/eac8ed69-d02b-4d46-b379-6186d8f59470">
## TODO
### Lifecycle
* [x] Launch kernels on demand
* [x] Wait for kernel to be started
* [x] Request Kernel info on start
* [x] Show in progress indicator
* [ ] Allow picking kernel (it defaults to first matching language name)
* [ ] Menu for interrupting and shutting down the kernel
* [ ] Drop running kernels once editor is dropped
### Media Outputs
* [x] Render text and tracebacks with ANSI color handling
* [x] Render markdown as text
* [x] Render PNG and JPEG images using an explicit height based on
line-height
* ~~Render SVG~~ -- not happening for this PR due to lack of text in SVG
support
* [ ] Process `update_display_data` message and related `display_id`
* [x] Process `page` data from payloads as outputs
* [ ] Render markdown as, well, rendered markdown -- Note: unsure if we
can get line heights here
### Document
* [x] Select code and run
* [x] Run current line
* [x] Clear previous overlapping runs
* [ ] Support running markdown code blocks
* [ ] Action to export session as notebook or output files
* [ ] Action to clear all outputs
* [ ] Delete outputs when lines are deleted
## Other missing features
The following is a list of missing functionality or expectations that
are out of scope for this PR.
### Python Environments
Detecting python environments should probably be done in a separate PR
in tandem with how they're used with LSP. Users likely want to pick an
environment for their project, whether a virtualenv, conda env, pyenv,
poetry backed virtualenv, or the system. Related issues:
* https://github.com/zed-industries/zed/issues/7646
* https://github.com/zed-industries/zed/issues/7808
* https://github.com/zed-industries/zed/issues/7296
### LSP Integration
* Submit `complete_request` messages for completions to interleave
interactive variables with LSP
* LSP for IPython semantics (`%%timeit`, `!ls`, `get_ipython`, etc.)
## Future release notes
- Run code in any editor, whether it's a script or a markdown document
Release Notes:
- N/A
- Update `windows-rs` from `0.56` to `0.57`
- Use the newly introduced `Owned` struct in `0.57` to handle the RAII
stuff of `HANDLE`
- Better error handling in `DirectWrite`
Release Notes:
- N/A
This PR adds a first pass at a rustdoc crawler.
We'll be using this to get information about a crate from the rustdoc
artifacts for use in the Assistant.
Release Notes:
- N/A
---------
Co-authored-by: Richard <richard@zed.dev>
Closes#4424.
A few design decisions that may need some rethinking or later PRs:
* Other providers have a check for authentication. I use this
opportunity to fetch the models which doubles as a way of finding out if
the Ollama server is running.
* Ollama has _no_ API for getting the max tokens per model
* Ollama has _no_ API for getting the current token count
https://github.com/ollama/ollama/issues/1716
* Ollama does allow setting the `num_ctx` so I've defaulted this to
4096. It can be overridden in settings.
* Ollama models will be "slow" to start inference because they're
loading the model into memory. It's faster after that. There's no UI
affordance to show that the model is being loaded.
Release Notes:
- Added an Ollama Provider for the assistant. If you have
[Ollama](https://ollama.com/) running locally on your machine, you can
enable it in your settings under:
```jsonc
"assistant": {
"version": "1",
"provider": {
"name": "ollama",
// Recommended setting to allow for model startup
"low_speed_timeout_in_seconds": 30,
}
}
```
Chat like usual
<img width="1840" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/4e0af266-4c4f-4d9e-9d74-1a91f76a12fe">
Interact with any model from the [Ollama
Library](https://ollama.com/library)
<img width="587" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/87433ac6-bf87-4a99-89e1-96a93bf8de8a">
Open up the terminal to download new models via `ollama pull`:
![image](https://github.com/zed-industries/zed/assets/836375/af7ec411-76bf-41c7-ba81-64bbaeea98a8)
TODO:
- [x] Finish GPUI changes on other operating systems
This is a largely internal change to how we report data to our
diagnostics and telemetry. This PR also includes an update to our blade
backend which allows us to report errors in a more useful way when
failing to initialize blade.
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This PR removes the `color` crate, as it was not used anywhere.
We had added this experimentally, but right now its existence is just a
source of confusion.
Release Notes:
- N/A
This PR adjusts the extension download counts to be displayed using
thousands separators.
Release Notes:
- Adjusted extension download counts to display with thousands
separators (e.g., `1,000,000`).
This PR overhauls the HTML to Markdown conversion functionality in order
to make it more pluggable. This will ultimately allow for supporting a
variety of different HTML input structures (both natively and via
extensions).
As part of this, the `rustdoc_to_markdown` crate has been renamed to
`html_to_markdown`.
The `MarkdownWriter` now accepts a list of trait objects that can be
used to drive the conversion of the HTML into Markdown. Right now we
have some generic handler implementations for going from plain HTML
elements to their Markdown equivalents, as well as some rustdoc-specific
ones.
Release Notes:
- N/A
Using the file system as a database seems like it's easy, but it's
actually a real pain. I'd like to use LMDB to store the prompts locally
so we have more control. We can always add an export option, but I want
the source of truth to be somewhere other than the file system.
So far, I have a PromptStore which is global to the application and can
be initialized on startup. Then there's a `PromptLibrary` which is
intended to be the root of a new kind of Zed window. I haven't actually
seen pixels yet, but I've sketched out the basics needed to create a new
prompt, save, etc.
Still lots to figure out but the foundations of being backed by a DB and
rendering in an independent window are in place.
/cc @iamnbutler @as-cii
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
- Added support for xdg trash when deleting files on linux
- moved ashpd depency to toplevel to use it in both fs and gpui
If I need to add test, or change anything, please let me know. I tested
locally by creating and deleting a file and confirming it showed up in
my trashcan, but that probably a less than ideal method of confirming
correct behavior
Also, I could remove the delete directory function for linux, and change
the one configured for macos to compile for both macos and linux (they
are the same, the version of the function they are calling is
different).
Release Notes:
- N/A
This PR adds a new crate for converting rustdoc output to Markdown.
We're leveraging Servo's `html5ever` to parse the Markdown content, and
then walking the DOM nodes to convert it to a Markdown string.
The Markdown output will be continued to be refined, but it's in a place
where it should be reasonable.
Release Notes:
- N/A
Release Notes:
- N/A
Picks up https://github.com/kvark/blade/pull/118Fixes#10351
Seeing that Zed loaded with Blade repository is consuming 260Mb of RAM.
We can tune this to be lower, but ultimately it doesn't matter: this
memory isn't wasted, it's just pools for memory and descriptors, which
may be used by bigger and more complex views of Zed.
Rust recently got the ability to check for typos or errors in `cfg`
attributes: https://blog.rust-lang.org/2024/05/06/check-cfg.html
This PR fixes the new warnings.
- gpui can be run with `RUSTFLAGS="--cfg gles"`, make this explicit in
`[workspace.lints.rust]`
- `cfg!(any(test, sqlite))` was just a bug, it should be
`feature(sqlite)`
- the `languages` crate had a `#[cfg(any(test, feature =
"test-support"))]` function without ever declaring the `test-support`
feature
- the `MarkdownTag` enum had a `cfg_attr` for serde without actually
having serde support
Now the only warnings when building are unused fields
`InlayHover.excerpt`, `SavedConversationMetadata.path` ,
`UserTestPlan.allow_client_reconnection` and `SyntaxMapCapture.depth`.
Release Notes:
- N/A
This PR extracts the `SlashCommand` trait (along with the
`SlashCommandRegistry`) from the `assistant` crate.
This will allow us to register slash commands from extensions without
having to make `extension` depend on `assistant`.
Release Notes:
- N/A
Release Notes:
- Added ZED_RELATIVE_FILE (path to current file relative to worktree
root) and ZED_DIRNAME (path to the directory containing current file)
task variables.
Restructure prompts & the prompt library.
- Prompts are now written in markdown
- The prompt manager has a picker and editable prompts
- Saving isn't wired up yet
- This also removes the "Insert active prompt" button as this concept doesn't exist anymore, and will be replaced with slash commands.
I didn't staff flag this, but if you do play around with it expect it to still be pretty rough.
Release Notes:
- N/A
---------
Co-authored-by: Nathan Sobo <1789+nathansobo@users.noreply.github.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Fix: this makes sure we have token counts for the new GPT-4o model.
See: https://github.com/zurawiki/tiktoken-rs/releases/tag/v0.5.9
Release Notes:
- Fix: Token count was missing for the new GPT-4o model.
(I believe this should go in a 0.136.x release)
Currently , on Windows 10, we used a `Timer` to trigger the vsync event,
but the `Timer`'s time precision is only about 15ms, which means a
maximum of 60FPS. This PR introduces a new function to allow for higher
frame rates on Windows 10.
And after reading the codes, I found that zed triggers a draw after
handling mouse or keyboard events, so we don't need to call draw again
when we handle `WM_*` messages. Therefore, I removed the
`invalidate_client_area` function.
Release Notes:
- N/A