We'll now clean up DAP locators for unloaded extensions and load schemas
proper
I can now load a custom Ruby extensions with all bells and whistles and
use it as my debugger.
Release Notes:
- N/A
- DAP schemas will be stored in `debug_adapters_schemas` subdirectory in
extension work dir.
- Added Debug Config integration and such.
Release Notes:
- N/A
This allows us to support debugging with a debug adapter not managed by
Zed. Note that this is not a user facing change, as DebugAdapterBinary
is used to determine how to spawn a debugger. Thus, this should not
break any configs or anything like that.
Closes #ISSUE
Release Notes:
- N/A
Cleans things up now that wasm32-wasip2 is a supported target.
Before we merge, I will need to test against the current extensions to
make sure this is fine.
However, since our wit world isn't using any wasi package imports, this
shouldn't be a breaking change.
Release Notes:
- N/A
This PR allows DAPs to define their own schema so users can see
completion items when editing their debug.json files.
Users facing this aren’t the biggest chance, but behind the scenes, this
affected a lot of code because we manually translated common fields from
Zed's config format to be adapter-specific. Now we store the raw JSON
from a user's configuration file and just send that.
I'm ignoring the Protobuf CICD error because the DebugTaskDefinition
message is not yet user facing and we need to deprecate some fields in
it.
Release Notes:
- debugger beta: Show completion items when editing debug.json
- debugger beta: Breaking change, debug.json schema now relays on what
DAP you have selected instead of always having the same based values.
---------
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Cole Miller <m@cole-miller.net>
Co-authored-by: Cole Miller <cole@zed.dev>
Extensions cannot look up available port themselves, hence the new API.
With this I'm able to port our Ruby implementation into an extension.
Release Notes:
- N/A
This reverts commit 9ef0501853 due to a
panic.
```
{
"thread": "main",
"payload": "9 is not a valid char boundary in path \"crates/…/LiveKitBridge/\"",
"location_data": {
"file": "crates/file_finder/src/file_finder.rs",
"line": 646
}
}
```
Release Notes:
- N/A
This PR makes progress on #7711 by identifying any common prefix of the
paths in the file finder's search results, and replacing the "interior"
of that prefix---every path segment but the first and last---with `...`,
when a heuristic indicates that the longest path would otherwise
overflow the modal.
The elision is not applied to any segment that contains a match for the
search query.
There may be more work to do on #7711 in the case of long result paths
that do not share a significant common prefix.
Release Notes:
- Improved display of long paths in the file finder modal
Co-authored-by: Max <max@zed.dev>
This PR exposes context server settings to extensions.
Extensions can use `ContextServerSettings::for_project` to get the
context server settings for the current project.
The `experimental.context_servers` setting has been removed and replaced
with the `context_servers` setting (which is now an object instead of an
array).
Release Notes:
- N/A
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This PR adds support for context servers provided by extensions.
To provide a context server from an extension, you need to list the
context servers in your `extension.toml`:
```toml
[context_servers.my-context-server]
```
And then implement the `context_server_command` method to return the
command that will be used to start the context server:
```rs
use zed_extension_api::{self as zed, Command, ContextServerId, Result};
struct ExampleContextServerExtension;
impl zed::Extension for ExampleContextServerExtension {
fn new() -> Self {
ExampleContextServerExtension
}
fn context_server_command(&mut self, _context_server_id: &ContextServerId) -> Result<Command> {
Ok(Command {
command: "node".to_string(),
args: vec!["/path/to/example-context-server/index.js".to_string()],
env: Vec::new(),
})
}
}
zed::register_extension!(ExampleContextServerExtension);
```
Release Notes:
- N/A
This PR makes `zed_extension_api` use the WIT types from v0.2.0 of
extension API.
A follow-up from #17795, since I had forgotten to do it there.
Release Notes:
- N/A
This PR forks a new version of the `zed_extension_api` in preparation
for new changes.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
This PR starts a list of pending changes for the Zed extension API.
We'll want to keep this list updated as we note things that we want to
change in the next version of the extension API. This will help with
batching breaking changes together so that we're not constantly creating
new versions of the extension API for one-off changes.
Release Notes:
- N/A
* renames `/tabs` to `/tab`
* allows to insert multiple tabs when fuzzy matching by the names
* improve slash command completion API, introduce a notion of multiple
arguments
* properly fire off commands on arguments' completions with
`run_command: true`
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <marshall@zed.dev>
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
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
# 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>
This PR updates the extension API to make the `worktree` argument to
`run_slash_command` optional.
We may not always have a worktree, and not all slash commands need them,
so by making it optional we can allow individual slash commands to
decide what to do when there is no worktree.
Release Notes:
- N/A