Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 6c5ebbc

Browse files
committed
fix: type error
1 parent dd3e683 commit 6c5ebbc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/api/providers/gemini.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
174174
// Create a new text part for the system instruction
175175
const systemPart = { text: systemInstruction }
176176
// Prepend it to the existing parts
177-
firstMessage.parts = [systemPart, ...firstMessage.parts]
177+
firstMessage.parts = [systemPart, ...(firstMessage.parts || [])]
178178
} else {
179179
// If no messages or first message is not user (e.g. starts with model),
180180
// prepend a new user message with the system instruction.

0 commit comments

Comments
 (0)