Skip to content

Commit 120ae73

Browse files
authored
Merge pull request #22 from mnismt/feature/#21-support-gemini-models
#21 - Support Gemini models
2 parents c4863ab + 00e59ef commit 120ae73

30 files changed

+1953
-1162
lines changed

.eslintrc.json

+23-36
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,26 @@
11
{
2-
"root": true,
3-
"parser": "@typescript-eslint/parser",
4-
"parserOptions": {
5-
"ecmaVersion": 6,
6-
"sourceType": "module"
7-
},
8-
"extends": [
9-
"plugin:prettier/recommended"
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"extends": ["plugin:prettier/recommended"],
9+
"plugins": ["@typescript-eslint", "prettier"],
10+
"rules": {
11+
"@typescript-eslint/naming-convention": [
12+
"warn",
13+
{
14+
"selector": "import",
15+
"format": ["camelCase", "PascalCase"]
16+
}
1017
],
11-
"plugins": [
12-
"@typescript-eslint",
13-
"prettier"
14-
],
15-
"rules": {
16-
"@typescript-eslint/naming-convention": [
17-
"warn",
18-
{
19-
"selector": "import",
20-
"format": [
21-
"camelCase",
22-
"PascalCase"
23-
]
24-
}
25-
],
26-
"prettier/prettier": [
27-
"error",
28-
{
29-
"semi": false
30-
}
31-
]
32-
},
33-
"ignorePatterns": [
34-
"out",
35-
"dist",
36-
"**/*.d.ts",
37-
"src/webviews/**"
18+
"prettier/prettier": [
19+
"error",
20+
{
21+
"semi": false
22+
}
3823
]
39-
}
24+
},
25+
"ignorePatterns": ["out", "dist", "**/*.d.ts", "src/webviews/**"]
26+
}

.release-it.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
"addVersionUrl": false
2121
}
2222
}
23-
}
23+
}

.vscode-test.mjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { defineConfig } from '@vscode/test-cli';
1+
import { defineConfig } from '@vscode/test-cli'
22

33
export default defineConfig({
4-
files: 'out/**/__tests__/**/*.test.js',
5-
});
4+
files: 'out/**/__tests__/**/*.test.js'
5+
})

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [Unreleased]
44

5+
- Add Gemini provider
6+
- Modify OpenAI provider to OpenAI & OpenAI-compatible for better configuration
7+
- Refactor llm module
8+
- Improve tests
9+
510
## [0.3.2] - 2025-03-26
611

712
- New: Add Telemetry to track folder counts

package.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,26 @@
5959
"codyPlusPlus.llmProvider": {
6060
"type": "string",
6161
"enum": [
62-
"sourcegraph",
62+
"openai",
63+
"gemini",
6364
"openai-compatible"
6465
],
65-
"default": "sourcegraph",
66-
"description": "Select the LLM provider to use"
66+
"default": "openai",
67+
"description": "Select the LLM provider for Smart Add (OpenAI, Gemini, or OpenAI-Compatible)"
6768
},
6869
"codyPlusPlus.llmApiKey": {
6970
"type": "string",
70-
"description": "API key for the selected provider"
71+
"description": "API key for the selected provider (OpenAI, Gemini, or OpenAI-Compatible)"
7172
},
7273
"codyPlusPlus.openaiBaseUrl": {
7374
"type": "string",
74-
"description": "Base URL for OpenAI-compatible API providers",
75+
"description": "Base URL for \"openai-compatible\" provider ONLY (e.g., for local models or proxies)",
7576
"default": "https://api.openai.com/v1"
7677
},
7778
"codyPlusPlus.llmModel": {
7879
"type": "string",
7980
"description": "Model to use for LLM completions (defaults to provider-specific model if not set)",
80-
"markdownDescription": "Model to use for LLM completions:\n- For OpenAI: defaults to 'gpt-4o-mini'\n- For Sourcegraph: defaults to 'claude-3.5-sonnet'"
81+
"markdownDescription": "Model to use for LLM completions:\n- For OpenAI/OpenAI-Compatible: defaults to 'gpt-4o-mini'\n- For Gemini: defaults to 'gemini-1.5-flash'"
8182
}
8283
}
8384
},
@@ -222,7 +223,7 @@
222223
"pretest": "pnpm run compile-tests && pnpm run compile && pnpm run lint",
223224
"check-types": "tsc --noEmit",
224225
"lint": "eslint src --ext ts --ignore-pattern \"src/webviews/**\"",
225-
"test": "vscode-test",
226+
"test": "vscode-test .",
226227
"prepare": "husky"
227228
},
228229
"devDependencies": {

0 commit comments

Comments
 (0)