-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpackage.json
More file actions
387 lines (387 loc) · 13.6 KB
/
package.json
File metadata and controls
387 lines (387 loc) · 13.6 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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
{
"name": "deep-copilot",
"displayName": "Deep Copilot",
"description": "Deep Copilot — AI coding agent embedded in VS Code. Powered by DeepSeek V4, with file editing, terminal, search, and plan/todos. Standalone, no backend required.",
"version": "0.41.6",
"publisher": "ZhouChaunge",
"icon": "imgs/logo.png",
"repository": {
"type": "git",
"url": "https://github.com/ZhouChaunge/DeepCopilot"
},
"engines": {
"vscode": "^1.95.0"
},
"categories": [
"AI",
"Other"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./out/extension.js",
"contributes": {
"chatParticipants": [
{
"id": "deepseek-agent.deepseek",
"name": "deepseek",
"fullName": "Deep Copilot",
"description": "Deep Copilot V4 agent (file read/write / search / shell)",
"isSticky": true,
"commands": [
{
"name": "clear",
"description": "Clear session context"
},
{
"name": "doctor",
"description": "Check backend / API key status"
}
]
}
],
"viewsContainers": {
"activitybar": [
{
"id": "deepseek-sidebar",
"title": "Deep Copilot",
"icon": "imgs/icon-aux.svg"
}
]
},
"views": {
"deepseek-sidebar": [
{
"type": "webview",
"id": "deepseek.chatView",
"name": "Chat"
}
]
},
"commands": [
{
"command": "deepseekAgent.open",
"title": "Deep Copilot: Open Sidebar",
"icon": "$(robot)"
},
{
"command": "deepseekAgent.openInTab",
"title": "Deep Copilot: Open in Tab",
"icon": "$(comment-discussion)"
},
{
"command": "deepseekAgent.openTerminal",
"title": "Deep Copilot: Open TUI in Terminal",
"icon": "$(terminal)"
},
{
"command": "deepseekAgent.moveToRight",
"title": "Deep Copilot: Move to Secondary Side Bar",
"icon": "$(layout-sidebar-right)"
},
{
"command": "deepseekAgent.setApiKey",
"title": "Deep Copilot: Set API Key (SecretStorage)",
"icon": "$(key)"
},
{
"command": "deepseekAgent.setBaseUrl",
"title": "Deep Copilot: Switch API Base URL",
"icon": "$(globe)"
},
{
"command": "deepseekAgent.setTavilyKey",
"title": "Deep Copilot: Set Tavily API Key (Web Search)",
"icon": "$(search)"
},
{
"command": "deepseekAgent.restartServer",
"title": "Deep Copilot: Restart Backend",
"icon": "$(refresh)"
},
{
"command": "deepseekAgent.showApiStatus",
"title": "Deep Copilot: API Status / Config",
"icon": "$(info)"
},
{
"command": "deepseekAgent.openDebugLog",
"title": "Deep Copilot: Open Debug Log",
"icon": "$(output)"
},
{
"command": "deepseekAgent.attachSelection",
"title": "附加到 Deep Copilot",
"icon": "$(link)"
},
{
"command": "deepseekAgent.attachFolder",
"title": "附加到 Deep Copilot",
"icon": "$(folder-opened)"
}
],
"configuration": {
"title": "Deep Copilot",
"properties": {
"deepseekAgent.serverExecutablePath": {
"type": "string",
"default": "",
"description": "Path to deepseek-app-server executable. Leave empty — Deep Copilot is standalone and does not need a backend."
},
"deepseekAgent.serverPort": {
"type": "number",
"default": 8787,
"description": "API server port (unused in standalone mode)."
},
"deepseekAgent.apiBaseUrl": {
"type": "string",
"default": "",
"description": "AI provider Base URL. Leave empty to use the provider's default endpoint."
},
"deepseekAgent.provider": {
"type": "string",
"default": "deepseek",
"enum": [
"deepseek",
"openai",
"anthropic",
"custom"
],
"enumDescriptions": [
"DeepSeek — api.deepseek.com",
"OpenAI — api.openai.com/v1",
"Anthropic — api.anthropic.com (Claude models, native SDK)",
"Custom — use the Base URL configured above"
],
"description": "AI provider. Selecting a preset auto-fills the Base URL in the settings UI."
},
"deepseekAgent.providersDir": {
"type": "string",
"default": "",
"description": "Optional absolute path to a directory containing additional provider JSON files (same schema as the built-in ones in src/providers/). Files here override built-in providers with the same id, letting you add new vendors or replace model lists without rebuilding the extension. Reload the window after editing."
},
"deepseekAgent.defaultModel": {
"type": "string",
"default": "deepseek-v4-pro",
"enum": [
"deepseek-v4-pro",
"deepseek-v4-flash",
"deepseek-chat",
"deepseek-reasoner"
],
"enumDescriptions": [
"V4 Pro — strongest, ¥3/¥6 per 1M tokens (2.5折至 2026-05-31,原价 ¥12/¥24)",
"V4 Flash — fast & cheap, ¥1/¥2 per 1M tokens",
"Compat alias (= v4-flash, non-thinking)",
"Compat alias (= v4-flash, thinking mode)"
],
"description": "Default DeepSeek model."
},
"deepseekAgent.subAgentModel": {
"type": "string",
"default": "deepseek-v4-flash",
"enum": [
"deepseek-v4-flash",
"deepseek-v4-pro",
"deepseek-chat",
"deepseek-reasoner"
],
"enumDescriptions": [
"V4 Flash — fast & cheap (recommended for sub-agents)",
"V4 Pro — same as parent; slower and may hit rate limits when parallel",
"Compat alias (= v4-flash, non-thinking)",
"Compat alias (= v4-flash, thinking mode)"
],
"description": "Model used by spawn_agent sub-agents. Defaults to v4-flash so parallel sub-agents don't exhaust the Pro/R1 rate limit quota."
},
"deepseekAgent.approvalMode": {
"type": "string",
"default": "manual",
"enum": [
"manual",
"auto-edit",
"autopilot",
"readonly"
],
"enumDescriptions": [
"Manual — approve write_file / run_shell each time (safest, default)",
"Auto-Edit — auto-approve file writes, prompt for shell commands",
"Autopilot — auto-approve everything (use with caution)",
"Read-Only — deny all write/shell tools"
],
"description": "Tool approval policy for write_file / run_shell."
},
"deepseekAgent.autoApproveTools": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Tool names to always auto-approve (overrides approvalMode), e.g. [\"write_file\"]"
},
"deepseekAgent.denyTools": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Tool names to always deny (overrides approvalMode), e.g. [\"run_shell\"]"
},
"deepseekAgent.includeMcpTools": {
"type": "boolean",
"default": true,
"description": "Include MCP tools in every request. Disable to save prompt tokens when MCP tools are not needed for the current session."
},
"deepseekAgent.shellExecutionMode": {
"type": "string",
"default": "silent",
"enum": [
"silent",
"terminal"
],
"enumDescriptions": [
"Silent — run_shell 在隐藏的子进程中静默执行命令,输出仅回传给模型(默认,速度最快)。",
"Terminal — run_shell 在 VS Code 集成终端中可见地执行命令,用户可以实时看到完整输出。"
],
"description": "run_shell 工具的默认执行方式。silent = 后台静默执行;terminal = 在 VS Code 集成终端中执行(用户可见)。可被工具调用的 in_terminal 参数覆盖。"
},
"deepseekAgent.enableDebugLog": {
"type": "boolean",
"default": true,
"description": "记录每次请求的思维链 / 工具调用 / API 事件到 .deep-copilot/logs/ 与 Output 面板,便于排查卡住的问题。"
},
"deepseekAgent.contextRefs.terminalUseClipboard": {
"type": "boolean",
"default": false,
"description": "允许 #terminal 通过系统剪贴板捕获终端选区(会临时覆盖剪贴板内容;非文本剪贴板可能丢失)。默认关闭。"
},
"deepseekAgent.terminal.captureHistory": {
"type": "boolean",
"default": true,
"description": "允许 read_terminal 工具读取你的集成终端最近输出。开启后,扩展会在内存中保留每个终端最近 20 条命令的输出(每条上限 64KB,不落盘,VS Code 关闭后即清空)。需要 Shell Integration(bash/zsh/fish/pwsh 默认启用;cmd.exe 不支持)。"
},
"deepseekAgent.maxIterations": {
"type": "number",
"default": 0,
"minimum": 0,
"maximum": 200,
"description": "Max tool-call iterations per send. 0 (default) = unlimited — the agent runs until the task is done, guarded by stagnation detection. Set a positive number (e.g. 20) only to cap API cost on simple tasks."
},
"deepseekAgent.compactBudgetTokens": {
"type": "number",
"default": 96000,
"minimum": 8000,
"description": "Approximate token budget before older tool results are auto-compacted to fit the model context window."
},
"deepseekAgent.postEditDiagnostics": {
"type": "boolean",
"default": true,
"description": "After each successful write_file / str_replace_in_file / apply_patch, append VS Code language-server diagnostics (errors + warnings) to the tool result so the model self-verifies before reporting success."
},
"deepseekAgent.interactionMode": {
"type": "string",
"default": "agent",
"enum": [
"agent",
"plan"
],
"enumDescriptions": [
"Agent — model can autonomously call tools (file reads, edits, shell, etc.). Recommended for coding tasks.",
"Plan — model can only use read-only tools to explore and produce a plan. All write/shell tools are blocked. Switch to Agent mode to execute the plan."
],
"description": "Interaction mode. Agent: full tool access. Plan: read-only exploration + plan generation, no writes or shell commands."
},
"deepCopilot.inlineCompletion.enable": {
"type": "boolean",
"default": false,
"description": "Enable DeepSeek FIM-powered inline (ghost-text) completions in the editor. Off by default — turn on after configuring your API key."
},
"deepCopilot.inlineCompletion.debounceMs": {
"type": "number",
"default": 300,
"minimum": 0,
"maximum": 2000,
"description": "Idle delay (ms) after the last keystroke before requesting an inline completion. Lower = snappier but more API calls."
}
}
},
"keybindings": [
{
"command": "deepseekAgent.open",
"key": "ctrl+shift+d",
"mac": "cmd+shift+d"
},
{
"command": "deepseekAgent.openInTab",
"key": "ctrl+shift+l",
"mac": "cmd+shift+l"
}
],
"menus": {
"commandPalette": [
{
"command": "deepseekAgent.open"
},
{
"command": "deepseekAgent.openInTab"
},
{
"command": "deepseekAgent.openTerminal"
},
{
"command": "deepseekAgent.moveToRight"
},
{
"command": "deepseekAgent.attachSelection"
}
],
"editor/context": [
{
"command": "deepseekAgent.attachSelection",
"group": "deepcopilot@1",
"when": "editorTextFocus"
}
],
"explorer/context": [
{
"command": "deepseekAgent.attachFolder",
"group": "deepcopilot@1",
"when": "explorerResourceIsFolder && !explorerResourceIsRoot"
},
{
"command": "deepseekAgent.attachFolder",
"group": "deepcopilot@1",
"when": "!explorerResourceIsFolder"
}
]
}
},
"scripts": {
"build": "node esbuild.config.js",
"watch": "node esbuild.config.js --watch",
"package": "npm run build && vsce package --out release/",
"publish": "npm run build && vsce publish",
"vscode:prepublish": "npm run build",
"lint": "eslint src/",
"test": "node scripts/test-orphan-toolcalls.js"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.98.0",
"js-tiktoken": "^1.0.21",
"openai": "^6.38.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@types/vscode": "^1.95.0",
"@vscode/codicons": "^0.0.45",
"@vscode/vsce": "^2.24.0",
"danger": "^13.0.7",
"dompurify": "^3.4.2",
"esbuild": "^0.28.0",
"eslint": "^8.57.0",
"katex": "^0.16.45"
},
"overrides": {
"qs": "^6.15.2"
}
}