language_models: Fix passing of thread_id and prompt_id (#29071)

This PR is a follow-up to
https://github.com/zed-industries/zed/pull/29069 that fixes an issue
where the thread ID and prompt ID were not being sent up correctly.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-04-18 17:12:23 -04:00 committed by GitHub
parent 8c55063417
commit 9875521d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -719,7 +719,7 @@ impl LanguageModel for CloudLanguageModel {
fn stream_completion_with_usage( fn stream_completion_with_usage(
&self, &self,
mut request: LanguageModelRequest, request: LanguageModelRequest,
_cx: &AsyncApp, _cx: &AsyncApp,
) -> BoxFuture< ) -> BoxFuture<
'static, 'static,
@ -728,8 +728,8 @@ impl LanguageModel for CloudLanguageModel {
Option<RequestUsage>, Option<RequestUsage>,
)>, )>,
> { > {
let thread_id = request.prompt_id.take(); let thread_id = request.thread_id.clone();
let prompt_id = request.prompt_id.take(); let prompt_id = request.prompt_id.clone();
match &self.model { match &self.model {
CloudModel::Anthropic(model) => { CloudModel::Anthropic(model) => {
let request = into_anthropic( let request = into_anthropic(