This PR adjusts how we display the "mode" collab is running in on the
root endpoint.
It's minor, but it does make things a bit cleaner.
Release Notes:
- N/A
This prevents users from accessing other models, such as OpenAI's GPT-4
or Google's Gemini-Pro.
Staff members can still access all models.
Co-authored-by: Thorsten <thorsten@zed.dev>
Release Notes:
- N/A
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
Release Notes:
- Fixed a (potential) small error in erf estimation. Technically, the
error is negligible.
I am not sure where the current calculation for erf come from and if it
is intended or a simple mistake. However it looks slightly different
from the official calculation, notably
[this](https://en.wikipedia.org/wiki/Error_function#Approximation_with_elementary_functions)
from Wikipedia.
I will add a comment if it is intended.
This will help us as we hit issues with the /workflow and step
resolution. We can override the baked-in prompts and make tweaks, then
import our refinements back into the source tree when we're ready.
Release Notes:
- N/A
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.
<img width="862" alt="image"
src="https://github.com/user-attachments/assets/ae8c479d-d9f9-4c46-bb1a-be411ab07876">
Release Notes:
- Added additional context about available to kernel sessions
- Fixed bug in kernelspec launch choosing first available kernel
matching the language rather than selected name
---------
Co-authored-by: Jason <jason@zed.dev>
This PR removes the unused `ignore_checksum_mismatch` parameter to
`run_database_migrations`.
We were always passing `false`, which meant the behavior didn't need to
be parameterized.
Release Notes:
- N/A
This PR puts the initial infrastructure for the LLM service's database
in place.
The LLM service will be using a separate Postgres database, with its own
set of migrations.
Currently we only connect to the database in development, as we don't
yet have the database setup for the staging/production environments.
Release Notes:
- N/A
We achieved this by allowing block decorations to have a height of `0`
and superimposing the border on top of the line, as opposed to carving
out space below it.
Release Notes:
- N/A
---------
Co-authored-by: Jason <jason@zed.dev>
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
- [x] OpenAI
- [ ] ~Google~ Moved into a separate branch at:
https://github.com/zed-industries/zed/tree/tool-calls-in-google-ai I've
ran into issues with having the API digest our schema without tripping
over itself - the function call parameters are malformed and whatnot. We
can resume from that branch if needed.
- [x] Ollama
- [x] Cloud
- [ ] ~Copilot Chat (?)~
Release Notes:
- Added tool calling capabilities to OpenAI and Ollama models.
Release Notes:
- Improved streaming git diffs to be less jumpy during inline assistant
generation
---------
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This PR refactors the language server loading in the Ruff extension to
mirror our other extensions.
Also fixed an issue where the cached binary path was not being
respected.
Release Notes:
- N/A
Hello, this pull request adds support for specifying and using the
"binary" settings for Rubocop and Solargraph LSPs. AFAIK, Ruby LSP does
not require the bundler context but that could be added later easily.
In Ruby world, like in Node.js world, almost all
projects rely on project specific packages (gems) and their versions.
Solargraph and Rubocop gems are usually installed as project
dependencies. Attempting to use global installation of them fail in most
cases due to incompatible or missing dependencies (gems).
To avoid that, Ruby engineers have the `bundler`
gem that provides the `exec` command. This command executes the given
command in the context of the bundle.
This pull request adds support for pulling the `binary` settings to use
them in starting both LSPs. For instance, to start the Solargraph gem in
the context of the bundler, the end user must configure the binary
settings in the folder-specific settings file like so:
```json
{
"lsp": {
"solargraph": {
"binary": {
"path": "/Users/vslobodin/Development/festivatica/bin/rubocop"
}
}
}
}
```
The `path` key must be an absolute path to the `binstub` of the
`solargraph` gem. The same applies to the "rubocop" gem. Side note but
it would be awesome to use Zed specific environment variables to make
this a bit easier. For instance, we could use the `ZED_WORKTREE_ROOT`
environment variable:
```json
{
"lsp": {
"solargraph": {
"binary": {
"path": "${ZED_WORKTREE_ROOT}/bin/rubocop"
}
}
}
}
```
But this is out of the scope of this pull request. The code is a bit
messy and repeatable in some places, I am happy to improve it here or
later.
References:
- https://bundler.io/v2.4/man/bundle-exec.1.html
- https://solargraph.org/guides/troubleshooting
- https://bundler.io/v2.5/man/bundle-binstubs.1.html
This pull request is based on these two pull requests:
- https://github.com/zed-industries/zed/pull/14655
- https://github.com/zed-industries/zed/issues/15001
Closes https://github.com/zed-industries/zed/issues/5109.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Adds a "Use Supermaven" and "Use Copilot" menu item to the signed out
menus for each of the autocomplete providers to make it easier to switch
between them without having to update your local settings json.
<img width="222" alt="image"
src="https://github.com/user-attachments/assets/6f760f4e-5527-4971-bdaf-383bc99649bd">
Release Notes:
- Added menu items to quickly switch between Supermaven and Copilot
inline completions when the provider is not configured
We changed the following for the model selector:
- Fixed displaying checkmarks for selected models when using models with
the same name from different providers
- We now show the icon for the active model instead of displaying the
provider name in the trigger of the model selector
- Only display the footer when the language models feature flag is zed,
so that we don't release the hint for Zed Pro to preview tomorrow
<img width="253" alt="image"
src="https://github.com/user-attachments/assets/f95ccfb6-c0cf-43d4-9637-e2823100a427">
Release Notes:
- N/A
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
Adds support for [Goto
Declaration](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_declaration)
LSP command.
I am particularly interested in [this for Rust
projects](https://rust-analyzer.github.io/manual.html#go-to-declaration),
to be able to navigate to the place where a trait method is declared,
coming from a trait method implementation.
I noticed this was something I could do in VSCode before, but was
somehow missing is Zed. Thanks to the already existing infrastructure
for Goto Definition, I just followed and copy-paste-adapted it for Goto
Declaration.
As a bonus, I added `ctrl-F12` and `alt-ctrl-F12` as default macOS
keybindings for `GoToDeclaration` and `GoToDeclarationSplit`,
respectively. They are not keybindings from another editor, but I
figured they made sense to be grouped along with the other *F12
commands.
### Release Notes:
- Added "Go to declaration" editor action.
- vim: Breaking change to keybindings after introduction of the `Go to
declaration` editor action. The new keybindings are the following (and
can be found [here](https://zed.dev/docs/vim), alongside the other key
bindings):
- `g d` - Go to definition
- `g D` - Go to declaration
- `g y` - Go to type definition
- `g I` - Go to implementation
https://github.com/user-attachments/assets/ee5c10a8-94f0-4e50-afbb-6f71db540c1b
---------
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Hi, this pull request adds support for RBS files for the Ruby language.
[RBS](https://github.com/ruby/rbs) is a language to describe the
structure of Ruby programs.
This pull request:
- adds a new grammar to the Ruby extension for RBS
https://github.com/joker1007/tree-sitter-rbs
- configures the Ruby extension to use the added grammar.
Release Notes:
- N/A
This PR introduces a separate backend service for making LLM calls.
It exposes an HTTP interface that can be called by Zed clients. To call
these endpoints, the client must provide a `Bearer` token. These tokens
are issued/refreshed by the collab service over RPC.
We're adding this in a backwards-compatible way. Right now the access
tokens can only be minted for Zed staff, and calling this separate LLM
service is behind the `llm-service` feature flag (which is not
automatically enabled for Zed staff).
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR makes it so any Stripe events we receive that occurred over an
hour ago are marked as processed.
We don't want to process an old event long after it occurred and
potentially overwrite more recent updates.
This also makes running collab locally a bit nicer, as we won't be
getting errors for a bunch of older events that will never get processed
successfully.
The period after time after which we consider an event "stale" can be
modified, as needed.
Release Notes:
- N/A