-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.json
227 lines (227 loc) · 7.77 KB
/
package.json
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": "codepal-vscode",
"publisher": "MickeyMGK",
"displayName": "CodePal VSCode",
"icon": "assets/icon.png",
"description": "CodePal, a free AI code completion assistant, powered by DeepSeek Coder Model and Cloudflare.",
"homepage": "https://github.com/mickeymgk/codepal/#",
"repository": "https://github.com/mickeymgk/codepal",
"bugs": "https://github.com/mickeymgk/codepal/issues",
"license": "Unlicense",
"version": "0.1.2",
"keywords": [
"ai",
"autocomplete",
"code completion",
"copilot",
"intellisense",
"intellicode",
"snippets",
"codepal"
],
"engines": {
"vscode": "^1.82.0"
},
"categories": [
"Programming Languages",
"Machine Learning",
"Other"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/node/extension.js",
"browser": "./dist/web/extension.js",
"contributes": {
"commands": [
{
"command": "codepal-vscode.refreshChat",
"title": "Refresh",
"icon": "$(refresh)"
},
{
"command": "codepal-vscode.toggleInlineCompletionTriggerMode",
"title": "codepal: Toggle Code Completion Trigger Mode (Automatic/Manual)"
},
{
"command": "codepal-vscode.inlineCompletion.trigger",
"title": "codepal: Trigger Code Completion Manually"
},
{
"command": "codepal-vscode.setApiToken",
"title": "codepal: Set API Token"
},
{
"command": "codepal-vscode.openSettings",
"title": "codepal: Open Settings"
},
{
"command": "codepal-vscode.gettingStarted",
"title": "codepal: Getting Started"
},
{
"command": "codepal-vscode.openOnlineHelp",
"title": "codepal: Online Help"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "codepal-vscode",
"title": "CodePal",
"icon": "$(comments-view-icon)"
}
]
},
"views": {
"codepal-vscode": [
{
"type": "webview",
"id": "codepal-vscode.chatView",
"name": "Chat",
"onView": [
{
"id": "codepal-vscode.refreshView",
"label": "Refresh",
"command": "codepal-vscode.refreshChat"
}
]
}
]
},
"menus": {
"view/title": [
{
"command": "codepal-vscode.refreshChat",
"when": "view == codepal-vscode.chatView",
"group": "navigation"
}
],
"commandPalette": [
{
"command": "codepal-vscode.inlineCompletion.trigger",
"when": "config.codepal-vscode.inlineCompletion.triggerMode === 'manual' && !editorHasSelection && !inlineSuggestionsVisible"
}
]
},
"walkthroughs": [
{
"id": "gettingStarted",
"title": "Getting Started with CodePal",
"description": "Set up your own AI coding assistant powered by DeepSeek Coder Model & Cloudflare, all for free.",
"steps": [
{
"id": "getAClouflareAccount",
"title": "Sign up for Cloudflare account",
"description": "The CodepPal VSCode extension requires a Cloudflare account to work. \n[Sign up](command:codepal-vscode.openSignUpPage)",
"media": {
"markdown": "assets/walkthroughs/introduction.md"
}
},
{
"id": "getAccountId",
"title": "Specify your Cloudflare account ID",
"description": "Once you've signed up for an account, head to Workers & Pages > Overview > Account details > Account ID, copy your Account ID and paste it here. \n[Specify Account ID](command:codepal-vscode.setAccountId)",
"media": {
"markdown": "assets/walkthroughs/setAccountId.md"
}
},
{
"id": "getApiToken",
"title": "Specify your Cloudflare API token",
"description": "Generate an API token. \n[Specify API Token](command:codepal-vscode.setApiToken)",
"media": {
"markdown": "assets/walkthroughs/setApiToken.md"
}
},
{
"id": "codeCompletion",
"title": "Code Completion",
"description": "CodePal provides inline suggestions automatically by default, and you can accept suggestions by just pressing the Tab key.",
"media": {
"markdown": "assets/walkthroughs/codeCompletion.md"
}
}
]
}
],
"configuration": {
"title": "codepal-vscode",
"properties": {
"codepal-vscode.api.CloudflareAccountID": {
"type": "string",
"default": "",
"pattern": "^[a-zA-Z0-9]{32}$",
"patternErrorMessage": "Please enter a vaild account ID.",
"markdownDescription": "Enter your Cloudflare Account ID. You can obtain one from [here](https://dash.cloudflare.com/sign-up/workers-and-pages)."
},
"codepal-vscode.api.CloudflareApiToken": {
"type": "string",
"default": "",
"pattern": "^[a-zA-Z0-9\\S]{40}$",
"patternErrorMessage": "Please enter a valid API Token.",
"markdownDescription": "Enter you Clouflare Workers AI API Token. You can generate a new token from [here](https://dash.cloudflare.com/profile/api-tokens)."
},
"codepal-vscode.inlineCompletion.triggerMode": {
"type": "string",
"enum": [
"automatic",
"manual"
],
"default": "automatic",
"description": "Select the code completion trigger mode.",
"enumDescriptions": [
"Automatic trigger when you stop typing",
"Use `Alt+\\` shortcut to trigger completion, prevents quota overuse."
]
}
}
},
"keybindings": [
{
"key": "alt+\\",
"command": "codepal-vscode.triggerInlineCompletion",
"when": "config.codepal-vscode.inlineCompletion.triggerMode === 'manual' && editorTextFocus && !editorHasSelection && !inlineSuggestionsVisible"
},
{
"command": "codepal-vscode.inlineCompletion.accept",
"key": "tab",
"when": "config.codepal-vscode.keybindings === 'vscode-style' && inlineSuggestionVisible && !editorReadonly && !suggestWidgetVisible && !editorHoverFocused && !editorTabMovesFocus && inlineSuggestionHasIndentationLessThanTabSize"
}
]
},
"scripts": {
"build": "tsc --noEmit && tsup --minify --treeshake smallest",
"watch": "tsup --sourcemap --watch ./ --ignore-watch ./dist --ignore-watch ./.vscode-test-web --watch ../codepal-agent/dist",
"dev": "code --extensionDevelopmentPath=$PWD --disable-extensions && pnpm watch",
"dev:browser": "vscode-test-web --extensionDevelopmentPath=$PWD --browserType=chromium --port=3000 && pnpm watch",
"lint": "eslint --fix --ext .ts ./src && prettier --write .",
"lint:check": "eslint --ext .ts ./src && prettier --check .",
"vscode:prepackage": "pnpm build",
"vscode:package": "vsce package --no-dependencies",
"vscode:prepublish": "pnpm build",
"vscode:publish": "vsce publish --no-dependencies"
},
"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/node": "18.x",
"@types/node-fetch": "^2.6.11",
"@types/vscode": "^1.82.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@vscode/test-electron": "^2.1.5",
"@vscode/test-web": "^0.0.44",
"@vscode/vsce": "^2.15.0",
"assert": "^2.0.0",
"esbuild-plugin-copy": "^2.1.1",
"esbuild-plugin-polyfill-node": "^0.3.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
"prettier": "^3.0.0",
"tsup": "^7.2.0",
"typescript": "^5.3.2"
},
"dependencies": {
"node-fetch": "^2.7.0"
}
}