agent: Fix system instructions typo (#28949)

See #28793, the name of the field is actually `systemInstruction` not
`systemInstructions`.

Release Notes:

- Fixed an issue where Gemini requests would fail
This commit is contained in:
Bennet Bo Fenner 2025-04-17 10:51:05 +02:00 committed by GitHub
parent 5ebb18c47e
commit ae47829fa8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -4,7 +4,7 @@ use credentials_provider::CredentialsProvider;
use editor::{Editor, EditorElement, EditorStyle};
use futures::{FutureExt, Stream, StreamExt, future::BoxFuture};
use google_ai::{
FunctionDeclaration, GenerateContentResponse, Part, SystemInstructions, UsageMetadata,
FunctionDeclaration, GenerateContentResponse, Part, SystemInstruction, UsageMetadata,
};
use gpui::{
AnyView, App, AsyncApp, Context, Entity, FontStyle, Subscription, Task, TextStyle, WhiteSpace,
@ -405,7 +405,7 @@ pub fn into_google(
.map_or(false, |msg| matches!(msg.role, Role::System))
{
let message = request.messages.remove(0);
Some(SystemInstructions {
Some(SystemInstruction {
parts: map_content(message.content),
})
} else {
@ -414,7 +414,7 @@ pub fn into_google(
google_ai::GenerateContentRequest {
model,
system_instructions,
system_instruction: system_instructions,
contents: request
.messages
.into_iter()