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
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>
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
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>
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>
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
([#​130]).
- compression: replace `lz4` sys binding with `lz4-flex` (pure Rust).
- compression: replace `clickhouse-rs-cityhash-sys` sys binding with
`cityhash-rs` (pure Rust) ([#​107]).
##### Deprecated
- compression: `Compression::Lz4Hc` is deprecated and becomes an alias
to `Compression::Lz4`.
[#​130]: https://togithub.com/ClickHouse/clickhouse-rs/issues/130
[#​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)` ([#​119],
[#​120]).
- client: `Client::with_header()` to provide custom headers
([#​98], [#​108]).
- query: added `Query::with_option()` similar to `Client::with_option()`
([#​123]).
- insert: added `Insert::with_option()` similar to
`Client::with_option()` ([#​123]).
- inserter: added `Inserter::with_option()` similar to
`Client::with_option()` ([#​123]).
##### Changed
- insert: the outgoing request is now created after the first
`Insert::write` call instead of `Insert::new` ([#​123]).
[#​123]: https://togithub.com/ClickHouse/clickhouse-rs/pull/123
[#​120]: https://togithub.com/ClickHouse/clickhouse-rs/pull/120
[#​119]: https://togithub.com/ClickHouse/clickhouse-rs/issues/119
[#​108]: https://togithub.com/ClickHouse/clickhouse-rs/pull/108
[#​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` ([#​83]).
- insert: apply options set on the client ([#​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 ([#​89],
[#​91]).
##### Fixed
- watch: support a new syntax.
- uuid: possible unsoundness.
- query: avoid panics during `Query::bind()` calls ([#​103]).
[#​103]: https://togithub.com/ClickHouse/clickhouse-rs/issues/103
[#​102]: https://togithub.com/ClickHouse/clickhouse-rs/pull/102
[#​91]: https://togithub.com/ClickHouse/clickhouse-rs/pull/91
[#​90]: https://togithub.com/ClickHouse/clickhouse-rs/pull/90
[#​89]: https://togithub.com/ClickHouse/clickhouse-rs/issues/89
[#​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>
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
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
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
* 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
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>
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>
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>
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.
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
We also eliminate the `completion` crate and moved its logic into
`LanguageModelRegistry`.
Release Notes:
- N/A
---------
Co-authored-by: Nathan <nathan@zed.dev>
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
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
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>
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
This PR adds a new `xtask` command for checking that packages conform to
certain standards.
Still a work-in-progress, but right now it checks:
- If `[lints] workspace = true` is set
- If packages are using non-workspace dependencies
Release Notes:
- N/A
This PR upgrades `async-tungstenite` to v0.23.
This is so we can get the CVE fix in `tungstenite` v0.20.1.
Now that #15219 is done, upgrading to v0.23 no longer breaks
authentication with collab.
Release Notes:
- N/A
This PR upgrades `async-tungstenite` to v17.0.3.
We previously attempted upgrading `async-tungstenite` in #15039, but
broke authentication with collab in the process.
Upon further investigation, I determined that the root cause is due to
this change in `tungstenite` v0.17.0:
> Overhaul of the client's request generation process. Now the users are
able to pass the constructed `http::Request` "as is" to
`tungstenite-rs`, letting the library to check the correctness of the
request and specifying their own headers (including its own key if
necessary). No changes for those ones who used the client in a normal
way by connecting using a URL/URI (most common use-case).
We _were_ relying on passing an `http::Request` directly to
`tungstenite`, meaning we did not benefit from the changes to the common
path (of passing a URL/URI).
This meant that—due to changes in `tungstenite`—we were now missing the
`Sec-WebSocket-Key` header that `tungstenite` would otherwise set for
us.
Since we were only passing a custom `http::Request` to set headers, our
approach has been adjusted to construct the initial WebSocket request
using `tungstenite`'s `IntoClientRequest::into_client_request` and then
modifying the request to set our additional desired headers.
Release Notes:
- N/A