d4761a3
Recognize Cuda files as C++ (#16098)
Click to expand commit body
Signed-off-by: Athish Pranav D <athishanna@gmail.com>
Athish Pranav D created
d4761a3
Recognize Cuda files as C++ (#16098)
Signed-off-by: Athish Pranav D <athishanna@gmail.com>
Athish Pranav D created
ac30ed0
assistant: Populate `/docs rustdoc` with workspace crates (#16172)
This PR makes the `/docs` slash command populate the list with all of the workspace crates when using the local rustdoc provider. The workspace crates are shown in the search results when a crate is not already indexed: <img width="577" alt="Screenshot 2024-08-13 at 2 18 39 PM" src="https://github.com/user-attachments/assets/39bee576-8e1a-4b21-a9f8-7951ebae4cc3"> These crates are shown with an `(unindexed)` suffix to convey this: <img width="570" alt="Screenshot 2024-08-13 at 2 18 45 PM" src="https://github.com/user-attachments/assets/4eeb07f7-378f-44d4-ae11-4ffe45a23964"> Release Notes: - N/A
Marshall Bowers created
b1a581e
Copy/paste images into editors (Mac only) (#15782)
For future reference: WIP branch of copy/pasting a mixture of images and text: https://github.com/zed-industries/zed/tree/copy-paste-images - we'll come back to that one after landing this one. Release Notes: - You can now paste images into the Assistant Panel to include them as context. Currently works only on Mac, and with Anthropic models. Future support is planned for more models, operating systems, and image clipboard operations. --------- Co-authored-by: Antonio <antonio@zed.dev> Co-authored-by: Mikayla <mikayla@zed.dev> Co-authored-by: Jason <jason@zed.dev> Co-authored-by: Kyle <kylek@zed.dev>
Richard Feldman , Antonio , Mikayla , Jason , and Kyle created
e3b0de5
assistant: Auto-suggest crates for `/docs` when using the docs.rs provider (#16169)
This PR improves the initial experience of using `/docs docs-rs` with an empty index. We now show a brief explainer of what is expected (a crate name) as well as list some popular Rust crates to try: <img width="540" alt="Screenshot 2024-08-13 at 12 25 39 PM" src="https://github.com/user-attachments/assets/942de250-2901-45df-9e3e-52ff3b3fc517"> Release Notes: - N/A
Marshall Bowers created
03796e7
repl: Don't show cmd window on Windows (#16016)
Closes #15955 . Release Notes: - Fixed `cmd` window showing when repl executing commands([#15955](https://github.com/zed-industries/zed/issues/15955) ).
张小白 created
fa51651
assistant: Fix debug inspector removing workflow step it's applied to (#16166)
Debug inspector broke immediately after merge as #16036 landed in parallel; one of the changes of that PR is removing any steps whose content was edited, which is what debug inspector happened to do. The fix is to make the edit right past the step block. Release Notes: - N/A
Piotr Osiewicz created
7aed240
Improve /tabs completion workflow (#16168)
Follow-up of https://github.com/zed-industries/zed/pull/16154 Reworks /tabs arguments to allow: * current tab by default, if no arguments are present * fuzzy-matching over paths of the related tabs * `all` case to insert all tabs at once Release Notes: - N/A
Kirill Bulatov created
7b613cb
Revert "Remove extra empty space for files when file icons are turned off (#16142) (#16167)
This PR reverts #16142, as it isn't what we want from a design standpoint. Having the file names misaligned from the folder names is not the desired behavior: <img width="243" alt="Screenshot 2024-08-13 at 11 16 53 AM" src="https://github.com/user-attachments/assets/12914e89-2641-4932-96c2-00e89e56d6d7"> We can revisit when we have design bandwidth. This reverts commit ee6a40137f21998a1b82df480c81207ec569fc98. Release Notes: - Reverted #16142. - @JosephTLyons @notpeter for release notes curation
Marshall Bowers created
8a9c58e
zed_extension_api: Add `HttpRequestBuilder` (#16165)
This PR adds an `HttpRequestBuilder` to the extension API to allow for a more ergonomic way for constructing HTTP requests within extensions. The HTTP client functionality is now also exposed via the `zed_extension_api::http_client` module instead of top-level. Release Notes: - N/A
Marshall Bowers created
0dbecee
assistant: Refine workflow step labels (#16161)
https://github.com/user-attachments/assets/f6325507-091a-482e-ac28-dd09877ebaa2 Release Notes: - N/A --------- Co-authored-by: Danilo <daniloleal09@gmail.com>
Piotr Osiewicz and Danilo created
8252949
Fix min and max versions for v0.1.0 of the extension API (#16163)
Missed this in #16158. Release Notes: - N/A
Marshall Bowers created
4450ebf
Allow extensions to control the redirect policy for the HTTP client (#16162)
This PR extends the extension API with support for controlling the redirect policy used by the HTTP client. Release Notes: - N/A
Marshall Bowers created
98a2ab0
zed_extension_api: Bump to v0.1.0 (#16158)
This PR changes v0.0.7 of the extension API to v0.1.0. We had a false-start in releasing v0.0.7, which has since been yanked, so we need a new version number. We'll publish v0.1.0 to crates.io once the Preview build is out tomorrow. We're incrementing the minor version so that we have some leeway in putting out patch releases of the crate within a given extension API release. Release Notes: - N/A
Marshall Bowers created
47eed12
Update zed.desktop.in to include the MimeType for empty files by default (#15623)
Update zed.desktop.in to include the MimeType for empty files. Seems to be the default for all "text editors" .desktop files. Release Notes: - Improved MimeType list in XDG .desktop file
Rudolf Kastl created
cade9fb
assistant: Show a better error when `/docs` is used without a package name (#16157)
This PR makes it so that running `/docs` without providing a package name gives a better error message: <img width="248" alt="Screenshot 2024-08-13 at 9 24 58 AM" src="https://github.com/user-attachments/assets/c1cc794e-0fa0-490a-871a-a56702b03d42"> <img width="228" alt="Screenshot 2024-08-13 at 9 25 05 AM" src="https://github.com/user-attachments/assets/45dca2d7-171f-48f0-a03c-254b552cb50d"> Release Notes: - N/A
Marshall Bowers created
fe19035
editor: Add revert file action to command palette (#16012)
Release Notes: - Added an `editor::RevertFile` action
CharlesChen0823 created
ab98f16
Update key-bindings.md (#15994)
Closes https://github.com/zed-industries/zed/pull/15238 Release Notes: - N/A
fcolecumberri created
ac6bff1
windows: Remove unused dependencies (#15857)
I have removed some unused dependencies, reducing the total number of packages during the build from 1141 to 1112. This should slightly decrease the build time.  Release Notes: - N/A
张小白 created
081cbce
Merge /active command into /tabs one (#16154)
Now, tabs have arguments, `active` (default, applied also for no arguments case) and `all` to insert the active tab only or all tabs. Release Notes: - N/A
Kirill Bulatov created
c2b254a
Fallback to using tree-sitter when determining ranges for info popovers (#16062)
Closes #15382 Release Notes: - Added fallback to a smallest tree sitter node when hovering over a symbol
Stanislav Alekseev created
af36d49
assistant panel: Animate assistant label if message is pending (#16152)
This adds a pulsating effect to the assistant header in case the message is pending. The pulsating effect is capped between 0.2 and 1.0 and I tried (with the help of Claude) to give it a "breathing" effect, since I found the normal bounce a bit too much. Also opted for setting the `alpha` on the `LabelLike` things, vs. overwriting the color, since I think that's cleaner instead of exposing the color and mutating that. https://github.com/user-attachments/assets/4a94a1c5-8dc7-4c40-b30f-d92d112db7b5 Release Notes: - N/A
Thorsten Ball created
b36d138
Fix `editor::Cancel` action not inline assistant inputs created for empty selections (#16150)
Release Notes: - N/A
Kirill Bulatov created
ee6a401
Remove extra empty space for files when file icons are turned off (#16142)
Closes #16073 <img width="269" alt="image" src="https://github.com/user-attachments/assets/88b7ff9f-17ec-4764-b37a-c218d7ad14ec"> Release Notes: - Removed extra empty space for files when file icons are turned off ([#16073](https://github.com/zed-industries/zed/issues/16073))
Uladzislau Kaminski created
1c189e8
Improve tooltip text (#16147)
 Release Notes: - Include a count of the context tokens when hovering token counts in the inline assist.
Nathan Sobo created
a515442
Rely on model to determine indentation level and always rewrite the full line (#16145)
This PR simplifies our approach to indentation in the inline assistant in hopes of improving our experience for Python. We tell the model to generate the correct indentation in the prompt, and always start generating at the start of the line. This may fall down for less capable models, but I want to get a solid experience on the best models and then figure the rest out later. Also: We now prefer `./assets/prompts` as an overrides directory when stdout is a PTY, so you can do `cargo run` and then iterate prompts for the current run inside the current working copy. cc @trishume @dsp-ant Release Notes: - Zed now allows the model to control indentation when performing inline transformation. We're hoping this improves the indentation experience in Python and other indentation-sensitive languages, but it does require more from the model. --------- Co-authored-by: Mikayla <mikayla@zed.dev>
Nathan Sobo and Mikayla created
e662bfc
Configure squawk rules (#16144)
This PR configures [`squawk`](https://squawkhq.com/) to match our database conventions. Release Notes: - N/A
Marshall Bowers created
b4c22cc
collab: Add ability to revoke LLM service access tokens (#16143)
This PR adds the ability to revoke access tokens for the LLM service.
There is a new `revoked_access_tokens` table that contains the
identifiers (`jti`) of revoked access tokens.
To revoke an access token, insert a record into this table:
```sql
insert into revoked_access_tokens (jti) values ('1e887b9e-37f5-49e8-8feb-3274e5a86b67');
```
We now attach the `jti` as `authn.jti` to the tracing spans so that we
can associate an access token with a given request to the LLM service.
Release Notes:
- N/A
Marshall Bowers created
0bc9fc9
assistant: Slash command tweaks (#16140)
Release Notes: - N/A
Piotr Osiewicz created
dbcd066
Track lifetime spending for each user and model (#16137)
Release Notes: - N/A Co-authored-by: Marshall <marshall@zed.dev>
Max Brunsfeld and Marshall created
68ae347
chore: Remove a bunch of unused structs (#16139)
Found by beta clippy. Release Notes: - N/A
Piotr Osiewicz created
f956257
haskell: Pass environment to `hls` (#15998)
Fixed environment not being passed to hls, breaking local nix-based installations Release Notes: - N/A
Stanislav Alekseev created
8a148f3
Add feature-flagged access to LLM service (#16136)
This PR adds feature-flagged access to the LLM service. We've repurposed the `language-models` feature flag to be used for providing access to Claude 3.5 Sonnet through the Zed provider. The remaining RPC endpoints that were previously behind the `language-models` feature flag are now behind a staff check. We also put some Zed Pro related messaging behind a feature flag. Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev>
Marshall Bowers and Max created
3bebb8b
Allow to cycle through center/top/bot scroll positions (#16134)
On top of `editor::ScrollCursorCenter`, `editor::ScrollCursorTop`, `editor::ScrollCursorBottom` actions, adds an `editor::ScrollCursorCenterTopBottom` one, that allows using a single keybinding to scroll between positions on the screen. The implementation matches a corresponding Emacs feature: there's a timeout (1s) that is kept after every switch, to allow continuously changing the positions, center (initial) -> top -> bottom Scrolling behavior is the same as the existing actions (e.g. editor will ignore scroll to bottom, if there's not enough space above). After 1s, next position is reset to the initial, center, one. Release Notes: - Added an `editor::ScrollCursorCenterTopBottom` action for toggling scroll position with a single keybinding --------- Co-authored-by: Alex Kladov <aleksey.kladov@gmail.com>
Kirill Bulatov and Alex Kladov created
98516b5
collab: Restrict usage of the LLM service to accounts older than 30 days (#16133)
This PR restricts usage of the LLM service to accounts older than 30 days. We now store the GitHub user's `created_at` timestamp to check the GitHub account age. If this is not set—which it won't be for existing users—then we use the `created_at` timestamp in the Zed database. Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev>
Marshall Bowers and Max created
f398ecc
Allow inserting text into the editor via the action (#16131)
Improves workflows, based on the keymaps that group actions behind a certain symbol. E.g. ```json5 ", o k": "zed::OpenKeymap", ", o K": "zed::OpenDefaultKeymap", // other `,`-based keymaps ``` Now, it's possible to do ```json ", ,": ["editor::HandleInput", ","] ``` and type `,` without waiting for the timeout due to `,`-based bindings. Release Notes: - Add an `editor::HandleInput` action to ease typing symbols that are part of keymaps. E.g. if `, o k` keybinding is bound, `", ,": ["editor::HandleInput", ","]` would allow to type `,` without timeouts. --------- Co-authored-by: Alex Kladov <aleksey.kladov@gmail.com>
Kirill Bulatov and Alex Kladov created
a3c7921
Report telemetry events for rate limit errors (#16130)
clickhouse telemetry schema:
```
CREATE TABLE default.llm_rate_limit_events
(
`time` DateTime64(3),
`user_id` Int32,
`is_staff` Bool,
`plan` LowCardinality(String),
`model` String,
`provider` LowCardinality(String),
`usage_measure` LowCardinality(String),
`requests_this_minute` UInt64,
`tokens_this_minute` UInt64,
`tokens_this_day` UInt64,
`max_requests_per_minute` UInt64,
`max_tokens_per_minute` UInt64,
`max_tokens_per_day` UInt64,
`users_in_recent_minutes` UInt64,
`users_in_recent_days` UInt64
)
ORDER BY tuple()
```
Release Notes:
- N/A
Co-authored-by: Marshall <marshall@zed.dev>
Max Brunsfeld and Marshall created
1674e12
Expose anthropic API errors to the client (#16129)
Now, when an anthropic request is invalid or anthropic's API is down, we'll expose that to the user instead of just returning a generic 500. Release Notes: - N/A Co-authored-by: Marshall <marshall@zed.dev>
Max Brunsfeld and Marshall created
f3ec8d4
collab: Use a separate Anthropic API key for Zed staff (#16128)
This PR makes it so Zed staff can use a separate Anthropic API key for the LLM service. We also added an `is_staff` column to the `usages` table so that we can exclude staff usage from the "active users" metrics that influence the rate limits. Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev>
Marshall Bowers and Max created
ebdde59
collab: Don't issue LLM API tokens if the user has not accepted the ToS (#16123)
This PR adds a check to the LLM API token issuance to ensure that we only issue tokens to users that have accepted the terms of service. Release Notes: - N/A
Marshall Bowers created
df70e90
docs: Add `"dock"` to `"terminal"` section (#16122)
Documentation-related fix for #16121. Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com> Release Notes: * N/A
Neil created
63aef7f
command_palette: Remove project as a dependency in Cargo.toml (#16082)
The *project crate* is only needed as a dev dependency in the command palette.. So I am doing some code / dependency cleanup... Release Notes: - N/A
Michael Angerman created
9ae0d53
Update Rust crate quote to v1.0.36 (#15945)
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [quote](https://togithub.com/dtolnay/quote) | dependencies | patch | `1.0.35` -> `1.0.36` | --- ### Release Notes <details> <summary>dtolnay/quote (quote)</summary> ### [`v1.0.36`](https://togithub.com/dtolnay/quote/releases/tag/1.0.36) [Compare Source](https://togithub.com/dtolnay/quote/compare/1.0.35...1.0.36) - Documentation improvements </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:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMC4xIiwidXBkYXRlZEluVmVyIjoiMzguMjAuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate[bot] and renovate[bot] created
ebdb755
Surface upstream rate limits from Anthropic (#16118)
This PR makes it so hitting upstream rate limits from Anthropic result in an HTTP 429 response instead of an HTTP 500. To do this we need to surface structured errors out of the `anthropic` crate. Release Notes: - N/A
Marshall Bowers created
fbb533b
assistant: Require user to accept TOS for cloud provider (#16111)
This adds the requirement for users to accept the terms of service the first time they send a message with the Cloud provider. Once this is out and in a nightly, we need to add the check to the server side too, to authenticate access to the models. Demo: https://github.com/user-attachments/assets/0edebf74-8120-4fa2-b801-bb76f04e8a17 Release Notes: - N/A
Thorsten Ball created
98f314b
assistant: Add debug inspector (#16105)
I went with inline approach directly within the panel. First, enable workflow debugging in the hamburger menu (this works retroactively as well):  This enables debug buttons in the header of each step:  Enabling one pretty-prints the workflow step internals:  Release Notes: - N/A
Piotr Osiewicz created
b6b0815
assistant: Show tooltips on workflow step buttons only when cursor is in step (#16108)
Release Notes: - N/A
Piotr Osiewicz created
fc64843
Enhance HTTP API for extensions (#16067)
# HTTP Client Improvements for Extension API This PR enhances the HTTP client functionality in the Zed extension API, providing more control over requests and allowing for streaming responses. ## Key Changes 1. Extended `HttpRequest` struct: - Added `method` field to specify HTTP method - Added `headers` field for custom headers - Added optional `body` field for request payload 2. Introduced `HttpMethod` enum for supported HTTP methods 3. Updated `HttpResponse` struct: - Added `headers` field to access response headers - Changed `body` type from `String` to `Vec<u8>` for binary data support 4. Added streaming support: - New `fetch_stream` function to get a response stream - Introduced `HttpResponseStream` resource for chunked reading 5. Updated internal implementations to support these new features 6. Modified the Gleam extension to use the new API structure ## Motivation These changes provide extension developers with more flexibility and control over HTTP requests. The streaming support is particularly useful for handling large responses efficiently or ideally streaming into the UI. ## Testing - [x] Updated existing tests - [ ] Added new tests for streaming functionality ## Next Steps - Consider adding more comprehensive examples in the documentation - Evaluate performance impact of streaming for large responses Please review and let me know if any adjustments are needed. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Nathan Sobo and Marshall Bowers created
f952126
collab: Remove LLM completions over RPC (#16114)
This PR removes the LLM completion messages from the RPC protocol, as these now go through the LLM service as of #16113. Release Notes: - N/A
Marshall Bowers created
f992cfd
Update provider logos (#16115)
- Updates provider logos for Anthropic, Google and Ollama - Increases the size of icons in the model selector Release Notes: - N/A
Nate Butler created
6389c61
Always stream completions through the LLM service (#16113)
This PR removes the `llm-service` feature flag and makes it so all completions are done via the LLM service when using the Zed provider. Release Notes: - N/A
Marshall Bowers created