-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
262 lines (262 loc) · 7.58 KB
/
package.json
File metadata and controls
262 lines (262 loc) · 7.58 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
{
"name": "copy-for-ai",
"displayName": "Copy For AI",
"description": "複製程式碼為 AI 友善的 Markdown, XML, JSON 格式,並提供檔案/片段瀏覽器",
"version": "0.1.8",
"repository": {
"type": "git",
"url": "https://github.com/yulin0629/Copy-For-AI.git"
},
"engines": {
"vscode": "^1.74.0"
},
"categories": [
"Other",
"Snippets"
],
"activationEvents": [
"onView:copy-for-ai.contextExplorer"
],
"main": "./dist/extension.js",
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "copy-for-ai-explorer",
"title": "Copy For AI",
"icon": "media/icon.svg"
}
]
},
"views": {
"copy-for-ai-explorer": [
{
"id": "copy-for-ai.contextExplorer",
"name": "檔案與片段瀏覽器",
"type": "webview"
}
]
},
"commands": [
{
"command": "copy-for-ai.copyForAI",
"title": "Copy For AI",
"category": "Copy For AI"
},
{
"command": "copy-for-ai.copyForAIWithContext",
"title": "Copy For AI (With Context)",
"category": "Copy For AI"
},
{
"command": "copy-for-ai.openSettings",
"title": "設定",
"icon": "$(gear)",
"category": "Copy For AI"
},
{
"command": "copy-for-ai.addFileToExplorer",
"title": "Add File to Copy For AI Explorer",
"category": "Copy For AI"
},
{
"command": "copy-for-ai.addFolderToExplorer",
"title": "Add Folder to Copy For AI Explorer",
"category": "Copy For AI"
},
{
"command": "copy-for-ai.addEditorTabToExplorer",
"title": "Add Tab to Copy For AI Explorer",
"category": "Copy For AI"
},
{
"command": "copy-for-ai.addSnippetToExplorer",
"title": "Add Snippet to Copy For AI Explorer",
"category": "Copy For AI"
}
],
"menus": {
"view/title": [
{
"command": "copy-for-ai.openSettings",
"when": "view == copy-for-ai.contextExplorer",
"group": "navigation"
}
],
"explorer/context": [
{
"command": "copy-for-ai.addFileToExplorer",
"when": "!explorerResourceIsFolder",
"group": "copyForAI@1"
},
{
"command": "copy-for-ai.addFolderToExplorer",
"when": "explorerResourceIsFolder",
"group": "copyForAI@2"
}
],
"editor/title/context": [
{
"command": "copy-for-ai.addEditorTabToExplorer",
"group": "copyForAI@1"
}
],
"editor/context": [
{
"when": "editorHasSelection",
"command": "copy-for-ai.copyForAI",
"group": "copyForAI@1"
},
{
"when": "editorHasSelection",
"command": "copy-for-ai.copyForAIWithContext",
"group": "copyForAI@2"
},
{
"when": "editorHasSelection",
"command": "copy-for-ai.addSnippetToExplorer",
"group": "copyForAI@3"
}
],
"commandPalette": [
{
"command": "copy-for-ai.copyForAI",
"when": "editorHasSelection"
},
{
"command": "copy-for-ai.copyForAIWithContext",
"when": "editorHasSelection"
},
{
"command": "copy-for-ai.addSnippetToExplorer",
"when": "editorHasSelection"
}
]
},
"keybindings": [
{
"command": "copy-for-ai.copyForAI",
"key": "ctrl+alt+c",
"mac": "cmd+alt+c",
"when": "editorHasSelection"
},
{
"command": "copy-for-ai.copyForAIWithContext",
"key": "ctrl+alt+shift+c",
"mac": "cmd+alt+shift+c",
"when": "editorHasSelection"
}
],
"configuration": {
"title": "Copy For AI",
"properties": {
"copyForAI.includeStructureInfo": {
"type": "boolean",
"default": true,
"description": "是否包含程式碼結構資訊 (用於 'Copy For AI (With Context)' 和添加片段)"
},
"copyForAI.includeRelatedImports": {
"type": "boolean",
"default": true,
"description": "是否包含相關的引用/匯入語句 (用於 'Copy For AI (With Context)' 和添加片段)"
},
"copyForAI.outputFormat": {
"type": "string",
"enum": [
"markdown",
"xml",
"json",
"custom"
],
"default": "markdown",
"description": "複製時的輸出格式 (適用於上下文複製和 Explorer 複製)"
},
"copyForAI.customFormatBefore": {
"type": "string",
"default": "===== CODE CONTEXT START =====",
"description": "自訂格式的開始標記"
},
"copyForAI.customFormatAfter": {
"type": "string",
"default": "===== CODE CONTEXT END =====",
"description": "自訂格式的結束標記"
},
"copyForAI.includeComments": {
"type": "boolean",
"default": true,
"description": "是否包含程式碼中的註解 (用於上下文複製和添加片段)"
},
"copyForAI.tokenLimit": {
"type": "number",
"default": 0,
"description": "預設 token 上限(0 表示無上限)。設定後會在 Explorer 中顯示 token 百分比及進度條。"
},
"copyForAI.contextExplorer.excludePatterns": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"**/node_modules/**",
"**/.git/**",
"**/dist/**",
"**/build/**",
"**/bin/**",
"**/obj/**",
"**/*.log"
],
"description": "檔案瀏覽器中要排除的檔案模式。支援 glob 模式。",
"scope": "resource"
},
"copyForAI.contextExplorer.followGitignore": {
"type": "boolean",
"default": true,
"description": "是否遵循 .gitignore 檔案中定義的排除規則",
"scope": "resource"
}
}
},
"iconThemes": [
{
"id": "copy-for-ai-icons",
"label": "Copy For AI Icons",
"path": "./media/icon.svg"
}
],
"icon": "media/icon.svg"
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "npm run check-types && npm run lint && node esbuild.js",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"package": "npm run check-types && npm run lint && node esbuild.js --production",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "npm run compile-tests && npm run compile && npm run lint",
"check-types": "tsc --noEmit",
"lint": "eslint src/**/*.ts media/**/*.js",
"test": "vscode-test"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@types/strip-comments": "^2.0.4",
"@types/vscode": "^1.74.0",
"@typescript-eslint/eslint-plugin": "^8.22.0",
"@typescript-eslint/parser": "^8.22.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"esbuild": "^0.24.2",
"esbuild-plugin-copy": "^2.1.1",
"eslint": "^9.19.0",
"npm-run-all": "^4.1.5",
"typescript": "^5.7.3"
},
"dependencies": {
"ignore": "^5.3.2",
"jschardet": "^3.1.4",
"strip-comments": "^2.0.1"
}
}