Commit Graph

16990 Commits

Author SHA1 Message Date
Max Brunsfeld
b8e6098f60
Consolidate logic for protobuf message handling between ssh and web socket clients (#17185)
This is a refactor to prepare for adding LSP support in SSH remote
projects.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
2024-09-01 10:14:21 -07:00
Marshall Bowers
54ac963bcd
client: Ensure query string values are URL-encoded (#17235)
This PR fixes an issue where the query string values weren't URL-encoded
when authenticating as an admin in development.

Release Notes:

- N/A
2024-09-01 09:53:34 -04:00
Sami Samhuri
b386b6c237
Allow Zed to run under multiple user accounts simultaneously (#14143)
Closes #4607

This is an attempt to enable Zed to run under multiple user accounts on
the same Mac, because it's a blocker to me really giving Zed a fair shot
at being my primary editor.

According to some helpful info from @ForLoveOfCats in #4607 the main
reason why this doesn't work is because Zed is using a Unix socket or
maybe a TCP socket with a hard-coded path and/or port. To me it looks
like it's a TCP socket so I tried changing that code in here, but I'm
stuck at trying to test it out because running `target/debug/zed` or
`target/release/zed` seems to behave differently than running an actual
app bundle. I had no luck copying the binary over to
/Applications/Zed.app/Contents/MacOS/zed because it can't find
WebRTC.framework which resides at a different relative path in the app
bundle.

If this seems like a desirable change to the core team then I'm looking
for some guidance on how to build an app bundle or otherwise test out
this change, or a nudge in the correct direction if I'm way off base
with my current approach.

Release Notes:

- Added multiuser support for up to 100 users on the same machine.

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-09-01 02:46:14 +02:00
Piotr Osiewicz
837639535c
rust: Improve syntax highlighting of methods in completions menu (#17184)
What do all of the syntax-highlighted methods have in common in this
screenshot?
<img width="597" alt="image"
src="https://github.com/user-attachments/assets/7e3cced5-1857-44ca-8000-d2aa3c485726">
They're all trait methods. This is an unfortunate byproduct of how we
parse function signatures and handle details of completions. Other
non-syntax highlighted entries could get the highlighting for free, if
not for the fact that they lack a bit of data that is available for
trait methods.

This PR fixes this problem.
<img width="597" alt="image"
src="https://github.com/user-attachments/assets/065dc929-be00-46fc-a7c3-e63ed7ad6a0a">

Release Notes:

- Improved syntax highlighting of Rust methods in completions menu
2024-09-01 00:24:29 +02:00
Marshall Bowers
03d8e54fd4
Revert "lsp: Watch paths outside of worktrees at language servers request (#17173) (#17206)
This PR reverts #17173, as it introduced a segfault when opening any
Gleam project and the language server starts up.

This reverts commit a850731b0e.

Release Notes:

- N/A
2024-08-31 11:17:01 -04:00
Piotr Osiewicz
a850731b0e
lsp: Watch paths outside of worktrees at language servers request (#17173)
Context: https://x.com/fasterthanlime/status/1819120238228570598

Up to this PR:
- We were not watching paths outside of a worktree when language server
requested it.
- We expected GlobPattern used for file watching to be always rooted at
the worktree root.

'1 mattered for observing global files (e.g. global RA config) and both
points had impact on "monorepos".
Let's picture the following scenario:
You're working on a Rust project that has two crates: bin and lib crate:
```
my-rust-project/
  bin-crate/
  lib-crate/
```
Up to this PR, making changes like changing field visibility in
lib-crate **was not reflected** in bin-crate until RA was restarted. RA
for bin-crate asked us to watch lib-crate. Now, depending on if you had
this project open as:
- a project with one worktree rooted at my-rust-project:
- due to '2, we never noticed that we have to notify RA instance for
bin-crate about changes in lib-crate.
- a project with two worktrees (bin-crate and lib-crate):
- due to '1 (as lib-crate is not within bin-crate's worktree), we once
again missed the fact that we have to watch for changes in lib-crate.

This PR solves this by introducing a side-channel - we just store fs
watchers for abs paths at the Project level. Worktree changes handling
is left relatively untouched - as it's used for other changes besides
LSP change notifying, I've figured to better leave it as is, as right
now we have 1 worktree change watcher; if we were to change it, we'd
have `(language server) + 1` watchers per worktree, which seems.. pretty
horrid.

What's the end effect? At the very least fasterthanlime should be a tad
happier; in reality though, I expect it to have some impact on LS
reliability in monorepo setups.

TODO
- [x] Wire through FileChangeType into `fs::watch` interface.

Release Notes:

- Improved language server reliability in multi-worktree projects and
monorepo. We now notify the language server more reliably about which
files have changed.
2024-08-31 01:32:33 +02:00
Conrad Irwin
d2cb45e9bb
Revert "Make selection more consistent across languages (#17084)" (#17175)
This reverts commit 7db8d80c3090f70b466284e70e9635b0e63528c9.(#17084)

Release Notes:

- N/A
2024-08-30 18:01:39 -04:00
Conrad Irwin
75d4c7981e
Extract an LspStore object from Project, to prepare for language support over SSH (#17041)
For ssh remoting lsps we'll need to have language server support
factored out of project.

Thus that begins

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-30 14:36:38 -07:00
Marshall Bowers
bb9f2f8713
collab: Require github_user_created_at at ingress points (#17180)
This PR makes the `github_user_created_at` field required at ingress
points into collab.

In practice we already have this value passed up, this change just makes
that explicit.

This is a precursor to making it required in the database.

Release Notes:

- N/A
2024-08-30 17:09:59 -04:00
Marshall Bowers
9a8c301a7d
collab: Set github_user_created_at when seeding GitHub users (#17178)
This PR updates the seed script to set the `github_user_created_at`
value for each GitHub user.

Release Notes:

- N/A
2024-08-30 16:40:13 -04:00
Peter Tripp
58c0f39714
OpenAI: Fix GPT-4. Only include max_tokens when max_output_tokens provided (#17168)
- Fixed GPT-4 breakage (incorrect `max_output_tokens` handling).
2024-08-30 14:57:50 -04:00
Conrad Irwin
ee6ec50b15
Fix - being a word character for selections (#17171)
Co-Authored-By: Mikayla <mikayla@zed.dev>
Co-Authored-By: Nate <nate@zed.dev>

Closes #15606
Closes #13515

Release Notes:

- Fixes `-` being considered a word character for selections in some
languages

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Nate <nate@zed.dev>
2024-08-30 12:34:23 -06:00
Marshall Bowers
c0731bfa28
assistant: Fix formatting in settings (#17172)
This PR fixes some formatting issues in `assistant_settings.rs` that
were being caused by long lines.

Release Notes:

- N/A
2024-08-30 14:26:34 -04:00
Marshall Bowers
68ea661711
assistant: Add foundation for receiving tool uses from Anthropic models (#17170)
This PR updates the Assistant with support for receiving tool uses from
Anthropic models and capturing them as text in the context editor.

This is just laying the foundation for tool use. We don't yet fulfill
the tool uses yet, or define any tools for the model to use.

Here's an example of what it looks like using the example `get_weather`
tool from the Anthropic docs:

<img width="644" alt="Screenshot 2024-08-30 at 1 51 13 PM"
src="https://github.com/user-attachments/assets/3614f953-0689-423c-8955-b146729ea638">

Release Notes:

- N/A
2024-08-30 14:05:55 -04:00
Marshall Bowers
ea25d438d1
anthropic: Remove cache_control field from ResponseContent (#17165)
This PR removes the `cache_control` field from the variants in
`ResponseContent`.

This field is used on requests to control the caching behavior, but is
not needed on content in the response.

Release Notes:

- N/A
2024-08-30 12:22:47 -04:00
Marshall Bowers
8901d926eb
anthropic: Use separate Content type in requests and responses (#17163)
This PR splits the `Content` type for Anthropic into two new types:
`RequestContent` and `ResponseContent`.

As I was going through the Anthropic API docs it seems that there are
different types of content that can be sent in requests vs what can be
returned in responses.

Using a separate type for each case tells the story a bit better and
makes it easier to understand, IMO.

Release Notes:

- N/A
2024-08-30 11:46:03 -04:00
Glaudiston Gomes da Silva
00eed768ce
Fix Go test task when using Git submodules (#17108)
I have found an error running tests in Golang projects that use
submodules. This PR fixes the issue by accessing the directory before
running the test.

![image](https://github.com/user-attachments/assets/3790a77c-a07c-4467-be69-ee8e22675f7a)
The `commons` in the image is a git submodule in a subfolder inside a
parent folder where the workspace is set.


Release Notes:

- Fixed Go tests not being able to run in case the package (and the
`go.mod`) was in a nested folder. Pre-defined Go tasks have been changed
to now run in the package's directory. That means `go test ./package
-run MyTest` will run in `./package` and execute `go test -run MyTest`.
Also, `go test ./...` will run in the package directory, not at the root
of the Zed project, which is a small breaking change. In case one wants
to run `go test ./...` from the root, one can spawn a manual task that
does this.


![image](https://github.com/user-attachments/assets/b7c66f6a-ca29-421e-9539-737c8f719ae2)

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-08-30 16:11:27 +02:00
Marshall Bowers
89632ff5c2
gpui: Fix typo in DefaultThemeAppearance doc comment (#17157)
Release Notes:

- N/A
2024-08-30 09:48:13 -04:00
Marshall Bowers
226d683ba4
story: Remove unneeded lib.name (#17156)
This PR removes the `lib.name` field from the `story` crate's
`Cargo.toml`, as it is not needed.

Release Notes:

- N/A
2024-08-30 09:23:45 -04:00
CharlesChen0823
9c8b6f4a9f
workspace: Fix weird behavior when save replaces the existing open file (#17123)
Fixes this weird behavior:
  - open an file, like `test.rs`
  - `ctrl-n` create an new buffer
- `ctrl-s` save new buffer with name `test.rs`, select replace old file.
  - the older open file also exist, this is weird.

Release Notes:

- Fixed two panes staying opening when saving a new buffer with the same filename as a file that was already open.
2024-08-30 15:12:42 +02:00
Jason Lee
0835d456dc
gpui: Fix text ellipsis appearing even the flex element has space (#17149)
Release Notes:

- N/A

There was a calculation bug before. When we added `text_ellipsis` to the
flex element, it would always show ellipsis no matter how long it was.

Actually we can't use `flex` and `text_ellipsis` at same time, the CSS
also not support this. But this bug will let user confuse.

### Before

<img width="731" alt="image"
src="https://github.com/user-attachments/assets/b7d60017-6785-45f5-8b40-dd5efa154a1e">

### After

<img width="521" alt="image"
src="https://github.com/user-attachments/assets/a3117793-284e-48d4-8c15-059fe61abe60">
2024-08-30 09:01:46 -04:00
Peter Tripp
b62e63349b
Ollama max_tokens settings (#17025)
- Support `available_models` for Ollama
- Clamp default max tokens (context length) to 16384.
- Add documentation for ollama context configuration.
2024-08-30 08:52:00 -04:00
Peter Tripp
d401ab1efc
Make links in assistant configuration clickable (#17011) 2024-08-30 08:50:25 -04:00
Thorsten Ball
eb7367d8f2
vim: Disable inline completions if not Insert/Replace mode (#17154)
This is a follow-up to

- https://github.com/zed-industries/zed/pull/17137
- https://github.com/zed-industries/zed/pull/17138 (revert of #17137)

and it does what I originally thought I wouldn't have to do: add another
boolean to `Editor`.

cc @ConradIrwin 
Release Notes:

- Fixed inline completions (Copilot or Supermaven) showing up in Vim's
normal mode.
2024-08-30 14:02:38 +02:00
Thorsten Ball
32e96e126f
workspace: Ensure last_active_center_pane is updated on focus (#17140)
This fixes a bug that I've been running into for quite a while:

- Open a new terminal inside Zed
- (Center pane loses focus)
- (Workspace is serialized)
- Quit Zed
- Open Zed
- (Workspace is deserialized without an active pane)
- Put cursor in assistant panel
- Try to use `ActivatePaneInDirection` to go to the center
- Does not work

So what this fix does is to ensure that in case the pane does become
focused, even though it was already marked as focused, the active center
pane is set.

It also adds a fallback when trying to get the last active pane.

Release Notes:

- Fixed an issue where `workspace::ActivatePaneInDirection` could not
activate the center pane (i.e. one couldn't navigate from terminal or
assistant panel to the center pane) after loading Zed.
2024-08-30 11:54:46 +02:00
Thorsten Ball
820ad488e4
Revert "vim: Don't show inline completions in normal mode (#17137)" (#17138)
This reverts commit 9206561662.

It lead to this panic:

```
Thread "main" panicked with "invalid SecondaryMap key used" at /Users/thorstenball/work/zed/crates/gpui/src/app/entity_map.rs:120:22
   0: backtrace::backtrace::libunwind::trace
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/backtrace/libunwind.rs:116:5
      backtrace::backtrace::trace_unsynchronized::<<backtrace::capture::Backtrace>::create::{closure#0}>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/backtrace/mod.rs:66:5
   1: backtrace::backtrace::trace::<<backtrace::capture::Backtrace>::create::{closure#0}>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/backtrace/mod.rs:53:14
   2: <backtrace::capture::Backtrace>::create
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/capture.rs:197:9
   3: <backtrace::capture::Backtrace>::new
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/capture.rs:162:22
   4: zed::reliability::init_panic_hook::{closure#0}
             at /Users/thorstenball/work/zed/crates/zed/src/reliability.rs:58:29
   5: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/boxed.rs:2077:9
      std::panicking::rust_panic_with_hook
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:799:13
   6: std::panicking::begin_panic::<&str>::{closure#0}
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:694:9
   7: std::sys_common::backtrace::__rust_end_short_backtrace::<std::panicking::begin_panic<&str>::{closure#0}, !>
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:171:18
   8: std::panicking::begin_panic::<&str>
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:693:12
   9: <slotmap::secondary::SecondaryMap<gpui::app::entity_map::EntityId, alloc::boxed::Box<dyn core::any::Any>> as core::ops::index::Index<gpui::app::entity_map::EntityId>>::index
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slotmap-1.0.7/src/secondary.rs:866:21
  10: <gpui::app::entity_map::EntityMap>::read::<vim::Vim>
             at /Users/thorstenball/work/zed/crates/gpui/src/app/entity_map.rs:120:22
  11: <gpui::app::entity_map::Model<vim::Vim>>::read
             at /Users/thorstenball/work/zed/crates/gpui/src/app/entity_map.rs:397:9
  12: <gpui::view::View<vim::Vim>>::read
             at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:81:9
  13: <vim::VimAddon as editor::Addon>::should_show_inline_completions
             at /Users/thorstenball/work/zed/crates/vim/src/vim.rs:138:20
  14: <editor::Editor>::should_show_inline_completions
             at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:2347:21
  15: <editor::Editor>::refresh_inline_completion
             at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:4988:17
  16: <editor::Editor>::undo
             at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:6868:13
  17: vim::normal::register::{closure#7}::{closure#0}
             at /Users/thorstenball/work/zed/crates/vim/src/normal.rs:176:17
  18: <vim::Vim>::update_editor::<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}
             at /Users/thorstenball/work/zed/crates/vim/src/vim.rs:693:45
  19: <gpui:🪟:WindowContext as gpui::VisualContext>::update_view::<editor::Editor, (), <vim::Vim>::update_editor<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3890:22
  20: <gpui:🪟:ViewContext<vim::Vim> as gpui::VisualContext>::update_view::<editor::Editor, (), <vim::Vim>::update_editor<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4522:9
  21: <gpui::view::View<editor::Editor>>::update::<gpui:🪟:ViewContext<vim::Vim>, (), <vim::Vim>::update_editor<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:76:9
  22: <vim::Vim>::update_editor::<(), vim::normal::register::{closure#7}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/vim/src/vim.rs:693:14
  23: vim::normal::register::{closure#7}
             at /Users/thorstenball/work/zed/crates/vim/src/normal.rs:174:9
  24: <gpui:🪟:ViewContext<vim::Vim>>::listener::<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4444:40
  25: <gpui:🪟:WindowContext as gpui::VisualContext>::update_view::<vim::Vim, (), <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3890:22
  26: <gpui::view::View<vim::Vim>>::update::<gpui:🪟:WindowContext, (), <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:76:9
  27: <gpui::view::WeakView<vim::Vim>>::update::<gpui:🪟:WindowContext, (), <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:192:12
  28: <gpui:🪟:ViewContext<vim::Vim>>::listener::<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4444:13
  29: <editor::Editor>::register_action::<vim::normal::Undo, <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}>::{closure#0}::{closure#0}
             at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:12053:25
  30: <gpui:🪟:WindowContext>::dispatch_action_on_node
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3514:21
  31: <gpui:🪟:WindowContext>::dispatch_key_event
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3303:13
  32: <gpui:🪟:WindowContext>::dispatch_event
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3131:13
  33: <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:776:46
  34: <gpui::app::AppContext as gpui::Context>::update_window::<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>::{closure#0}
             at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:1396:26
  35: <gpui::app::AppContext>::update::<core::result::Result<gpui:🪟:DispatchEventResult, anyhow::Error>, <gpui::app::AppContext as gpui::Context>::update_window<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:362:22
  36: <gpui::app::AppContext as gpui::Context>::update_window::<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:1387:9
  37: <gpui::app::async_context::AsyncAppContext as gpui::Context>::update_window::<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/app/async_context.rs:91:9
  38: <gpui:🪟:AnyWindowHandle>::update::<gpui::app::async_context::AsyncAppContext, gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4750:9
  39: <gpui:🪟:Window>:🆕:{closure#10}
             at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:775:17
  40: <alloc::boxed::Box<dyn core::ops::function::FnMut<(gpui::interactive::PlatformInput,), Output = gpui:🪟:DispatchEventResult>> as core::ops::function::FnMut<(gpui::interactive::PlatformInput,)>>::call_mut
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/boxed.rs:2070:9
  41: gpui::platform::mac:🪟:handle_key_event
             at /Users/thorstenball/work/zed/crates/gpui/src/platform/mac/window.rs:1300:32
  42: gpui::platform::mac:🪟:handle_key_down
             at /Users/thorstenball/work/zed/crates/gpui/src/platform/mac/window.rs:1212:5
  43: <unknown>
  44: <unknown>
  45: <unknown>
  46: <unknown>
  47: <unknown>
  48: <() as objc::message::MessageArguments>::invoke::<()>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/mod.rs:128:17
  49: objc::message::platform::send_unverified::<objc::runtime::Object, (), ()>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/apple/mod.rs:27:9
  50: objc::message::send_message::<objc::runtime::Object, (), ()>
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/mod.rs:178:5
      <*mut objc::runtime::Object as cocoa::appkit::NSApplication>::run
             at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cocoa-0.26.0/src/appkit.rs:628:9
  51: <gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run
             at /Users/thorstenball/work/zed/crates/gpui/src/platform/mac/platform.rs:427:13
  52: <gpui::app::App>::run::<zed::main::{closure#3}>
             at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:159:9
  53: zed::main
             at /Users/thorstenball/work/zed/crates/zed/src/main.rs:439:5
  54: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/ops/function.rs:250:5
  55: std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:155:18
  56: std::rt::lang_start::<()>::{closure#0}
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:159:18
  57: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:559:40
      std::panicking::try
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:523:19
      std::panic::catch_unwind
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panic.rs:149:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:141:48
      std::panicking::try::do_call
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:559:40
      std::panicking::try
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:523:19
      std::panic::catch_unwind
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panic.rs:149:14
      std::rt::lang_start_internal
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:141:20
  58: std::rt::lang_start::<()>
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:158:17
  59: _main
```

Release Notes:

- N/A
2024-08-30 11:19:49 +02:00
Thorsten Ball
9206561662
vim: Don't show inline completions in normal mode (#17137)
This fixes an annoying bug I ran into, where supermaven completions
would show up in normal mode.

cc @ConradIrwin not sure if this is the best way to fix this, but it
seems like the neatest? On one hand, I didn't want to touch into Vim
from the editor, and on the other I didn't want to add another boolean
on the editor that flips on when in normal mode. So instead I extended
the Addon interface.

Release Notes:

- Fixed inline completions (Copilot or Supermaven) showing up in Vim's
normal mode.
2024-08-30 10:50:12 +02:00
Micah
6403385468
linux: Add an option to disable middle-click paste (#16572)
Release Notes:

- Added an editor setting to toggle Linux middle-click pasting (enabled by default)
2024-08-30 09:06:20 +02:00
Kyle Kelley
02cd5128c7
repl: Make output buffer be readonly, never dirty (#17121) 2024-08-29 18:22:28 -07:00
Nate Butler
6646b15f29
Standardize story crate lib name (#17117)
`crates/story/src/lib.rs` -> `crates/story/src/story.rs`

Release Notes:

- N/A
2024-08-29 20:07:39 -04:00
Nate Butler
3d175f685f
Unify Story/StoryContainers (#17114)
Unify the various Story containers, and use gpui default colors over the
custom `StoryColors`.

Release Notes:

- N/A
2024-08-29 17:27:01 -04:00
David Soria Parra
449e744c14
context_servers: Normalize the line endings of context servers (#17112)
Context servers might return CR characters, which are not acceptable in
Zed and cause ranges to be invalidated. We need to normalize them.

Closes #17109

Release Notes:

- context_servers: Fixed an issue where context servers returning a
carriage return character would result in a panic.
2024-08-29 16:58:26 -04:00
David Soria Parra
5bae6eb493
context_servers: Completion support for context server slash commands (#17085)
This PR adds support for completions via MCP. The protocol now supports
a new request type "completion/complete"
that can either complete a resource URI template (which we currently
don't use in Zed), or a prompt argument.
We use this to add autocompletion to our context server slash commands!


https://github.com/user-attachments/assets/08c9cf04-cbeb-49a7-903f-5049fb3b3d9f



Release Notes:

- context_servers: Added support for argument completions for context
server prompts. These show up as regular completions to slash commands.
2024-08-29 16:56:58 -04:00
Nate Butler
01f8d27f22
Add a simple set of default colors to gpui (#17110)
This PR adds an initial set of default colors to `gpui`. 

These will power default-styled gpui components (things like checkboxes,
buttons, inputs, etc.), storybook, and give a very simple,
appearance-aware set of colors out of the box for folks to build with.

These colors will evolve and be updated in the near future, they are
literally pulled from Finder for now :)

The API might not be perfect, I focused on getting something in quickly
that we can iterate on!

### Usage

```rs
use gpui::{colors, DefaultColor}

fn auto(cx: &WindowContext) -> {
  // Init the full set of DefaultColors
  let colors = colors(cx.appearance());
  // Use a color
  // It will automatically give you the correct color for the system's
  // current appearance.
  let background = DefaultColor::Background.hsla(&colors)
}

fn manual() -> {
  // Init the full sets of DefaultColors
  let light_colors = DefaultColors::light();
  let dark_colors = DefaultColors::dark();
  // Use a color
  // Maybe for some fancy inverted element
  let background = DefaultColor::Background.hsla(&light_colors)
  let inverted_background = DefaultColor::Background.hsla(&dark_colors)
  let inverted_text = DefaultColor::Text.hsla(&dark_colors)
}

```

Note: We need `cx` for the auto way as we need to get the system
appearance from the App/Window/ViewContext via `cx.appearance()`.

### Example

You can run `script/storybook default_colors` to open the Default Colors
story:

| Light | Dark |
|-------|------|
| ![CleanShot 2024-08-29 at 16 19
20@2x](https://github.com/user-attachments/assets/80369de4-8926-4b30-80f5-f81a8a7b9531)
| ![CleanShot 2024-08-29 at 16 19
33@2x](https://github.com/user-attachments/assets/fd7a2aae-27e6-460f-a054-8f37623dc96d)
|


Release Notes:

- N/A
2024-08-29 16:50:03 -04:00
Kyle Kelley
82ceb4c091
repl: Refactor outputs for externalization (#16971)
Working on addressing large outputs, refactored as part of it.



https://github.com/user-attachments/assets/48ea576c-e13a-4d09-b45a-4baa41bf6f72



Release Notes:

- N/A
2024-08-29 12:41:03 -07:00
Marshall Bowers
89487772b0
assistant: Remove outdated comment (#17105)
This used to appear on a call to `prune_invalid_workflow_steps`, but
that method doesn't exist anymore.

Release Notes:

- N/A
2024-08-29 14:24:08 -04:00
Max Brunsfeld
d60466212d
Hide Markdown-Inline language from users with a new 'hidden' flag on language configs (#17104)
/cc @mrnugget 

Release Notes:

- Fixed an issue where toggling inline completions in a markdown file
did not work correctly

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-08-29 11:23:33 -07:00
everdrone
b6c3ef7e79
Improve Rust highlight queries (#17097)
See #16747.

Removed markdown injections so that only the rust highlights are
implemented

Release Notes:

- Improved Rust syntax highlighting queries.
2024-08-29 10:19:07 -07:00
Max Brunsfeld
f84ef5e48a
Immediate edit step resolution (#16447)
## Todo

* [x] Parse and present new XML output
* [x] Resolve new edits to buffers and anchor ranges
* [x] Surface resolution errors
* [x] Steps fail to resolve because language hasn't loaded yet
* [x] Treat empty `<symbol>` tag as None
* [x] duplicate assists when editing steps
* [x] step footer blocks can appear *below* the following message header
block

## Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Peter <peter@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2024-08-29 10:18:52 -07:00
Thorsten Ball
fc4c533d0a
zed: Use CLI env for lang servers, tasks, terminal (#17075)
This changes the Zed CLI `zed` to pass along the environment to the Zed
project that it opens (if it opens a new one).

In projects, this CLI environment will now take precedence over any
environment that's acquired by running a login shell in a projects
folder.

The result is that `zed my/folder` now always behaves as if one would
run `zed --foreground` without any previous Zed version running.


Closes #7894
Closes #16293 

Related issues:
- It fixes the issue described in here:
https://github.com/zed-industries/zed/issues/4977#issuecomment-2305272027


Release Notes:

- Improved the Zed CLI `zed` to pass along the environment as it was on
the CLI to the opened Zed project. That environment is then used when
opening new terminals, spawning tasks, or language servers.
Specifically:
- If Zed was started via `zed my-folder`, a terminal spawned with
`workspace: new terminal` will inherit these environment variables that
existed on the CLI
- Specific language servers that allow looking up the language server
binary in the environments `$PATH` (such as `gopls`, `zls`,
`rust-analyzer` if configured, ...) will look up the language server
binary in the CLI environment too and use that environment when starting
the process.
- Language servers that are _not_ found in the CLI environment (or
configured to not be found in there), will be spawned with the CLI
environment in case that's set. That means users can do something like
`RA_LOG=info zed .` and it will be picked up the rust-analyzer that was
spawned.

Demo/explanation:



https://github.com/user-attachments/assets/455905cc-8b7c-4fc4-b98a-7e027d97cdfa
2024-08-29 18:09:06 +02:00
Marshall Bowers
4f408ec65a
collab: Record geoip_country_code on HTTP request spans (#17092)
This PR attaches the `geoip_country_code` that we source from
Cloudflare's `CF-IPCountry` header to the HTTP request spans.

This will allow us to see where traffic is originating geographically.

Release Notes:

- N/A
2024-08-29 11:33:51 -04:00
Peter Tripp
4d6bb52d1f
Anthropic/OpenAI: Add country codes for territories (#17089)
- Cloudflare provides ISO-3166-1 country code for protectorates. Expand our allowlist to include the territories of countries on the allowlist (US, UK, France, Australia, New Zealand). 
- Also include the country_code in the error message when we block. 

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-29 11:32:29 -04:00
Peter Tripp
7db8d80c30
Make selection more consistent across languages (#17084)
- Remove "-" from word_character for CSS/JS/TSX/Markdown
- Makes our word-selection behavior consistent across language modes (and consistent with VSCode).
2024-08-29 11:02:24 -04:00
Thorsten Ball
376828e92f
editor: Fix flaky navigation test (#17087)
This test was flaky because both tasks were started at the same time and
the first one that would win, would navigate the editor.

Now the order is fixed, because the second task is only spawned after
the first one.

Release Notes:

- N/A

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-08-29 17:00:28 +02:00
Marshall Bowers
d666cc5fba
collab: Report when upstream rate limit is exceeded (#17083)
This PR makes it so we report a trace when the upstream rate limit is
exceeded.

Release Notes:

- N/A
2024-08-29 08:54:45 -04:00
David Soria Parra
cf0a8a7a1a
context_servers: Add ability to provide labels for prompt outputs (#17077)
Server can now include an optional description in a `prompts/get`
response. Zed will displayed the description as label of the slash
command.

Release Notes:

- context_servers: Servers can provide an optional description in
`prompts/get` responses that is displayed as the slash command label.
2024-08-29 08:13:03 -04:00
Kirill Bulatov
895b4148a5
Revert "Improve Rust highlight queries (#16747)" (#17073) 2024-08-29 14:21:26 +03:00
CharlesChen0823
804d1997f2
image_viewer: Fix image view tab icon lost (#17063)
Closes #16989 

Release Notes:

- N/A
2024-08-29 11:51:35 +03:00
张小白
64fa7a5234
Set *_font_fallbacks default to None (#16941)
In the current `default.json`, `*_font_fallbacks=[]`, which results in
the `fallbacks` value in the `Font` struct always being `Some(...)`.

This PR introduces the following improvements:
1. Changed `*_font_fallbacks = []` to `*_font_fallbacks = null` in
`default.json`.
2. Enhanced the macOS and Windows implementations.

Release Notes:

- N/A
2024-08-28 22:30:46 -07:00
renovate[bot]
6c8836ec21
Update Rust crate itertools to v0.13.0 (#17048)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [itertools](https://togithub.com/rust-itertools/itertools) |
dependencies | minor | `0.10` -> `0.13` |
| [itertools](https://togithub.com/rust-itertools/itertools) |
workspace.dependencies | minor | `0.11.0` -> `0.13.0` |

---

### Release Notes

<details>
<summary>rust-itertools/itertools (itertools)</summary>

###
[`v0.13.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0130)

[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0)

##### Breaking

- Removed implementation of `DoubleEndedIterator` for `ConsTuples`
([#&#8203;853](https://togithub.com/rust-itertools/itertools/issues/853))
- Made `MultiProduct` fused and fixed on an empty iterator
([#&#8203;835](https://togithub.com/rust-itertools/itertools/issues/835),
[#&#8203;834](https://togithub.com/rust-itertools/itertools/issues/834))
- Changed `iproduct!` to return tuples for maxi one iterator too
([#&#8203;870](https://togithub.com/rust-itertools/itertools/issues/870))
- Changed `PutBack::put_back` to return the old value
([#&#8203;880](https://togithub.com/rust-itertools/itertools/issues/880))
- Removed deprecated `repeat_call, Itertools::{foreach, step,
map_results, fold_results}`
([#&#8203;878](https://togithub.com/rust-itertools/itertools/issues/878))
- Removed `TakeWhileInclusive::new`
([#&#8203;912](https://togithub.com/rust-itertools/itertools/issues/912))

##### Added

- Added `Itertools::{smallest_by, smallest_by_key, largest, largest_by,
largest_by_key}`
([#&#8203;654](https://togithub.com/rust-itertools/itertools/issues/654),
[#&#8203;885](https://togithub.com/rust-itertools/itertools/issues/885))
- Added `Itertools::tail`
([#&#8203;899](https://togithub.com/rust-itertools/itertools/issues/899))
- Implemented `DoubleEndedIterator` for `ProcessResults`
([#&#8203;910](https://togithub.com/rust-itertools/itertools/issues/910))
- Implemented `Debug` for `FormatWith`
([#&#8203;931](https://togithub.com/rust-itertools/itertools/issues/931))
- Added `Itertools::get`
([#&#8203;891](https://togithub.com/rust-itertools/itertools/issues/891))

##### Changed

- Deprecated `Itertools::group_by` (renamed `chunk_by`)
([#&#8203;866](https://togithub.com/rust-itertools/itertools/issues/866),
[#&#8203;879](https://togithub.com/rust-itertools/itertools/issues/879))
- Deprecated `unfold` (use `std::iter::from_fn` instead)
([#&#8203;871](https://togithub.com/rust-itertools/itertools/issues/871))
- Optimized `GroupingMapBy`
([#&#8203;873](https://togithub.com/rust-itertools/itertools/issues/873),
[#&#8203;876](https://togithub.com/rust-itertools/itertools/issues/876))
- Relaxed `Fn` bounds to `FnMut` in `diff_with,
Itertools::into_group_map_by`
([#&#8203;886](https://togithub.com/rust-itertools/itertools/issues/886))
- Relaxed `Debug/Clone` bounds for `MapInto`
([#&#8203;889](https://togithub.com/rust-itertools/itertools/issues/889))
- Documented the `use_alloc` feature
([#&#8203;887](https://togithub.com/rust-itertools/itertools/issues/887))
- Optimized `Itertools::set_from`
([#&#8203;888](https://togithub.com/rust-itertools/itertools/issues/888))
- Removed badges in `README.md`
([#&#8203;890](https://togithub.com/rust-itertools/itertools/issues/890))
- Added "no-std" categories in `Cargo.toml`
([#&#8203;894](https://togithub.com/rust-itertools/itertools/issues/894))
- Fixed `Itertools::k_smallest` on short unfused iterators
([#&#8203;900](https://togithub.com/rust-itertools/itertools/issues/900))
- Deprecated `Itertools::tree_fold1` (renamed `tree_reduce`)
([#&#8203;895](https://togithub.com/rust-itertools/itertools/issues/895))
- Deprecated `GroupingMap::fold_first` (renamed `reduce`)
([#&#8203;902](https://togithub.com/rust-itertools/itertools/issues/902))
- Fixed `Itertools::k_smallest(0)` to consume the iterator, optimized
`Itertools::k_smallest(1)`
([#&#8203;909](https://togithub.com/rust-itertools/itertools/issues/909))
- Specialized `Combinations::nth`
([#&#8203;914](https://togithub.com/rust-itertools/itertools/issues/914))
- Specialized `MergeBy::fold`
([#&#8203;920](https://togithub.com/rust-itertools/itertools/issues/920))
- Specialized `CombinationsWithReplacement::nth`
([#&#8203;923](https://togithub.com/rust-itertools/itertools/issues/923))
- Specialized `FlattenOk::{fold, rfold}`
([#&#8203;927](https://togithub.com/rust-itertools/itertools/issues/927))
- Specialized `Powerset::nth`
([#&#8203;924](https://togithub.com/rust-itertools/itertools/issues/924))
- Documentation fixes
([#&#8203;882](https://togithub.com/rust-itertools/itertools/issues/882),
[#&#8203;936](https://togithub.com/rust-itertools/itertools/issues/936))
- Fixed `assert_equal` for iterators longer than `i32::MAX`
([#&#8203;932](https://togithub.com/rust-itertools/itertools/issues/932))
- Updated the `must_use` message of non-lazy `KMergeBy` and
`TupleCombinations`
([#&#8203;939](https://togithub.com/rust-itertools/itertools/issues/939))

##### Notable Internal Changes

- Tested iterator laziness
([#&#8203;792](https://togithub.com/rust-itertools/itertools/issues/792))
- Created `CONTRIBUTING.md`
([#&#8203;767](https://togithub.com/rust-itertools/itertools/issues/767))

###
[`v0.12.1`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0121)

[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.12.0...v0.12.1)

##### Added

- Documented iteration order guarantee for
`Itertools::[tuple_]combinations`
([#&#8203;822](https://togithub.com/rust-itertools/itertools/issues/822))
- Documented possible panic in `iterate`
([#&#8203;842](https://togithub.com/rust-itertools/itertools/issues/842))
- Implemented `Clone` and `Debug` for `Diff`
([#&#8203;845](https://togithub.com/rust-itertools/itertools/issues/845))
- Implemented `Debug` for `WithPosition`
([#&#8203;859](https://togithub.com/rust-itertools/itertools/issues/859))
- Implemented `Eq` for `MinMaxResult`
([#&#8203;838](https://togithub.com/rust-itertools/itertools/issues/838))
- Implemented `From<EitherOrBoth<A, B>>` for `Option<Either<A, B>>`
([#&#8203;843](https://togithub.com/rust-itertools/itertools/issues/843))
- Implemented `PeekingNext` for `RepeatN`
([#&#8203;855](https://togithub.com/rust-itertools/itertools/issues/855))

##### Changed

- Made `CoalesceBy` lazy
([#&#8203;801](https://togithub.com/rust-itertools/itertools/issues/801))
- Optimized `Filter[Map]Ok::next`, `Itertools::partition`,
`Unique[By]::next[_back]`
([#&#8203;818](https://togithub.com/rust-itertools/itertools/issues/818))
- Optimized `Itertools::find_position`
([#&#8203;837](https://togithub.com/rust-itertools/itertools/issues/837))
- Optimized `Positions::next[_back]`
([#&#8203;816](https://togithub.com/rust-itertools/itertools/issues/816))
- Optimized `ZipLongest::fold`
([#&#8203;854](https://togithub.com/rust-itertools/itertools/issues/854))
- Relaxed `Debug` bounds for `GroupingMapBy`
([#&#8203;860](https://togithub.com/rust-itertools/itertools/issues/860))
- Specialized `ExactlyOneError::fold`
([#&#8203;826](https://togithub.com/rust-itertools/itertools/issues/826))
- Specialized `Interleave[Shortest]::fold`
([#&#8203;849](https://togithub.com/rust-itertools/itertools/issues/849))
- Specialized `MultiPeek::fold`
([#&#8203;820](https://togithub.com/rust-itertools/itertools/issues/820))
- Specialized `PadUsing::[r]fold`
([#&#8203;825](https://togithub.com/rust-itertools/itertools/issues/825))
- Specialized `PeekNth::fold`
([#&#8203;824](https://togithub.com/rust-itertools/itertools/issues/824))
- Specialized `Positions::[r]fold`
([#&#8203;813](https://togithub.com/rust-itertools/itertools/issues/813))
- Specialized `PutBackN::fold`
([#&#8203;823](https://togithub.com/rust-itertools/itertools/issues/823))
- Specialized `RepeatN::[r]fold`
([#&#8203;821](https://togithub.com/rust-itertools/itertools/issues/821))
- Specialized `TakeWhileInclusive::fold`
([#&#8203;851](https://togithub.com/rust-itertools/itertools/issues/851))
- Specialized `ZipLongest::rfold`
([#&#8203;848](https://togithub.com/rust-itertools/itertools/issues/848))

##### Notable Internal Changes

- Added test coverage in CI
([#&#8203;847](https://togithub.com/rust-itertools/itertools/issues/847),
[#&#8203;856](https://togithub.com/rust-itertools/itertools/issues/856))
- Added semver check in CI
([#&#8203;784](https://togithub.com/rust-itertools/itertools/issues/784))
- Enforced `clippy` in CI
([#&#8203;740](https://togithub.com/rust-itertools/itertools/issues/740))
- Enforced `rustdoc` in CI
([#&#8203;840](https://togithub.com/rust-itertools/itertools/issues/840))
- Improved specialization tests
([#&#8203;807](https://togithub.com/rust-itertools/itertools/issues/807))
- More specialization benchmarks
([#&#8203;806](https://togithub.com/rust-itertools/itertools/issues/806))

###
[`v0.12.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0120)

[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.11.0...v0.12.0)

##### Breaking

- Made `take_while_inclusive` consume iterator by value
([#&#8203;709](https://togithub.com/rust-itertools/itertools/issues/709))
- Added `Clone` bound to `Unique`
([#&#8203;777](https://togithub.com/rust-itertools/itertools/issues/777))

##### Added

- Added `Itertools::try_len`
([#&#8203;723](https://togithub.com/rust-itertools/itertools/issues/723))
- Added free function `sort_unstable`
([#&#8203;796](https://togithub.com/rust-itertools/itertools/issues/796))
- Added `GroupMap::fold_with`
([#&#8203;778](https://togithub.com/rust-itertools/itertools/issues/778),
[#&#8203;785](https://togithub.com/rust-itertools/itertools/issues/785))
- Added `PeekNth::{peek_mut, peek_nth_mut}`
([#&#8203;716](https://togithub.com/rust-itertools/itertools/issues/716))
- Added `PeekNth::{next_if, next_if_eq}`
([#&#8203;734](https://togithub.com/rust-itertools/itertools/issues/734))
- Added conversion into `(Option<A>,Option<B>)` to `EitherOrBoth`
([#&#8203;713](https://togithub.com/rust-itertools/itertools/issues/713))
- Added conversion from `Either<A, B>` to `EitherOrBoth<A, B>`
([#&#8203;715](https://togithub.com/rust-itertools/itertools/issues/715))
- Implemented `ExactSizeIterator` for `Tuples`
([#&#8203;761](https://togithub.com/rust-itertools/itertools/issues/761))
- Implemented `ExactSizeIterator` for `(Circular)TupleWindows`
([#&#8203;752](https://togithub.com/rust-itertools/itertools/issues/752))
- Made `EitherOrBoth<T>` a shorthand for `EitherOrBoth<T, T>`
([#&#8203;719](https://togithub.com/rust-itertools/itertools/issues/719))

##### Changed

- Added missing `#[must_use]` annotations on iterator adaptors
([#&#8203;794](https://togithub.com/rust-itertools/itertools/issues/794))
- Made `Combinations` lazy
([#&#8203;795](https://togithub.com/rust-itertools/itertools/issues/795))
- Made `Intersperse(With)` lazy
([#&#8203;797](https://togithub.com/rust-itertools/itertools/issues/797))
- Made `Permutations` lazy
([#&#8203;793](https://togithub.com/rust-itertools/itertools/issues/793))
- Made `Product` lazy
([#&#8203;800](https://togithub.com/rust-itertools/itertools/issues/800))
- Made `TupleWindows` lazy
([#&#8203;602](https://togithub.com/rust-itertools/itertools/issues/602))
- Specialized `Combinations::{count, size_hint}`
([#&#8203;729](https://togithub.com/rust-itertools/itertools/issues/729))
- Specialized `CombinationsWithReplacement::{count, size_hint}`
([#&#8203;737](https://togithub.com/rust-itertools/itertools/issues/737))
- Specialized `Powerset::fold`
([#&#8203;765](https://togithub.com/rust-itertools/itertools/issues/765))
- Specialized `Powerset::count`
([#&#8203;735](https://togithub.com/rust-itertools/itertools/issues/735))
- Specialized `TupleCombinations::{count, size_hint}`
([#&#8203;763](https://togithub.com/rust-itertools/itertools/issues/763))
- Specialized `TupleCombinations::fold`
([#&#8203;775](https://togithub.com/rust-itertools/itertools/issues/775))
- Specialized `WhileSome::fold`
([#&#8203;780](https://togithub.com/rust-itertools/itertools/issues/780))
- Specialized `WithPosition::fold`
([#&#8203;772](https://togithub.com/rust-itertools/itertools/issues/772))
- Specialized `ZipLongest::fold`
([#&#8203;774](https://togithub.com/rust-itertools/itertools/issues/774))
- Changed `{min, max}_set*` operations require `alloc` feature, instead
of `std`
([#&#8203;760](https://togithub.com/rust-itertools/itertools/issues/760))
- Improved documentation of `tree_fold1`
([#&#8203;787](https://togithub.com/rust-itertools/itertools/issues/787))
- Improved documentation of `permutations`
([#&#8203;724](https://togithub.com/rust-itertools/itertools/issues/724))
- Fixed typo in documentation of `multiunzip`
([#&#8203;770](https://togithub.com/rust-itertools/itertools/issues/770))

##### Notable Internal Changes

- Improved specialization tests
([#&#8203;799](https://togithub.com/rust-itertools/itertools/issues/799),
[#&#8203;786](https://togithub.com/rust-itertools/itertools/issues/786),
[#&#8203;782](https://togithub.com/rust-itertools/itertools/issues/782))
- Simplified implementation of `Permutations`
([#&#8203;739](https://togithub.com/rust-itertools/itertools/issues/739),
[#&#8203;748](https://togithub.com/rust-itertools/itertools/issues/748),
[#&#8203;790](https://togithub.com/rust-itertools/itertools/issues/790))
- Combined `Merge`/`MergeBy`/`MergeJoinBy` implementations
([#&#8203;736](https://togithub.com/rust-itertools/itertools/issues/736))
- Simplified `Permutations::size_hint`
([#&#8203;739](https://togithub.com/rust-itertools/itertools/issues/739))
- Fix wrapping arithmetic in benchmarks
([#&#8203;770](https://togithub.com/rust-itertools/itertools/issues/770))
- Enforced `rustfmt` in CI
([#&#8203;751](https://togithub.com/rust-itertools/itertools/issues/751))
- Disallowed compile warnings in CI
([#&#8203;720](https://togithub.com/rust-itertools/itertools/issues/720))
- Used `cargo hack` to check MSRV
([#&#8203;754](https://togithub.com/rust-itertools/itertools/issues/754))

###
[`v0.11.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0110)

[Compare
Source](https://togithub.com/rust-itertools/itertools/compare/v0.10.5...v0.11.0)

##### Breaking

- Make `Itertools::merge_join_by` also accept functions returning bool
([#&#8203;704](https://togithub.com/rust-itertools/itertools/issues/704))
- Implement `PeekingNext` transitively over mutable references
([#&#8203;643](https://togithub.com/rust-itertools/itertools/issues/643))
- Change `with_position` to yield `(Position, Item)` instead of
`Position<Item>`
([#&#8203;699](https://togithub.com/rust-itertools/itertools/issues/699))

##### Added

- Add `Itertools::take_while_inclusive`
([#&#8203;616](https://togithub.com/rust-itertools/itertools/issues/616))
- Implement `PeekingNext` for `PeekingTakeWhile`
([#&#8203;644](https://togithub.com/rust-itertools/itertools/issues/644))
- Add `EitherOrBoth::{just_left, just_right, into_left, into_right,
as_deref, as_deref_mut, left_or_insert, right_or_insert,
left_or_insert_with, right_or_insert_with, insert_left, insert_right,
insert_both}`
([#&#8203;629](https://togithub.com/rust-itertools/itertools/issues/629))
- Implement `Clone` for `CircularTupleWindows`
([#&#8203;686](https://togithub.com/rust-itertools/itertools/issues/686))
- Implement `Clone` for `Chunks`
([#&#8203;683](https://togithub.com/rust-itertools/itertools/issues/683))
- Add `Itertools::process_results`
([#&#8203;680](https://togithub.com/rust-itertools/itertools/issues/680))

##### Changed

- Use `Cell` instead of `RefCell` in `Format` and `FormatWith`
([#&#8203;608](https://togithub.com/rust-itertools/itertools/issues/608))
- CI tweaks
([#&#8203;674](https://togithub.com/rust-itertools/itertools/issues/674),
[#&#8203;675](https://togithub.com/rust-itertools/itertools/issues/675))
- Document and test the difference between stable and unstable sorts
([#&#8203;653](https://togithub.com/rust-itertools/itertools/issues/653))
- Fix documentation error on `Itertools::max_set_by_key`
([#&#8203;692](https://togithub.com/rust-itertools/itertools/issues/692))
- Move MSRV metadata to `Cargo.toml`
([#&#8203;672](https://togithub.com/rust-itertools/itertools/issues/672))
- Implement `equal` with `Iterator::eq`
([#&#8203;591](https://togithub.com/rust-itertools/itertools/issues/591))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-28 22:13:35 -07:00