zed/crates/extension
Marshall Bowers d30361537e
assistant: Update SlashCommand trait with streaming return type (#19652)
This PR updates the `SlashCommand` trait to use a streaming return type.

This change is just at the trait layer. The goal here is to decouple
changing the trait's API while preserving behavior on either side.

The `SlashCommandOutput` type now has two methods for converting two and
from a stream to use in cases where we're not yet doing streaming.

On the `SlashCommand` implementer side, the implements can call
`to_event_stream` to produce a stream of events based off the
`SlashCommandOutput`.

On the slash command consumer side we use
`SlashCommandOutput::from_event_stream` to convert a stream of events
back into a `SlashCommandOutput`.

The `/file` slash command has been updated to emit `SlashCommandEvent`s
directly in order for it to work properly.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
2024-10-23 21:26:50 -04:00
..
src assistant: Update SlashCommand trait with streaming return type (#19652) 2024-10-23 21:26:50 -04:00
build.rs zed_extension_api: Fork new version of extension API (#17795) 2024-09-13 10:54:23 -04:00
Cargo.toml Restore HTTP client transition, but use reqwest everywhere (#19055) 2024-10-11 14:58:58 -07:00
LICENSE-GPL Add logic for managing language and theme extensions (#7467) 2024-02-07 15:14:50 -05:00