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

Commit 09e19fe

Browse files
committed
fix: type error
1 parent a6bf415 commit 09e19fe

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
@@ -173,7 +173,7 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
173173
// Create a new text part for the system instruction
174174
const systemPart = { text: systemInstruction }
175175
// Prepend it to the existing parts
176-
firstMessage.parts = [systemPart, ...firstMessage.parts]
176+
firstMessage.parts = [systemPart, ...(firstMessage.parts || [])]
177177
} else {
178178
// If no messages or first message is not user (e.g. starts with model),
179179
// prepend a new user message with the system instruction.

0 commit comments

Comments
 (0)