Commit Graph

629 Commits

Author SHA1 Message Date
Nate Butler
fac9ee5f86
Add ui_macros crate & DerivePathStr derive macro (#17811)
This PR adds the `ui_macros` crate to allow building supporting macros
for the `ui` crate.

Additionally, it implements the `DerivePathStr` derive macro and the
`path_str` attribute macro. These macros work together to generate a
`path` method for enum variants, which is useful for creating
standardized string representations of enum variants.

The `DerivePathStr` macro provides the following functionality:
- Generates a `path` method for each enum variant.
- Allows specifying a prefix (required) and suffix (optional) for all
paths.
- Supports `strum` attributes for case conversion (e.g., snake_case,
lowercase).

Usage example:

```rust
#[derive(DerivePathStr)]
#[path_str(prefix = "my_prefix", suffix = ".txt")]
#[strum(serialize_all = "snake_case")]
enum MyEnum {
    VariantOne,
    VariantTwo,
}

// Generated paths:
// MyEnum::VariantOne.path() -> "my_prefix/variant_one.txt"
// MyEnum::VariantTwo.path() -> "my_prefix/variant_two.txt"
```

In a later PR this will be used to automate the creation of icon & image
paths in the `ui` crate.

This gives the following benefits:

1. Ensures standard naming of assets as paths are not manually
specified.
2. Makes adding new enum variants less tedious and error-prone.
3. Quickly catches missing or incorrect paths during compilation.
3. Adds a building block towards being able to lint for unused assets in
the future.

Release Notes:

- N/A
2024-09-13 16:45:16 -04:00
Richard Feldman
91ffa02e2c
/auto (#16696)
Add `/auto` behind a feature flag that's disabled for now, even for
staff.

We've decided on a different design for context inference, but there are
parts of /auto that will be useful for that, so we want them in the code
base even if they're unused for now.

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-13 13:17:49 -04:00
Junkui Zhang
af819bf661
windows: Implement fs::trash_file and fs::trash_dir (#17711)
https://github.com/user-attachments/assets/43370cee-26a5-4d27-b86f-656127e03b4a



Release Notes:

- N/A
2024-09-12 16:14:53 -04:00
renovate[bot]
f39c175bd3
Update Rust crate serde_json_lenient to 0.2 (#17732)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[serde_json_lenient](https://redirect.github.com/google/serde_json_lenient)
| workspace.dependencies | minor | `0.1` -> `0.2` |

---

### Release Notes

<details>
<summary>google/serde_json_lenient (serde_json_lenient)</summary>

###
[`v0.2.1`](https://redirect.github.com/google/serde_json_lenient/releases/tag/v0.2.1)

[Compare
Source](https://redirect.github.com/google/serde_json_lenient/compare/v0.2.0...v0.2.1)

- Fixed newline handling
([#&#8203;20](https://redirect.github.com/google/serde_json_lenient/issues/20))

###
[`v0.2.0`](https://redirect.github.com/google/serde_json_lenient/releases/tag/v0.2.0)

[Compare
Source](https://redirect.github.com/google/serde_json_lenient/compare/v0.1.8...v0.2.0)

-   Merged from upstream `serde_json`
- Introduce cfg!(parse_negative_zero_as_int) to create a build-time
option to parse -0 the same as other JSON parsers.
([#&#8203;16](https://redirect.github.com/google/serde_json_lenient/issues/16))
- Add an option to control escaped newlines separately from other
control
([#&#8203;18](https://redirect.github.com/google/serde_json_lenient/issues/18))

</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 this update
again.

---

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

---

Release Notes:

- N/A

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-12 11:52:59 -04:00
Piotr Osiewicz
095a08d9c8
chore: Another round of style lints fixes (#17519)
Closes #ISSUE

Release Notes:

- N/A
2024-09-07 02:36:55 +02:00
apricotbucket28
f91bf7fca5
blade: Update to e142a3a to fix crash (#17510)
Closes https://github.com/zed-industries/zed/issues/17005

Like https://github.com/zed-industries/zed/pull/17319, but based on
https://github.com/kvark/blade/pull/144.

This should be cherry-picked into preview if possible 🙂 

Release Notes:

- Linux: Fixed crash when closing windows on Wayland.
2024-09-06 15:54:40 -04:00
Piotr Osiewicz
832e3e7dd7
chore: Revert changes made to ui crate structure (#17516)
As a part of https://github.com/zed-industries/zed/pull/17488 I
flattened module structure of ui crate to fix module_inception lint.
However, that's actually unnecessary as we can pass that lint via a
custom knob for clippy.

Closes #ISSUE

Release Notes:

- N/A
2024-09-06 21:38:56 +02:00
Thorsten Ball
938c90fd3b
Revert FPS counter (#17485)
**UPDATE**: Response so far seems to be that this fixes the performance
issues on Intel MacBooks. So we're going to go ahead and merge it.

This reverts the FPS counter added in 11753914d (#16422) because in this
issue someone bisected recent performance regressions down to this
commit:

- https://github.com/zed-industries/zed/issues/16729

Another issue that's possibly related:

-
https://github.com/zed-industries/zed/issues/17305#issuecomment-2332316242

We're reverting this in a PR to create a bundle that people can try out.

Assets:

- Universal Binary:
https://github.com/zed-industries/zed/actions/runs/10735702994/artifacts/1900460781
- x86/Intel:
https://github.com/zed-industries/zed/actions/runs/10735702994/artifacts/1900461236
- Apple Silicon:
https://github.com/zed-industries/zed/actions/runs/10735702994/artifacts/1900460978


Release Notes:

- Removed the recently-added FPS counter since the changes it made to
the Metal renderer on macOS could lead to performance regressions on
Intel MacBooks.

Co-authored-by: Bennet <bennet@zed.dev>
2024-09-06 15:35:00 +02:00
Piotr Osiewicz
e6c1c51b37
chore: Fix several style lints (#17488)
It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
2024-09-06 11:58:39 +02:00
Marshall Bowers
b54d1aa95e
Upgrade pulldown_cmark to v0.12 (#17418)
This PR upgrades `pulldown_cmark` to v0.12.

There were a few breaking changes that needed to be accounted for:

- The `BlockQuote` variant now has a `kind` attached. Right now we're
ignoring it.
- `pulldown_cmark` now emits tags for definition lists. This codepath
has been left unimplemented, for now.

### Release Notes

<details>
<summary>raphlinus/pulldown-cmark (pulldown-cmark)</summary>

###
[`v0.12.1`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.12.1):
0.12.1

[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.12.0...v0.12.1)

##### Security

- Fix O(n\*\*2) comment parser by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/941](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/941)

##### New features

- impl From<CowStr> for String by
[@&#8203;oconnor663](https://redirect.github.com/oconnor663) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/943](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/943)

##### Developers

- Make dos-fuzzer part of the workspace by
[@&#8203;kdarkhan](https://redirect.github.com/kdarkhan) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/945](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/945)

##### New Contributors

- [@&#8203;oconnor663](https://redirect.github.com/oconnor663) made
their first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/943](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/943)
- [@&#8203;kdarkhan](https://redirect.github.com/kdarkhan) made their
first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/945](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/945)

**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.12.0...v0.12.1

###
[`v0.12.0`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.12.0):
0.12.0

[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.11.3...v0.12.0)

Thanks to all contributors! This release mainly adds the long awaited
commonmark-hs description lists (under a flag) and enables the
blockquote kind in `TagEnd` reverted in 0.11.2.

#### Breaking changes

- feat: re-add kind for BlockQuote in TagEnd by
[@&#8203;Martin1887](https://redirect.github.com/Martin1887) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/940](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/940)
- Refactor TextMergeStream by
[@&#8203;ollpu](https://redirect.github.com/ollpu) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/931](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/931)

#### New features

- Implement commonmark-hs compatible definition lists by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/915](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/915)

#### Other changes

- Rename superlinear time fuzzer to `dos-fuzzer` by
[@&#8203;ollpu](https://redirect.github.com/ollpu) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/938](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/938)

**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.11.2...v0.12.0

###
[`v0.11.3`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.11.3):
0.11.3

[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.11.2...v0.11.3)

#### Security

- Fix O(n\*\*2) comment parser by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/944](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/944)

**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.11.2...v0.11.3

###
[`v0.11.2`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.11.2)

[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.11.1...v0.11.2)

Revert BlockQuote kind to avoid breaking change.

###
[`v0.11.1`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.11.1)

[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.11.0...v0.11.1)

Thanks to all people involved in this release! The main change of this
release is the reduction of the MSRV to 1.71.1, but it also includes a
lot of bug fixes and a new mdBook for user-friendly documentation.

#### Breaking changes

- Add BlockQuoteKind to BlockQuote TagEnd by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/926](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/926)
(reverted in v0.11.2)

#### What's Changed

- fix: CowStr deserialization when escaping by
[@&#8203;aatifsyed](https://redirect.github.com/aatifsyed) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/895](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/895)
- fix(test): fix generating spec tests doesn't work on Windows due to
line-endings by [@&#8203;rhysd](https://redirect.github.com/rhysd) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/903](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/903)
- feat: add `-G` CLI option to enable GFM support by
[@&#8203;rhysd](https://redirect.github.com/rhysd) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/905](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/905)
- feat: set `DefaultBrokenLinkCallback` as the default broken link
callback of `OffsetIter` by
[@&#8203;rhysd](https://redirect.github.com/rhysd) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/901](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/901)
- chore(doc): use `cargo add` to instruct how to install this crate as
dependency by [@&#8203;rhysd](https://redirect.github.com/rhysd) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/904](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/904)
- fix typo by [@&#8203;jmbhughes](https://redirect.github.com/jmbhughes)
in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/909](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/909)
- Fix parsing blocks inside alert body by
[@&#8203;rhysd](https://redirect.github.com/rhysd) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/908](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/908)
- fuzz: fix building fuzzer and improve fuzzing coverage by enabling
more parse options by [@&#8203;rhysd](https://redirect.github.com/rhysd)
in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/910](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/910)
- fix: fix warnings reported from nightly rustc by
[@&#8203;rhysd](https://redirect.github.com/rhysd) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/911](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/911)
- fix: fix infinite loop when metadata delimiter is indented by
[@&#8203;rhysd](https://redirect.github.com/rhysd) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/913](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/913)
- Raise the link cutoff from 5 to 32 by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/917](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/917)
- Reduce MSRV to 1.71.1 by separating benchmarks into a new crate with
CI enhancements by [@&#8203;rhysd](https://redirect.github.com/rhysd) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/916](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/916)
- Add guide book and deploy script for it by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/883](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/883)
- ci: fix deploying the document to GitHub Pages and make the deploy job
faster by [@&#8203;rhysd](https://redirect.github.com/rhysd) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/920](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/920)
- Fix lone task list item bug by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/924](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/924)
- Fix offset range around footnotes that look like images by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/925](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/925)
- Update old footnote format to interrupt paragraph by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/928](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/928)
- Fix confusing bug with back-to-back footnotes by
[@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/930](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/930)
- Add reproduction cases for
[#&#8203;927](https://redirect.github.com/raphlinus/pulldown-cmark/issues/927)
by [@&#8203;zoni](https://redirect.github.com/zoni) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/929](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/929)
- Add regression test for
[#&#8203;655](https://redirect.github.com/raphlinus/pulldown-cmark/issues/655)
by [@&#8203;ollpu](https://redirect.github.com/ollpu) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/932](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/932)
- Renovate the superlinear time fuzzer by
[@&#8203;ollpu](https://redirect.github.com/ollpu) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/935](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/935)

#### New Contributors

- [@&#8203;aatifsyed](https://redirect.github.com/aatifsyed) made their
first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/895](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/895)
- [@&#8203;jmbhughes](https://redirect.github.com/jmbhughes) made their
first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/909](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/909)
- [@&#8203;zoni](https://redirect.github.com/zoni) made their first
contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/929](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/929)

**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.11.0...v0.11.1

###
[`v0.11.0`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.11.0):
0.11.0

[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.10.3...v0.11.0)

##### Finally, the so long awaited math mode is here! Enable the option
to use it.

This release also includes other improvements and bugfixes, please see
the changelog below for more details. Thanks to all contributors that
has made possible this release!

#### Breaking changes

- Change `write_to_html` to allow `fmt::Write` by
[@&#8203;stepantubanov](https://redirect.github.com/stepantubanov) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/870](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/870)

#### New features

-   Math mode

#### Bugfixes

- \[0.11] Don't exit `scan_attribute` with the ix pointing at block
quote by [@&#8203;notriddle](https://redirect.github.com/notriddle) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/873](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/873)
- (Re)introduce simd feature to pulldown-cmark-escape by
[@&#8203;ollpu](https://redirect.github.com/ollpu) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/880](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/880)
- fix: remove unnecessary end_newline set by
[@&#8203;tomcur](https://redirect.github.com/tomcur) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/885](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/885)

#### New Contributors

- [@&#8203;duskmoon314](https://redirect.github.com/duskmoon314) made
their first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/874](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/874)
- [@&#8203;stepantubanov](https://redirect.github.com/stepantubanov)
made their first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/870](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/870)
- [@&#8203;tomcur](https://redirect.github.com/tomcur) made their first
contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/885](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/885)

**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.10.3...v0.11.0

</details>

Release Notes:

- N/A
2024-09-05 10:46:51 -04:00
Marshall Bowers
e1a865295b
Remove unused rusqlite dependency (#17416)
This PR removes the `rusqlite` dependency from our workspace
`Cargo.toml`, as it wasn't being used anywhere.

Release Notes:

- N/A
2024-09-05 10:25:20 -04:00
renovate[bot]
7907ab32d7
Update Rust crate nix to 0.29 (#17383)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [nix](https://redirect.github.com/nix-rust/nix) |
workspace.dependencies | minor | `0.28` -> `0.29` |

---

### Release Notes

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

###
[`v0.29.0`](https://redirect.github.com/nix-rust/nix/blob/HEAD/CHANGELOG.md#0290---2024-05-24)

[Compare
Source](https://redirect.github.com/nix-rust/nix/compare/v0.28.0...v0.29.0)

##### Added

- Add `getregset()/setregset()` for
Linux/glibc/x86/x86\_64/aarch64/riscv64 and
    `getregs()/setregs()` for Linux/glibc/aarch64/riscv64
    ([#&#8203;2044](https://redirect.github.com/nix-rust/nix/pull/2044))
-   Add socket option Ipv6Ttl for apple targets.
    ([#&#8203;2287](https://redirect.github.com/nix-rust/nix/pull/2287))
-   Add socket option UtunIfname.
    ([#&#8203;2325](https://redirect.github.com/nix-rust/nix/pull/2325))
- make SigAction repr(transparent) & can be converted to the libc raw
type
    ([#&#8203;2326](https://redirect.github.com/nix-rust/nix/pull/2326))
- Add `From` trait implementation for conversions between `sockaddr_in`
and
    `SockaddrIn`, `sockaddr_in6` and `SockaddrIn6`
    ([#&#8203;2328](https://redirect.github.com/nix-rust/nix/pull/2328))
-   Add socket option ReusePortLb for FreeBSD.
    ([#&#8203;2332](https://redirect.github.com/nix-rust/nix/pull/2332))
-   Added support for openat2 on linux.
    ([#&#8203;2339](https://redirect.github.com/nix-rust/nix/pull/2339))
-   Add if_indextoname function.
    ([#&#8203;2340](https://redirect.github.com/nix-rust/nix/pull/2340))
-   Add `mount` and `unmount` API for apple targets.
    ([#&#8203;2347](https://redirect.github.com/nix-rust/nix/pull/2347))
-   Added `_PC_MIN_HOLE_SIZE` for `pathconf` and `fpathconf`.
    ([#&#8203;2349](https://redirect.github.com/nix-rust/nix/pull/2349))
-   Added `impl AsFd for pty::PtyMaster`
    ([#&#8203;2355](https://redirect.github.com/nix-rust/nix/pull/2355))
- Add `open` flag `O_SEARCH` to AIX, Empscripten, FreeBSD, Fuchsia,
solarish,
WASI
([#&#8203;2374](https://redirect.github.com/nix-rust/nix/pull/2374))
-   Add prctl function `prctl_set_vma_anon_name` for Linux/Android.
    ([#&#8203;2378](https://redirect.github.com/nix-rust/nix/pull/2378))
- Add `sync(2)` for `apple_targets/solarish/haiku/aix/hurd`, `syncfs(2)`
for
    `hurd` and `fdatasync(2)` for `aix/hurd`
    ([#&#8203;2379](https://redirect.github.com/nix-rust/nix/pull/2379))
-   Add fdatasync support for Apple targets.
    ([#&#8203;2380](https://redirect.github.com/nix-rust/nix/pull/2380))
-   Add `fcntl::OFlag::O_PATH` for FreeBSD and Fuchsia
    ([#&#8203;2382](https://redirect.github.com/nix-rust/nix/pull/2382))
-   Added `PathconfVar::MIN_HOLE_SIZE` for apple_targets.
    ([#&#8203;2388](https://redirect.github.com/nix-rust/nix/pull/2388))
-   Add `open` flag `O_SEARCH` to apple_targets
    ([#&#8203;2391](https://redirect.github.com/nix-rust/nix/pull/2391))
-   `O_DSYNC` may now be used with `aio_fsync` and `fcntl` on FreeBSD.
    ([#&#8203;2404](https://redirect.github.com/nix-rust/nix/pull/2404))
-   Added `Flock::relock` for upgrading and downgrading locks.
    ([#&#8203;2407](https://redirect.github.com/nix-rust/nix/pull/2407))

##### Changed

-   Change the `ForkptyResult` type to the following repr so that the
    uninitialized
    `master` field won't be accessed in the child process:

    ````rs
    pub enum ForkptyResult {
        Parent {
            child: Pid,
            master: OwnedFd,
        },
        Child,
    }
``` ([#&#8203;2315](https://redirect.github.com/nix-rust/nix/pull/2315))
    ````
-   Updated `cfg_aliases` dependency from version 0.1 to 0.2
    ([#&#8203;2322](https://redirect.github.com/nix-rust/nix/pull/2322))
- Change the signature of `ptrace::write` and `ptrace::write_user` to
make them
safe
([#&#8203;2324](https://redirect.github.com/nix-rust/nix/pull/2324))
-   Allow use of `SignalFd` through shared reference

Like with many other file descriptors, concurrent use of signalfds is
safe.
Changing the signal mask of and reading signals from a signalfd can now
be
    done
    with the `SignalFd` API even if other references to it exist.
    ([#&#8203;2367](https://redirect.github.com/nix-rust/nix/pull/2367))
-   Changed tee, splice and vmsplice RawFd arguments to AsFd.
    ([#&#8203;2387](https://redirect.github.com/nix-rust/nix/pull/2387))
- Added I/O safety to the sys/aio module. Most functions that previously
    accepted a `AsRawFd` argument now accept an `AsFd` instead.
    ([#&#8203;2401](https://redirect.github.com/nix-rust/nix/pull/2401))
- `RecvMsg::cmsgs()` now returns a `Result`, and checks that cmsgs were
not
truncated.
([#&#8203;2413](https://redirect.github.com/nix-rust/nix/pull/2413))

##### Fixed

-   No longer panics when the `fanotify` queue overflows.
    ([#&#8203;2399](https://redirect.github.com/nix-rust/nix/pull/2399))
- Fixed ControlMessageOwned::UdpGroSegments wrapped type from u16 to i32
to
    reflect the used kernel's one.
    ([#&#8203;2406](https://redirect.github.com/nix-rust/nix/pull/2406))

</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 this update
again.

---

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

---

Release Notes:

- N/A

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-05 10:17:46 -04:00
renovate[bot]
5813727069
Update Rust crate async-stripe to 0.39 (#17379)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [async-stripe](https://redirect.github.com/arlyon/async-stripe) |
workspace.dependencies | minor | `0.38` -> `0.39` |

---

### Release Notes

<details>
<summary>arlyon/async-stripe (async-stripe)</summary>

###
[`v0.39.1`](https://redirect.github.com/arlyon/async-stripe/blob/HEAD/CHANGELOG.md#0391-2024-09-03)

[Compare
Source](https://redirect.github.com/arlyon/async-stripe/compare/v0.39.0...v0.39.1)

##### Bug Fixes

- correct docs host and path for API references
([539836d](539836d019))

###
[`v0.39.0`](https://redirect.github.com/arlyon/async-stripe/blob/HEAD/CHANGELOG.md#0390-2024-08-31)

[Compare
Source](https://redirect.github.com/arlyon/async-stripe/compare/v0.38.1...v0.39.0)

##### Bug Fixes

- `post` -> `post_form`
([bc39260](bc3926039e))
- Move `promotion_code_ext` to `products` feature
([32435f3](32435f38c2))
- Re-export
([24f1782](24f17823b1))

##### Features

- Create promotion code
([0fde9eb](0fde9eb6bc))

####
[0.38.1](https://redirect.github.com/arlyon/async-stripe/compare/v0.38.0...v0.38.1)
(2024-08-06)

##### Bug Fixes

-
[#&#8203;578](https://redirect.github.com/arlyon/async-stripe/issues/578)
allow arbitrary strings for priceId
([a16bc6e](a16bc6e80c))

</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 this update
again.

---

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

---

Release Notes:

- N/A

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-04 18:55:53 -04:00
Marshall Bowers
e81b484bf2
assistant: Add tool registry (#17331)
This PR adds a tool registry to hold tools that can be called by the
Assistant.

Currently we just have a `now` tool for retrieving the current datetime.

This is all behind the `assistant-tool-use` feature flag which currently
needs to be explicitly opted-in to in order for the LLM to see the
tools.

Release Notes:

- N/A
2024-09-03 19:14:36 -04:00
renovate[bot]
122f01f9e5
Update Rust crate async-tar to 0.5.0 (#17304)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [async-tar](https://redirect.github.com/dignifiedquire/async-tar) |
workspace.dependencies | minor | `0.4.2` -> `0.5.0` |

---

### Release Notes

<details>
<summary>dignifiedquire/async-tar (async-tar)</summary>

###
[`v0.5.0`](https://redirect.github.com/dignifiedquire/async-tar/compare/v0.4.2...v0.5.0)

[Compare
Source](https://redirect.github.com/dignifiedquire/async-tar/compare/v0.4.2...v0.5.0)

</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 this update
again.

---

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

---

Release Notes:

- N/A

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-03 10:13:17 -04:00
Marshall Bowers
70018a167a
Revert "Update Rust crate clickhouse to 0.12.0 (#17034)" (#17086)
This PR reverts the `clickhouse` upgrade from #17034.

After testing in staging I'm seeing errors when trying to write events
to Clickhouse. Going to revert so we can investigate.

This reverts commit 505675c0b5.

Release Notes:

- N/A
2024-08-29 10:26:40 -04: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
renovate[bot]
eb0b6d57e3
Update Rust crate cocoa to 0.26 (#17036)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [cocoa](https://togithub.com/servo/core-foundation-rs) | dependencies
| minor | `0.25` -> `0.26` |
| [cocoa](https://togithub.com/servo/core-foundation-rs) |
workspace.dependencies | minor | `0.25` -> `0.26` |

---

### 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 21:57:26 -07:00
renovate[bot]
1eec601afb
Update Rust crate fork to 0.2.0 (#17044)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [fork](https://docs.rs/fork/latest/fork/)
([source](https://togithub.com/immortal/fork)) | workspace.dependencies
| minor | `0.1.23` -> `0.2.0` |

---

### Release Notes

<details>
<summary>immortal/fork (fork)</summary>

###
[`v0.2.0`](https://togithub.com/immortal/fork/blob/HEAD/CHANGELOG.md#020)

[Compare
Source](https://togithub.com/immortal/fork/compare/0.1.23...0.2.0)

-   Added waitpid(pid: i32)

</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 this update
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>
2024-08-28 19:38:27 -04:00
renovate[bot]
505675c0b5
Update Rust crate clickhouse to 0.12.0 (#17034)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [clickhouse](https://clickhouse.com)
([source](https://togithub.com/ClickHouse/clickhouse-rs)) |
workspace.dependencies | minor | `0.11.6` -> `0.12.0` |

---

### Release Notes

<details>
<summary>ClickHouse/clickhouse-rs (clickhouse)</summary>

###
[`v0.12.2`](https://togithub.com/ClickHouse/clickhouse-rs/blob/HEAD/CHANGELOG.md#0122---2024-08-20)

[Compare
Source](https://togithub.com/ClickHouse/clickhouse-rs/compare/v0.12.1...v0.12.2)

##### Changed

-   Now this crate is pure Rust, no more C/C++ dependencies.
- insert: increase max size of frames to improve throughput
([#&#8203;130]).
-   compression: replace `lz4` sys binding with `lz4-flex` (pure Rust).
- compression: replace `clickhouse-rs-cityhash-sys` sys binding with
`cityhash-rs` (pure Rust) ([#&#8203;107]).

##### Deprecated

- compression: `Compression::Lz4Hc` is deprecated and becomes an alias
to `Compression::Lz4`.

[#&#8203;130]: https://togithub.com/ClickHouse/clickhouse-rs/issues/130

[#&#8203;107]: https://togithub.com/ClickHouse/clickhouse-rs/issues/107

###
[`v0.12.1`](https://togithub.com/ClickHouse/clickhouse-rs/blob/HEAD/CHANGELOG.md#0121---2024-08-07)

[Compare
Source](https://togithub.com/ClickHouse/clickhouse-rs/compare/v0.12.0...v0.12.1)

##### Added

- query/bind: support `Option` in `query.bind(arg)` ([#&#8203;119],
[#&#8203;120]).
- client: `Client::with_header()` to provide custom headers
([#&#8203;98], [#&#8203;108]).
- query: added `Query::with_option()` similar to `Client::with_option()`
([#&#8203;123]).
- insert: added `Insert::with_option()` similar to
`Client::with_option()` ([#&#8203;123]).
- inserter: added `Inserter::with_option()` similar to
`Client::with_option()` ([#&#8203;123]).

##### Changed

- insert: the outgoing request is now created after the first
`Insert::write` call instead of `Insert::new` ([#&#8203;123]).

[#&#8203;123]: https://togithub.com/ClickHouse/clickhouse-rs/pull/123

[#&#8203;120]: https://togithub.com/ClickHouse/clickhouse-rs/pull/120

[#&#8203;119]: https://togithub.com/ClickHouse/clickhouse-rs/issues/119

[#&#8203;108]: https://togithub.com/ClickHouse/clickhouse-rs/pull/108

[#&#8203;98]: https://togithub.com/ClickHouse/clickhouse-rs/issues/98

###
[`v0.12.0`](https://togithub.com/ClickHouse/clickhouse-rs/blob/HEAD/CHANGELOG.md#0120---2024-07-16)

[Compare
Source](https://togithub.com/ClickHouse/clickhouse-rs/compare/v0.11.6...v0.12.0)

##### Added

-   derive: support `serde::skip_deserializing` ([#&#8203;83]).
-   insert: apply options set on the client ([#&#8203;90]).
-   inserter: can be limited by size, see `Inserter::with_max_bytes()`.
- inserter: `Inserter::pending()` to get stats about still being
inserted data.
- inserter: `Inserter::force_commit()` to commit and insert immediately.
-   mock: impl `Default` instance for `Mock`.

##### Changed

-   **BREAKING** bump MSRV to 1.67.
- **BREAKING** replace the `tls` feature with `native-tls` and
`rustls-tls` that must be enabled explicitly now.
- **BREAKING** http: `HttpClient` API is changed due to moving to hyper
v1.
-   **BREAKING** inserter: move under the `inserter` feature.
-   **BREAKING** inserter: there is no default limits anymore.
-   **BREAKING** inserter: `Inserter::write` is synchronous now.
-   **BREAKING** inserter: rename `entries` to `rows`.
-   **BREAKING** drop the `wa-37420` feature.
-   **BREAKING** remove deprecated items.
- **BREAKING** mock: `provide()`, `watch()` and `watch_only_events()`
now accept iterators instead of streams.
- inserter: improve performance of time measurements by using `quanta`.
-   inserter: improve performance if the time limit isn't used.
-   derive: move to syn v2.
- mock: return a request if no handler is installed ([#&#8203;89],
[#&#8203;91]).

##### Fixed

-   watch: support a new syntax.
-   uuid: possible unsoundness.
-   query: avoid panics during `Query::bind()` calls ([#&#8203;103]).

[#&#8203;103]: https://togithub.com/ClickHouse/clickhouse-rs/issues/103

[#&#8203;102]: https://togithub.com/ClickHouse/clickhouse-rs/pull/102

[#&#8203;91]: https://togithub.com/ClickHouse/clickhouse-rs/pull/91

[#&#8203;90]: https://togithub.com/ClickHouse/clickhouse-rs/pull/90

[#&#8203;89]: https://togithub.com/ClickHouse/clickhouse-rs/issues/89

[#&#8203;83]: https://togithub.com/ClickHouse/clickhouse-rs/pull/83

</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 this update
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>
2024-08-28 18:43:14 -04:00
Conrad Irwin
d715fea258
Blade init fixes (rev 2) (#17022)
This pulls in some experimental initialization changes from
kvark/blade#144

Release Notes:

- linux: Improved GPU detection
2024-08-28 13:54:30 -06:00
Matin Aniss
d1dceef945
blade: Update blade to b37a9a9 to fix leaking memory (#16935)
Bumps blade to `b37a9a994709d256f4634efd29281c78ba89071a` which
importantly includes a fix for leaking memory from Vulkan objects when
creating and destroying the context.
https://github.com/kvark/blade/pull/162

This improves https://github.com/zed-industries/zed/issues/13346, but I
think there are still some improvements to be made.
 
Release Notes:

- N/A
2024-08-27 09:59:10 +03:00
Nate Butler
7a964ff91a
Don't rely on relative path for docs preprocessor (#16883)
Reapplies #16700 with a corrected command. Now it no longer relies on a
relative path.

Thanks @maxdeviant for the quick help 🙏 

Release Notes:

- N/A
2024-08-26 11:43:13 -04:00
Nate Butler
2a03dde538
Revert "Add docs_preprocessor crate to support Zed Docs" (#16880)
Temporarily revert #16700 to deal with this error:

`error: manifest path `../crates/docs_preprocessor/Cargo.toml` does not
exist` as it was causing the docs-preprocessor not to run, meaning
unexpanded templates were showing up in the public docs.

Reverts zed-industries/zed#16700

Release Notes:

- N/A
2024-08-26 11:06:25 -04:00
Nate Butler
46bb04a019
Add docs_preprocessor crate to support Zed Docs (#16700)
This PR adds a mdbook preprocessor for supporting Zed's docs.

This initial version adds the following custom commands:

**Keybinding** 

`{#kb prefix::action_name}` (e.g. `{#kb zed::OpenSettings}`)

Outputs a keybinding template like `<kbd
class="keybinding">{macos_keybinding}|{linux_keybinding}</kbd>`. This
template is processed on the client side through `mdbook` to show the
correct keybinding for the user's platform.

**Action** 

`{#action prefix::action_name}` (e.g. `{#action zed::OpenSettings}`)

For now, simply outputs the action name in a readable manner. (e.g.
zed::OpenSettings -> zed: open settings)

In the future we'll add additional modes for this template, like create
a standard way to render `{action} ({keybinding})`.

## Example Usage

```
To open the assistant panel, toggle the right dock by using the {#action workspace::ToggleRightDock} action in the command palette or by using the
{#kb workspace::ToggleRightDock} shortcut.
```

Release Notes:

- N/A
2024-08-26 10:50:40 -04:00
Kirill Bulatov
55dda0e6af
A set of small fixes (#16849)
* Linux Clippy lints fixed
* Zed local tasks are now simpler to rerun
* Zed's `release-fast` build profile keeps the debug info so it's
possible to properly debug things without altering the sources

Release Notes:

- N/A
2024-08-26 02:24:08 +03:00
张小白
20f85b946d
windows: Don't panic if terminal creation fails (#16370)
Related #16352 

This PR picks up the upstream change
https://github.com/alacritty/alacritty/pull/8132, now when the terminal
creation fails, it will return an `Err` instead of directly panicing.

Release Notes:

- N/A
2024-08-22 12:55:16 -06:00
Cherry
25cdd2ad25
Update blade to 7f54ddf to fix compilation error in opengl mode (#16682)
Update blade to latest commit. This fixes a compilation error in zed
when compiling with `RUSTFLAGS="--cfg gles"`.

Closes #16677 

Release Notes:

- N/A
2024-08-22 19:06:42 +03:00
Sinan Gençoğlu
ff7017c308
Replace lazy_static with std::sync::LazyLock (#16066)
Closes #15860 

Since rust std now supports LazyLock replacing lazy_static with it
reduce the external dependency.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-20 14:27:33 -04:00
Kyle Kelley
f185269d03
repl: Upgrade runtimelib (#16499)
Upgrades runtimelib to bring in some fixes from
https://github.com/runtimed/runtimed/pull/114 and
https://github.com/runtimed/runtimed/pull/113 that work towards
addressing issues interfacing with the Julia kernel.

Release Notes:

- N/A
2024-08-19 22:39:17 -07:00
Nathan Sobo
43e13df9f3
Add a /perplexity slash command in an extension (#16438)
Release Notes:

- N/A
2024-08-18 16:34:55 -06:00
Nathan Sobo
11753914d7
Add a setting to show time to first window draw and frames per second in status bar (#16422)
I want to showcase Zed's performance via videos, and this seemed like a
good way to demonstrate it.


https://github.com/user-attachments/assets/f4a5fabc-efe7-4b48-9ba5-719882fdc856

Release Notes:

- On macOS, you can now set assign `performance.show_in_status_bar:
true` in your settings to show the time to the first window draw on
startup and then current FPS of the containing window's renderer.

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: David Soria Parra <167242713+dsp-ant@users.noreply.github.com>
Co-authored-by: Danny Hua <danny.hua@hey.com>
2024-08-18 15:22:19 -06:00
Marshall Bowers
5a30e29848
Add example extension to showcase slash commands (#16300)
This PR adds an example extension to showcase how to write slash
commands in an extension.

Release Notes:

- N/A
2024-08-15 12:26:13 -04:00
David Soria Parra
02ea6ac845
context_servers: Add initial implementation (#16103)
This commit proposes the addition of "context serveres" and the
underlying protocol (model context protocol). Context servers allow
simple definition of slash commands in another language and running
local on the user machines. This aims to quickly prototype new commands,
and provide a way to add personal (or company wide) customizations to
the assistant panel, without having to maintain an extension. We can
use this to reuse our existing codebase, with authenticators, etc and
easily have it provide context into the assistant panel.

As such it occupies a different design space as extensions, which I
think are
more aimed towards long-term, well maintained pieces of code that can be
easily distributed.

It's implemented as a central crate for easy reusability across the
codebase
and to easily hook into the assistant panel at all points.

Design wise there are a few pieces:
1. client.rs: A simple JSON-RPC client talking over stdio to a spawned
server. This is
very close to how LSP work and likely there could be a combined client
down the line.
2. types.rs: Serialization and deserialization client for the underlying
model context protocol.
3. protocol.rs: Handling the session between client and server.
4. manager.rs: Manages settings and adding and deleting servers from a
central pool.

A server can be defined in the settings.json as:

```
"context_servers": [
   {"id": "test", "executable": "python", "args": ["-m", "context_server"]
]
```

## Quick Example
A quick example of how a theoretical backend site can look like. With
roughly 100 lines
of code (nicely generated by Claude) and a bit of decorator magic (200
lines in total), one
can come up with a framework that makes it as easy as:

```python
@context_server.slash_command(name="rot13", description="Perform a rot13 transformation")
@context_server.argument(name="input", type=str, help="String to rot13")
async def rot13(input: str) -> str:
    return ''.join(chr((ord(c) - 97 + 13) % 26 + 97) if c.isalpha() else c for c in echo.lower())
```

to define a new slash_command.

## Todo:
 - Allow context servers to be defined in workspace settings.
 - Allow passing env variables to context_servers


Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-15 10:49:30 -04:00
renovate[bot]
add0f0dbe5
Update Rust crate async-stripe to 0.38 (#16264)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [async-stripe](https://togithub.com/arlyon/async-stripe) |
workspace.dependencies | minor | `0.37` -> `0.38` |

---

### Release Notes

<details>
<summary>arlyon/async-stripe (async-stripe)</summary>

###
[`v0.38.1`](https://togithub.com/arlyon/async-stripe/blob/HEAD/CHANGELOG.md#0381-2024-08-06)

[Compare
Source](https://togithub.com/arlyon/async-stripe/compare/v0.38.0...v0.38.1)

##### Bug Fixes

- [#&#8203;578](https://togithub.com/arlyon/async-stripe/issues/578)
allow arbitrary strings for priceId
([a16bc6e](a16bc6e80c))

###
[`v0.38.0`](https://togithub.com/arlyon/async-stripe/blob/HEAD/CHANGELOG.md#0380-2024-07-31)

[Compare
Source](https://togithub.com/arlyon/async-stripe/compare/v0.37.3...v0.38.0)

##### Features

- add support for TestClock operations
([d792798](d792798c3f)),
closes
[#&#8203;574](https://togithub.com/arlyon/async-stripe/issues/574)

####
[0.37.3](https://togithub.com/arlyon/async-stripe/compare/v0.37.2...v0.37.3)
(2024-07-29)

##### Bug Fixes

- linting issue for Rust 1.80
([9232213](9232213c06))

####
[0.37.2](https://togithub.com/arlyon/async-stripe/compare/v0.37.1...v0.37.2)
(2024-07-23)

##### Bug Fixes

- rtx id prefix
([67ea232](67ea2325ba))

####
[0.37.1](https://togithub.com/arlyon/async-stripe/compare/v0.37.0...v0.37.1)
(2024-05-24)

##### Bug Fixes

- Leftover clippy warnings
([888307d](888307d23d))
- Run clippy on openapi generator
([c63c197](c63c197e7c))

</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 this update
again.

---

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

---

Release Notes:

- N/A

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-15 09:50:59 -04:00
Nathan Sobo
c8f1358629
Allow prompt templates to be overridden in the zed configuration directory (#15887)
I need this to refine our prompts on the fly as I work.

Release Notes:

- Templates for prompts driving inline transformation in editors and the
terminal can now be overridden in the `~/.config/zed/prompts/templates`
directory. This is an advanced feature, and prevents you from getting
upstream changes. It's intended for use by Zed developers.
2024-08-06 19:30:48 -06:00
Marshall Bowers
cf5f4dddf5
Authorize access to language model providers based on country (#15859)
This PR updates the LLM service to authorize access to language model
providers based on the requester's country.

We detect the country using Cloudflare's
[`CF-IPCountry`](https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry)
header.

The country code is then checked against the list of supported countries
for the given LLM provider. Countries that are not supported will
receive an `HTTP 451: Unavailable For Legal Reasons` response.

Release Notes:

- N/A
2024-08-06 11:49:04 -04:00
Jaakko Sirén
fb1cd7cae2
blade: Update to pick up Intel memory coherency fix & fix calling blade params (#15829)
Builds on @kvark's PR https://github.com/zed-industries/zed/pull/15781
by fixing call to Blades `create_texture_view` the arguments of which
had changed.


Picks up https://github.com/kvark/blade/pull/153

Release Notes:

- Fixed Zed flickering on Linux when using Intel graphics.
([#14101](https://github.com/zed-industries/zed/issues/14101)).

---------

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-08-06 11:33:18 +02:00
Kyle Kelley
4528e9d582
repl: Create better terminal output for REPL stdio (#15715)
Rely on our implementation of a GPUI powered alacritty terminal to
render stdout & stderr from the repl.

Release Notes:

- Fixed ANSI escape code and carriage return handling in repl outputs
(https://github.com/zed-industries/zed/issues/15640,
https://github.com/zed-industries/zed/issues/14855)


https://github.com/user-attachments/assets/bd3f1584-863a-4afa-b60b-9d222a830ff8

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-03 05:48:16 -07:00
Kirill Bulatov
73d8370177
Use upstream tree-sitter-go-mod grammar (#15539)
Release Notes:

- N/A
2024-07-31 18:23:12 +03:00
Antonio Scandurra
99bc90a372
Allow customization of the model used for tool calling (#15479)
We also eliminate the `completion` crate and moved its logic into
`LanguageModelRegistry`.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-07-30 16:18:53 +02:00
Marshall Bowers
d93891ba63
collab: Lay groundwork for reconciling with Stripe using the events API (#15459)
This PR lays the initial groundwork for using the Stripe events API to
reconcile the data in our system with what's in Stripe.

We're using the events API over webhooks so that we don't need to stand
up the associated infrastructure needed to handle webhooks effectively
(namely an asynchronous job queue).

Since we haven't configured the Stripe API keys yet, we won't actually
spawn the reconciliation background task yet, so this is currently a
no-op.

Release Notes:

- N/A
2024-07-29 23:50:07 -04:00
Marshall Bowers
e15d59c445
collab: Add endpoint for initiating a billing subscription (#15452)
This PR adds a new `POST /billing/subscriptions` endpoint that can be
used to initiate a billing subscription.

The endpoint will use the provided `github_user_id` to look up a user,
generate a Stripe Checkout session, and then return the URL.

The caller would then redirect the user to the URL to initiate the
checkout flow.

Here's an example of how to call it:

```sh
curl -X POST "http://localhost:8080/billing/subscriptions" \
     -H "Authorization: <ADMIN_TOKEN>" \
     -H "Content-Type: application/json" \
     -d '{"github_user_id": 12345}'
```

Release Notes:

- N/A
2024-07-29 17:31:36 -04:00
Antonio Scandurra
2b871a631a
Use fuzzy-matching to locate symbols when resolving edit steps (#15447)
Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-07-29 20:21:19 +02:00
Kyle Kelley
bb188f673e
repl: Pass session id to kernel connections (#15389)
Updated runtimelib to 0.14 and passed a kernel session ID through to
identify our client.

Release Notes:

- N/A
2024-07-28 14:37:25 -07:00
Antonio Scandurra
d6bdaa8a91
Simplify LLM protocol (#15366)
In this pull request, we change the zed.dev protocol so that we pass the
raw JSON for the specified provider directly to our server. This avoids
the need to define a protobuf message that's a superset of all these
formats.

@bennetbo: We also changed the settings for available_models under
zed.dev to be a flat format, because the nesting seemed too confusing.
Can you help us upgrade the local provider configuration to be
consistent with this? We do whatever we need to do when parsing the
settings to make this simple for users, even if it's a bit more complex
on our end. We want to use versioning to avoid breaking existing users,
but need to keep making progress.

```json
"zed.dev": {
  "available_models": [
    {
      "provider": "anthropic",
        "name": "some-newly-released-model-we-havent-added",
        "max_tokens": 200000
      }
  ]
}
```

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-07-28 11:07:10 +02:00
Marshall Bowers
bcd972fbb4
Upgrade dashmap to v6 (#15305)
This PR upgrades `dashmap` to v6.0.1.

Release Notes:

- N/A
2024-07-26 17:58:37 -04:00
Marshall Bowers
e423f03ba6
Upgrade base64 to v0.22 (#15304)
This PR upgrades the `base64` dependency to v0.22.

Supersedes #15300.

Release Notes:

- N/A
2024-07-26 17:40:38 -04:00
Marshall Bowers
03ebbcbef6
live_kit_server: Replace jwt with jsonwebtoken (#15302)
This PR replaces `live_kit_server`'s usage of `jwt` with `jsonwebtoken`.

`jwt` hasn't been updated in 2 years and seems unmaintained.

`jsonwebtoken` has significantly more downloads and appears to be a
healthier crate overall.

Release Notes:

- N/A
2024-07-26 17:20:01 -04:00
Marshall Bowers
4abf7f058e
Upgrade env_logger to v0.11 (#15278)
This PR upgrades `env_logger` to v0.11.

There were some breaking changes in the style API. I followed the
[migration
guide](73bb418802/CHANGELOG.md (migration-guide))
to update the usage.

Visually there shouldn't be any changes:

### Before

<img width="1068" alt="Screenshot 2024-07-26 at 10 20 07 AM"
src="https://github.com/user-attachments/assets/9abdbba2-5a34-46df-a62b-3d6c2d9d1137">

### After

<img width="1061" alt="Screenshot 2024-07-26 at 10 37 35 AM"
src="https://github.com/user-attachments/assets/c81bc3cc-1738-43f7-ba19-4c4be058427f">

Release Notes:

- N/A
2024-07-26 10:48:07 -04:00