forked from robotlearner001/code-explainer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
227 lines (227 loc) · 7.11 KB
/
package.json
File metadata and controls
227 lines (227 loc) · 7.11 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
{
"name": "code-explainer",
"displayName": "Code Explainer",
"description": "Branch-aware code comprehension for VS Code.",
"version": "0.0.1",
"publisher": "charley",
"license": "MIT",
"engines": {
"vscode": "^1.90.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:codeExplainer.explainRepo",
"onCommand:codeExplainer.explainSelection",
"onCommand:codeExplainer.compareBranch",
"onCommand:codeExplainer.generatePrDescription",
"onCommand:codeExplainer.traceRelationships",
"onCommand:codeExplainer.drawFlowChart",
"onView:codeExplainer.sidebar"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "codeExplainer.explainRepo",
"title": "Code Explainer: Explain Repo"
},
{
"command": "codeExplainer.explainSelection",
"title": "Code Explainer: Explain Selection"
},
{
"command": "codeExplainer.compareBranch",
"title": "Code Explainer: Compare Branch with Main"
},
{
"command": "codeExplainer.traceRelationships",
"title": "Code Explainer: Trace Relationships"
},
{
"command": "codeExplainer.generatePrDescription",
"title": "Code Explainer: Generate PR Description"
},
{
"command": "codeExplainer.drawFlowChart",
"title": "Code Explainer: Draw Current Branch Diagram"
},
{
"command": "codeExplainer.refreshSidebar",
"title": "Code Explainer: Refresh Sidebar"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "codeExplainer",
"title": "Code Explainer",
"icon": "media/activity.svg"
}
]
},
"views": {
"codeExplainer": [
{
"id": "codeExplainer.sidebar",
"name": "Overview"
}
]
},
"menus": {
"editor/context": [
{
"command": "codeExplainer.explainSelection",
"group": "navigation@100"
},
{
"command": "codeExplainer.traceRelationships",
"group": "navigation@101"
},
{
"command": "codeExplainer.drawFlowChart",
"group": "navigation@102"
},
{
"command": "codeExplainer.generatePrDescription",
"group": "navigation@103"
}
],
"explorer/context": [
{
"command": "codeExplainer.explainRepo",
"group": "navigation@100"
},
{
"command": "codeExplainer.generatePrDescription",
"group": "navigation@101"
}
]
},
"configuration": {
"title": "Code Explainer",
"properties": {
"codeExplainer.provider": {
"type": "string",
"enum": [
"openai",
"anthropic"
],
"default": "openai",
"description": "The LLM provider used for analysis."
},
"codeExplainer.baseBranch": {
"type": "string",
"default": "main",
"description": "Default branch to compare against."
},
"codeExplainer.maxFilesInContext": {
"type": "number",
"default": 30,
"minimum": 5,
"description": "Maximum number of files to include when building repo context."
},
"codeExplainer.enableDiagrams": {
"type": "boolean",
"default": true,
"description": "Render custom flow-chart visualizations in the explanation panel when available."
},
"codeExplainer.prDescription.defaultStyle": {
"type": "string",
"default": "manager",
"description": "Default style id for generated PR descriptions. Built-in ids are business-stakeholder, code-collaborator, manager, and other, and you can also point this to a custom reusable style."
},
"codeExplainer.prDescription.defaultGuidelines": {
"type": "string",
"default": "",
"description": "Optional default team guidance or house rules to apply when generating PR descriptions."
},
"codeExplainer.prDescription.defaultTemplate": {
"type": "string",
"default": "",
"description": "Optional default markdown template or preferred section structure for generated PR descriptions."
},
"codeExplainer.prDescription.customStyles": {
"type": "array",
"default": [],
"description": "Reusable custom PR description styles with their own prompt, template, and optional guidelines.",
"items": {
"type": "object",
"required": [
"id",
"label",
"description"
],
"properties": {
"id": {
"type": "string",
"description": "Stable unique id for the style, used in settings and panel state."
},
"label": {
"type": "string",
"description": "Display name shown in the style picker."
},
"description": {
"type": "string",
"description": "Short helper text shown when choosing a style."
},
"prompt": {
"type": "string",
"description": "Audience/tone guidance to inject into PR generation."
},
"template": {
"type": "string",
"description": "Optional markdown structure to prefer for this style."
},
"guidelines": {
"type": "string",
"description": "Optional style-specific team rules or reminders."
}
}
}
},
"codeExplainer.openai.apiKey": {
"type": "string",
"default": "",
"markdownDescription": "OpenAI API key. Prefer moving this to SecretStorage in a later iteration."
},
"codeExplainer.openai.model": {
"type": "string",
"default": "gpt-4.1-mini",
"description": "OpenAI model name."
},
"codeExplainer.openai.baseUrl": {
"type": "string",
"default": "https://api.openai.com/v1",
"description": "Override the OpenAI-compatible base URL."
},
"codeExplainer.anthropic.apiKey": {
"type": "string",
"default": "",
"markdownDescription": "Anthropic API key. Prefer moving this to SecretStorage in a later iteration."
},
"codeExplainer.anthropic.model": {
"type": "string",
"default": "claude-3-7-sonnet-latest",
"description": "Anthropic model name."
},
"codeExplainer.anthropic.baseUrl": {
"type": "string",
"default": "https://api.anthropic.com/v1",
"description": "Override the Anthropic base URL."
}
}
}
},
"scripts": {
"build": "tsc -p ./",
"watch": "tsc -watch -p ./",
"lint": "eslint src --ext ts"
},
"devDependencies": {
"@types/node": "^20.14.9",
"@types/vscode": "^1.90.0",
"typescript": "^5.5.4"
}
}