diff --git a/src/vs/platform/void/electron-main/llmMessage/gemini.ts b/src/vs/platform/void/electron-main/llmMessage/gemini.ts index 557d28c7..ee267e30 100644 --- a/src/vs/platform/void/electron-main/llmMessage/gemini.ts +++ b/src/vs/platform/void/electron-main/llmMessage/gemini.ts @@ -3,7 +3,7 @@ * Licensed under the Apache License, Version 2.0. See LICENSE.txt for more information. *--------------------------------------------------------------------------------------*/ -import { Content, GoogleGenerativeAI, GoogleGenerativeAIFetchError } from '@google/generative-ai'; +import { Content, GoogleGenerativeAI } from '@google/generative-ai'; import { _InternalSendLLMMessageFnType } from '../../common/llmMessageTypes.js'; // Gemini @@ -43,11 +43,6 @@ export const sendGeminiMsg: _InternalSendLLMMessageFnType = async ({ messages, o onFinalMessage({ fullText }); }) .catch((error) => { - if (error instanceof GoogleGenerativeAIFetchError && error.status === 400) { - onError({ message: 'Invalid API key.', fullError: null }); - } - else { - onError({ message: error + '', fullError: error }); - } + onError({ message: error + '', fullError: error }) }) } diff --git a/src/vs/workbench/contrib/void/browser/prompt/prompts.ts b/src/vs/workbench/contrib/void/browser/prompt/prompts.ts index a45bdf1c..1cc62878 100644 --- a/src/vs/workbench/contrib/void/browser/prompt/prompts.ts +++ b/src/vs/workbench/contrib/void/browser/prompt/prompts.ts @@ -277,7 +277,9 @@ Please finish writing the new file by applying the diff to the original file. Re +// this should probably be longer export const ctrlKStream_systemMessage = `\ +You are an AI assistant tasked with filling in the middle. `