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
This PR removes the wiring for `assistant2` that hooks it up to Zed.
Since we're focusing in on improving the current assistant, we don't
need this present in Zed.
I left the `assistant2` crate intact for now, to make it easier to
reference any code from it.
Release Notes:
- N/A
This PR sets up the `assistant2` crate with the storybook so that UI
elements can be iterated on in isolation.
To start, we have some stories for the `ChatMessage` component:
```sh
cargo run -p storybook -- components/assistant_chat_message
```
<img width="1233" alt="Screenshot 2024-04-30 at 5 20 03 PM"
src="https://github.com/zed-industries/zed/assets/1486634/510967ea-0e9b-4fa9-94fb-421ee74bcc45">
Release Notes:
- N/A
This is a follow up of #10810 , `embed-resource` crate uses a different
method to link the manifest file, so this makes moving manifest file to
`gpui` possible.
Now, examples can run as expected:
![Screenshot 2024-04-26
111559](https://github.com/zed-industries/zed/assets/14981363/bb040690-8129-490b-83b3-0a7d3cbd4953)
TODO:
- [ ] check if it builds with gnu toolchain
Release Notes:
- N/A
use winresource for crates/zed and crates/storybook. tested on
`x86_64-pc-windows-gnu`. on `x86_64-pc-windows-msvc` I receive a error
message, that looks like a problem with my machine
Release Notes:
- N/A
crates/languages and extensions/gleam: handle different target envs (a
new variant of os: `pc-windows-gnu`)
crates/storybook: compile manifest for all windows targets (same as
#9815)
looks like fixes#9807, but there are still errors presented
<details>
```
[2024-03-27T12:07:25+03:00 INFO Zed] ========== starting zed ==========
[2024-03-27T12:07:26+03:00 INFO cosmic_text::font::system] Parsed 398 font faces in 60ms.
[2024-03-27T12:07:26+03:00 INFO db] Opening main db
[2024-03-27T12:07:26+03:00 ERROR util] crates\settings\src\settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-03-27T12:07:26+03:00 ERROR util] crates\settings\src\keymap_file.rs:89: invalid binding value for keystroke escape, context Some("ChatPanel > MessageEditor")
Caused by:
no action type registered for chat_panel::CloseReplyPreview
[2024-03-27T12:07:26+03:00 INFO gpui::platform::windows::platform] use DCompositionWaitForCompositorClock for vsync
[2024-03-27T12:07:26+03:00 ERROR util] crates\zed\src\zed.rs:629: EOF while parsing a value at line 1 column 0
[2024-03-27T12:07:26+03:00 ERROR util] crates\zed\src/main.rs:720: Системе не удается найти указанный путь. (os error 3)
[2024-03-27T12:07:26+03:00 INFO db] Opening main db
[2024-03-27T12:07:26+03:00 INFO node_runtime] Node runtime install_if_needed
[2024-03-27T12:07:26+03:00 ERROR util] crates\workspace\src/workspace.rs:912: Error in last_window, select_row_bound expected single row result but found none for: SELECT
display,
window_state,
window_x,
window_y,
window_width,
window_height,
fullscreen
FROM
workspaces
WHERE
workspace_location IS NOT NULL
ORDER BY
timestamp DESC
LIMIT
1
[2024-03-27T12:07:26+03:00 INFO blade_graphics::hal::init] Adapter "NVIDIA GeForce RTX 3050 Ti Laptop GPU"
[2024-03-27T12:07:26+03:00 INFO blade_graphics::hal::init] Ray tracing is supported
[2024-03-27T12:07:27+03:00 WARN blade_graphics::hal::init] Requested size 1x1 is outside of surface capabilities
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_impl")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_device_position_transformed")
[2024-03-27T12:07:27+03:00 INFO naga:🔙:spv::writer] Skip function Some("to_tile_position")
[2024-03-27T12:07:27+03:00 INFO blade_graphics::hal::resource] Creating texture 0x2b2528fec20 of size 1024x1024x1 and format R8Unorm, name 'atlas', handle 0
[2024-03-27T12:07:27+03:00 INFO blade_graphics::hal::resource] Creating buffer 0x2b2524762a0 of size 65536, name 'chunk-0', handle 1
[2024-03-27T12:07:27+03:00 INFO blade_graphics::hal::resource] Creating buffer 0x2b252477ba0 of size 4096, name 'chunk-0', handle 2
[2024-03-27T12:07:27+03:00 INFO blade_graphics::hal::resource] Creating buffer 0x2b2524765c0 of size 9184, name 'chunk-1', handle 3
[2024-03-27T12:07:27+03:00 ERROR util] crates\copilot_ui\src\copilot_completion_provider.rs:207: copilot is still starting
error: process didn't exit successfully: `target\release\Zed.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
fish: Job 1, 'RUST_BACKTRACE=full RUST_LOG=in…' terminated by signal SIGSEGV (Address boundary error)
```
</details>
Release Notes:
- N/A
This PR moves the Clippy configuration up to the workspace level.
We're using the [`lints`
table](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table)
to configure the Clippy ruleset in the workspace's `Cargo.toml`.
Each crate in the workspace now has the following in their own
`Cargo.toml` to inherit the lints from the workspace:
```toml
[lints]
workspace = true
```
This allows for configuring rust-analyzer to show Clippy lints in the
editor by using the following configuration in your Zed `settings.json`:
```json
{
"lsp": {
"rust-analyzer": {
"initialization_options": {
"check": {
"command": "clippy"
}
}
}
}
```
Release Notes:
- N/A
This PR sets up a `cargo xtask clippy` command for running `cargo
clippy` with our defined set of options.
The intent is to make this easier to manage as we start enabling more
Clippy rules.
Release Notes:
- N/A
Following-up on #8330
Invocation
```bash
cargo-machete --with-metadata --skip-target-dir --fix
````
There is more stuff to fix, but it chokes on `async-lock`:
```
cargo-machete found the following unused dependencies in /x/Code/zed:
rpc -- /x/Code/zed/crates/rpc/Cargo.toml:
async_lock
prost_build
serde_derive
Error: Dependency async_lock not found
```
Release Notes:
- N/A
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.
This should make them easier to visually scan when looking for a
dependency.
Apologies in advance for any merge conflicts 🙈
Release Notes:
- N/A
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?
Release Notes:
- N/A
This PR adds some basic stories for collab notifications to make them
easier to work on:
<img width="1076" alt="Screenshot 2024-01-08 at 9 43 39 PM"
src="https://github.com/zed-industries/zed/assets/1486634/4a0adcfa-1134-49c2-b589-74ac1d52af4c">
I factored out a `CollabNotification` component that defines the general
structure for one of these notifications, and this is the component that
we use in the stories, with representative values passed to it to
simulate the different instances of the notification.
We can't use the actual notification components in the stories due to
their data dependencies.
Release Notes:
- N/A
This PR deletes the old `ui` and `storybook` crates in favor of their
newer variants that we'll be landing to `main` in the near future.
### Motivation
These crates are based off the old version of GPUI 2 (the `gpui2`
crate).
At this point we have since transitioned to the new version of GPUI 2
(the `gpui3` crate, currently still on the `gpui2` branch).
Having both copies around is confusing, so the old ones are going the
way of the dinosaurs.
Release Notes:
- N/A
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate <nate@zed.dev>
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate <nate@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
This PR removes the need for writing manual mappings in the `FromStr`
implementation for the `StorySelector` enum used in the storybook CLI.
We are now using the
[`EnumString`](https://docs.rs/strum/0.25.0/strum/derive.EnumString.html)
trait from `strum` to automatically derive snake_cased names for the
enums.
This will cut down on some of the manual work needed to wire up more
stories to the storybook.
Release Notes:
- N/A
This PR updates the `storybook` with support for adding stories for
individual components.
### Motivation
Right now we just have one story in the storybook that renders an entire
`WorkspaceElement`.
While iterating on the various UI components, it will be helpful to be
able to create stories of those components just by themselves.
This is especially true for components that have a number of different
states, as we can render the components in all of the various states in
a single layout.
### Explanation
We achieve this by adding a simple CLI to the storybook.
The `storybook` binary now accepts an optional `[STORY]` parameter that
can be used to indicate which story should be loaded. If this parameter
is not provided, it will load the workspace story as it currently does.
Passing a story name will load the corresponding story, if it exists.
For example:
```
cargo run -- elements/avatar
```
<img width="723" alt="Screenshot 2023-09-21 at 10 29 52 PM"
src="https://github.com/zed-industries/zed/assets/1486634/5df489ed-8607-4024-9c19-c5f4541f97c9">
```
cargo run -- components/facepile
```
<img width="785" alt="Screenshot 2023-09-21 at 10 30 07 PM"
src="https://github.com/zed-industries/zed/assets/1486634/e04a4577-7403-405d-b23c-e765b7a06229">
Release Notes:
- N/A