ACP champagne (#35609)

cherry pick changes from #35510 onto latest main

Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Lukas Wirth <lukas@zed.dev>
This commit is contained in:
Ben Brandt 2025-08-06 11:01:06 +02:00 committed by GitHub
parent 69794db331
commit eb4b73b88e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 2361 additions and 67 deletions

View file

@ -4045,8 +4045,8 @@ fn main() {{
});
cx.run_until_parked();
fake_model.stream_last_completion_response("Brief");
fake_model.stream_last_completion_response(" Introduction");
fake_model.send_last_completion_stream_text_chunk("Brief");
fake_model.send_last_completion_stream_text_chunk(" Introduction");
fake_model.end_last_completion_stream();
cx.run_until_parked();
@ -4139,7 +4139,7 @@ fn main() {{
});
cx.run_until_parked();
fake_model.stream_last_completion_response("A successful summary");
fake_model.send_last_completion_stream_text_chunk("A successful summary");
fake_model.end_last_completion_stream();
cx.run_until_parked();
@ -4772,7 +4772,7 @@ fn main() {{
!pending.is_empty(),
"Should have a pending completion after retry"
);
fake_model.stream_completion_response(&pending[0], "Success!");
fake_model.send_completion_stream_text_chunk(&pending[0], "Success!");
fake_model.end_completion_stream(&pending[0]);
cx.run_until_parked();
@ -4940,7 +4940,7 @@ fn main() {{
// Check for pending completions and complete them
if let Some(pending) = inner_fake.pending_completions().first() {
inner_fake.stream_completion_response(pending, "Success!");
inner_fake.send_completion_stream_text_chunk(pending, "Success!");
inner_fake.end_completion_stream(pending);
}
cx.run_until_parked();
@ -5425,7 +5425,7 @@ fn main() {{
fn simulate_successful_response(fake_model: &FakeLanguageModel, cx: &mut TestAppContext) {
cx.run_until_parked();
fake_model.stream_last_completion_response("Assistant response");
fake_model.send_last_completion_stream_text_chunk("Assistant response");
fake_model.end_last_completion_stream();
cx.run_until_parked();
}