-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
294 lines (294 loc) · 8.54 KB
/
package.json
File metadata and controls
294 lines (294 loc) · 8.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
{
"name": "code-bridge",
"displayName": "CodeBridge — Universal AI Coding Co-pilot",
"description": "One extension, every AI model. Intelligent routing, cost tracking, and seamless multi-provider AI coding — without vendor lock-in.",
"version": "0.1.0",
"publisher": "codebridge-oss",
"license": "Apache-2.0",
"icon": "media/icon.png",
"repository": {
"type": "git",
"url": "https://github.com/saurabh-oss/code-bridge"
},
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Machine Learning",
"Programming Languages",
"Snippets",
"Other"
],
"keywords": [
"ai",
"copilot",
"openai",
"anthropic",
"claude",
"gpt",
"gemini",
"ollama",
"code completion",
"ai coding"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./out/extension.js",
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "code-bridge",
"title": "CodeBridge",
"icon": "media/sidebar-icon.svg"
}
]
},
"views": {
"code-bridge": [
{
"id": "codeBridge.costView",
"name": "Cost Dashboard"
}
]
},
"commands": [
{
"command": "codeBridge.openChat",
"title": "CodeBridge: Open Chat",
"icon": "$(comment-discussion)"
},
{
"command": "codeBridge.explainCode",
"title": "CodeBridge: Explain Selected Code"
},
{
"command": "codeBridge.refactorCode",
"title": "CodeBridge: Refactor Selected Code"
},
{
"command": "codeBridge.generateTests",
"title": "CodeBridge: Generate Tests for Selection"
},
{
"command": "codeBridge.reviewCode",
"title": "CodeBridge: Review Code"
},
{
"command": "codeBridge.addDocumentation",
"title": "CodeBridge: Add Documentation"
},
{
"command": "codeBridge.fixError",
"title": "CodeBridge: Fix This Error"
},
{
"command": "codeBridge.showCostDashboard",
"title": "CodeBridge: Show Cost Dashboard"
},
{
"command": "codeBridge.switchRoutingStrategy",
"title": "CodeBridge: Switch Routing Strategy"
},
{
"command": "codeBridge.runSetupWizard",
"title": "CodeBridge: Run Setup Wizard"
},
{
"command": "codeBridge.inlineComplete",
"title": "CodeBridge: Trigger Inline Completion"
}
],
"menus": {
"editor/context": [
{
"command": "codeBridge.explainCode",
"when": "editorHasSelection",
"group": "codeBridge@1"
},
{
"command": "codeBridge.refactorCode",
"when": "editorHasSelection",
"group": "codeBridge@2"
},
{
"command": "codeBridge.generateTests",
"when": "editorHasSelection",
"group": "codeBridge@3"
},
{
"command": "codeBridge.reviewCode",
"when": "editorHasSelection",
"group": "codeBridge@4"
},
{
"command": "codeBridge.addDocumentation",
"when": "editorHasSelection",
"group": "codeBridge@5"
}
]
},
"keybindings": [
{
"command": "codeBridge.openChat",
"key": "ctrl+shift+a",
"mac": "cmd+shift+a"
},
{
"command": "codeBridge.inlineComplete",
"key": "ctrl+shift+space",
"mac": "cmd+shift+space",
"when": "editorTextFocus"
},
{
"command": "codeBridge.explainCode",
"key": "ctrl+shift+e",
"mac": "cmd+shift+e",
"when": "editorHasSelection"
}
],
"configuration": {
"title": "CodeBridge",
"properties": {
"codeBridge.providers.anthropic.apiKey": {
"type": "string",
"default": "",
"description": "Anthropic API key for Claude models",
"order": 1
},
"codeBridge.providers.anthropic.enabled": {
"type": "boolean",
"default": false,
"description": "Enable Anthropic Claude provider",
"order": 2
},
"codeBridge.providers.openai.apiKey": {
"type": "string",
"default": "",
"description": "OpenAI API key for GPT models",
"order": 3
},
"codeBridge.providers.openai.enabled": {
"type": "boolean",
"default": false,
"description": "Enable OpenAI GPT provider",
"order": 4
},
"codeBridge.providers.openai.baseUrl": {
"type": "string",
"default": "https://api.openai.com/v1",
"description": "OpenAI-compatible API base URL (for Azure, LocalAI, LM Studio, etc.)",
"order": 5
},
"codeBridge.providers.google.apiKey": {
"type": "string",
"default": "",
"description": "Google AI API key for Gemini models",
"order": 6
},
"codeBridge.providers.google.enabled": {
"type": "boolean",
"default": false,
"description": "Enable Google Gemini provider",
"order": 7
},
"codeBridge.providers.ollama.enabled": {
"type": "boolean",
"default": false,
"description": "Enable Ollama (local models, free)",
"order": 8
},
"codeBridge.providers.ollama.baseUrl": {
"type": "string",
"default": "http://localhost:11434",
"description": "Ollama server URL",
"order": 9
},
"codeBridge.providers.ollama.model": {
"type": "string",
"default": "codellama",
"description": "Default Ollama model for code tasks",
"order": 10
},
"codeBridge.routing.strategy": {
"type": "string",
"enum": ["cost-optimized", "quality-first", "balanced", "local-first", "manual"],
"default": "balanced",
"description": "How CodeBridge picks the best model for each task",
"enumDescriptions": [
"Minimize cost — uses cheapest capable model for each task",
"Maximize quality — always routes to the most capable model",
"Balance cost and quality intelligently (recommended)",
"Prefer local/Ollama models, fall back to cloud when needed",
"Always ask which provider to use"
],
"order": 20
},
"codeBridge.routing.maxComplexityForCheapModel": {
"type": "number",
"default": 3,
"minimum": 1,
"maximum": 10,
"description": "Task complexity threshold (1-10). Below this → cheap/fast model. Above → powerful model.",
"order": 21
},
"codeBridge.cost.monthlyBudget": {
"type": "number",
"default": 0,
"description": "Monthly cost budget in USD (0 = unlimited)",
"order": 30
},
"codeBridge.cost.warningThreshold": {
"type": "number",
"default": 80,
"description": "Show warning when budget usage exceeds this percentage",
"order": 31
},
"codeBridge.completion.enabled": {
"type": "boolean",
"default": true,
"description": "Enable inline code completions",
"order": 40
},
"codeBridge.completion.debounceMs": {
"type": "number",
"default": 500,
"description": "Delay in ms before triggering completion after typing stops",
"order": 41
},
"codeBridge.general.contextLines": {
"type": "number",
"default": 50,
"description": "Number of surrounding lines sent as context",
"order": 50
},
"codeBridge.general.streamResponses": {
"type": "boolean",
"default": true,
"description": "Stream AI responses (shows tokens as they arrive)",
"order": 51
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js",
"package": "npx @vscode/vsce package",
"publish": "npx @vscode/vsce publish"
},
"devDependencies": {
"@types/node": "^20.11.0",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^8.56.0",
"typescript": "^5.3.0",
"@vscode/vsce": "^2.22.0"
},
"dependencies": {}
}