-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
192 lines (192 loc) · 5.44 KB
/
package.json
File metadata and controls
192 lines (192 loc) · 5.44 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
{
"name": "ai-code-explanation",
"displayName": "AI Code Explanation",
"description": "AI-powered code explanation extension using Gemini API",
"version": "0.0.1",
"engines": {
"vscode": "^1.74.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onStartupFinished",
"onView:aiCodeExplanation"
],
"main": "./out/extension.js",
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "aiCodeExplanation",
"title": "AI Code Explanation",
"icon": "$(lightbulb)"
}
]
},
"views": {
"aiCodeExplanation": [
{
"type": "webview",
"id": "aiCodeExplanation",
"name": "Code Explanation",
"when": "true"
}
]
},
"viewsWelcome": [
{
"view": "aiCodeExplanation",
"contents": "Welcome to AI Code Explanation!\n[Set API Key](command:aiCodeExplanation.setApiKey)\n[Learn More](https://ai.google.dev/gemini-api/docs/api-key)"
}
],
"commands": [
{
"command": "aiCodeExplanation.setApiKey",
"title": "Set Gemini API Key",
"category": "AI Code Explanation"
},
{
"command": "aiCodeExplanation.focusView",
"title": "Focus AI Code Explanation View",
"category": "AI Code Explanation"
},
{
"command": "aiCodeExplanation.explainCode",
"title": "Explain Selected Code",
"category": "AI Code Explanation"
},
{
"command": "aiCodeExplanation.toggleHighlights",
"title": "Toggle Code Highlights",
"category": "AI Code Explanation"
},
{
"command": "aiCodeExplanation.clearHighlights",
"title": "Clear Code Highlights",
"category": "AI Code Explanation"
},
{
"command": "aiCodeExplanation.testConnection",
"title": "Test Gemini API Connection",
"category": "AI Code Explanation"
},
{
"command": "aiCodeExplanation.showOutput",
"title": "Show Output",
"category": "AI Code Explanation"
}
],
"configuration": {
"title": "AI Code Explanation",
"properties": {
"aiCodeExplanation.geminiApiKey": {
"type": "string",
"default": "",
"description": "Your Gemini API key for code explanations",
"scope": "application"
},
"aiCodeExplanation.model": {
"type": "string",
"default": "gemini-2.0-flash-001",
"description": "Gemini model to use for explanations"
},
"aiCodeExplanation.temperature": {
"type": "number",
"default": 0.3,
"minimum": 0,
"maximum": 1,
"description": "Temperature for AI responses (0 = deterministic, 1 = creative)"
},
"aiCodeExplanation.maxTokens": {
"type": "number",
"default": 1000,
"description": "Maximum tokens for AI responses"
},
"aiCodeExplanation.enableAutoExplanation": {
"type": "boolean",
"default": true,
"description": "Automatically explain code when selecting lines"
},
"aiCodeExplanation.debounceDelay": {
"type": "number",
"default": 500,
"minimum": 100,
"maximum": 2000,
"description": "Delay in milliseconds before processing code selection"
}
}
},
"keybindings": [
{
"command": "aiCodeExplanation.explainCode",
"key": "ctrl+shift+e",
"mac": "cmd+shift+e",
"when": "editorTextFocus"
},
{
"command": "aiCodeExplanation.toggleHighlights",
"key": "ctrl+shift+h",
"mac": "cmd+shift+h",
"when": "editorTextFocus"
}
],
"menus": {
"editor/context": [
{
"command": "aiCodeExplanation.explainCode",
"when": "editorHasSelection",
"group": "1_modification@1"
}
],
"commandPalette": [
{
"command": "aiCodeExplanation.explainCode",
"when": "editorIsOpen"
},
{
"command": "aiCodeExplanation.toggleHighlights",
"when": "editorIsOpen"
},
{
"command": "aiCodeExplanation.clearHighlights",
"when": "editorIsOpen"
}
]
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"watch:tsc": "tsc -watch -p ./",
"watch:esbuild": "echo 'esbuild not configured, using tsc watch instead' && npm run watch",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js",
"test:unit": "jest --testPathPattern=unit",
"test:integration": "jest --testPathPattern=integration",
"test:performance": "jest --testPathPattern=performance",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch"
},
"devDependencies": {
"@types/glob": "^8.0.0",
"@types/jest": "^29.2.4",
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@types/vscode": "^1.74.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"@vscode/test-electron": "^2.2.0",
"eslint": "^8.28.0",
"glob": "^8.0.3",
"jest": "^29.3.1",
"mocha": "^10.1.0",
"ts-jest": "^29.4.1",
"typescript": "^4.9.4"
},
"dependencies": {
"@google/genai": "^1.13.0"
}
}