Skip to content

Commit 910e0d0

Browse files
committed
refactor(config): remove support for Google provider
1 parent b3bbb1c commit 910e0d0

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

src/config.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function hasOwn<T extends object, K extends PropertyKey>(
6262
export const configPath = path.join(os.homedir(), ".lazycommit");
6363

6464
export interface Config {
65-
provider: "openai" | "google";
65+
provider: "openai"; // Removed "google"
6666
API_KEY: string;
6767
model: string;
6868
templates: Record<string, string>;
@@ -236,11 +236,7 @@ export async function showConfigUI() {
236236
{
237237
label: "OpenAI",
238238
value: "openai",
239-
},
240-
{
241-
label: "Google",
242-
value: "google",
243-
},
239+
},
244240
],
245241
initialValue: config.provider,
246242
});
@@ -267,15 +263,11 @@ async function getModels() {
267263
throw new Error("API_KEY is not set");
268264
}
269265
if (provider === "openai") {
270-
271266
const oai = new OpenAI({
272267
apiKey,
273268
});
274-
275269
const models = await oai.models.list();
276270
return models.data.map((model) => model.id);
277-
} else if (provider === "google") {
278-
return ["gemini-1.5-flash", "gemini-1.5-pro", "gemini-1.5-pro-002", "gemini-1.5-flash-8b", "gemini-1.5-flash-002"];
279271
} else {
280272
throw new Error("Invalid provider");
281273
}

0 commit comments

Comments
 (0)