-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
450 lines (450 loc) · 22.3 KB
/
Copy pathpackage.json
File metadata and controls
450 lines (450 loc) · 22.3 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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
{
"name": "export2ai",
"displayName": "Export2AI",
"version": "1.2.9",
"description": "Create compact AI-ready zip archives from the current Cursor or VS Code workspace.",
"icon": "icons/icon-1254x1254.png",
"main": "./out/extension.js",
"type": "commonjs",
"publisher": "avnsx",
"author": "",
"license": "GPL-3.0-only",
"repository": {
"type": "git",
"url": "https://github.com/Avnsx/Export2AI"
},
"categories": [
"Other"
],
"keywords": [
"zip",
"archive",
"chatgpt",
"cursor",
"workspace",
"repository",
"ai"
],
"engines": {
"vscode": "^1.105.0"
},
"activationEvents": [
"onStartupFinished"
],
"contributes": {
"commands": [
{
"command": "export2ai.zipWorkspace",
"title": "Zip Current Workspace",
"category": "Export2AI",
"icon": "$(file-zip)"
},
{
"command": "export2ai.zipSelectedFolder",
"title": "Zip Folder",
"category": "Export2AI",
"icon": "$(file-zip)"
},
{
"command": "export2ai.openOutputFolder",
"title": "Open Last Zip",
"category": "Export2AI",
"icon": "$(folder-opened)"
},
{
"command": "export2ai.openSettings",
"title": "Settings",
"category": "Export2AI",
"icon": "$(settings-gear)"
},
{
"command": "export2ai.copyProjectStructure",
"title": "Copy Project Structure",
"category": "Export2AI",
"icon": "$(list-tree)"
},
{
"command": "export2ai.copyFileContent",
"title": "Export2AI: Copy Content to Clipboard",
"category": "Export2AI",
"icon": "$(copy)"
},
{
"command": "export2ai.showBuiltInExcludePatterns",
"title": "Manage Built-in Exclude Patterns",
"category": "Export2AI",
"icon": "$(list-unordered)"
}
],
"submenus": [
{
"id": "export2ai.submenu",
"label": "Export2AI",
"icon": "$(file-zip)"
}
],
"menus": {
"commandPalette": [
{
"command": "export2ai.zipWorkspace"
},
{
"command": "export2ai.zipSelectedFolder"
},
{
"command": "export2ai.openOutputFolder"
},
{
"command": "export2ai.openSettings"
},
{
"command": "export2ai.copyProjectStructure"
},
{
"command": "export2ai.copyFileContent",
"when": "false"
},
{
"command": "export2ai.showBuiltInExcludePatterns"
}
],
"explorer/context": [
{
"submenu": "export2ai.submenu",
"when": "explorerResourceIsFolder",
"group": "7_modification@50"
},
{
"command": "export2ai.copyFileContent",
"when": "!explorerResourceIsFolder && !explorerResourceIsRoot",
"group": "7_modification@51"
}
],
"export2ai.submenu": [],
"view/title": [
{
"submenu": "export2ai.submenu",
"when": "view == workbench.explorer.fileView",
"group": "navigation@90"
}
]
},
"configuration": [
{
"title": "Export2AI",
"order": 0,
"properties": {
"export2ai.extensionInfo": {
"type": "string",
"default": "Extension version v.1.2.9 · Last updated June 02, 2026",
"readOnly": true,
"order": -100
}
}
},
{
"title": "Token estimates",
"id": "tokenEstimates",
"order": 10,
"properties": {
"export2ai.enableTokenCounting": {
"type": "boolean",
"default": true,
"order": 0,
"description": "Estimate token usage and show counts in the Explorer menu, status bar, and zip notifications."
},
"export2ai.showExplorerTokenBadges": {
"type": "boolean",
"default": false,
"order": 1,
"description": "Opt in to compact token-estimate badges on Explorer folders. Default: off, so Cursor/VS Code Explorer stays clean; status bar and zip notifications still show estimates."
},
"export2ai.llmModel": {
"type": "string",
"default": "gpt-5.5",
"order": 2,
"description": "Target AI model for offline token estimates, menu labels, zip filenames, and the in-zip manifest.",
"markdownDescription": "Target AI model for **offline token estimates** when zipping or copying project structure. Export2AI picks a tokenizer from this name — nothing is sent to any API.\n\n**OpenAI (ChatGPT)** — exact offline count (no `~`). Names starting with `gpt-`, `o1`, `o3`, or `o4` work:\n- Modern: `gpt-5.5` *(default)*, `gpt-5.5-pro`, `gpt-5.4`, `gpt-4o`, `gpt-4.1`, `o3-mini`, `o4-mini`\n- Legacy: `gpt-4`, `gpt-3.5-turbo` *(uses a separate exact cl100k tokenizer)*\n\n**Anthropic (Claude)** — approximate count (shown with a `~` prefix). Any name starting with `claude` works:\n- **Opus 4.7+:** `claude-opus-4-8`, `claude-opus-4-7` — updated tokenizer (offline uplift on legacy baseline; dated IDs like `claude-opus-4-8-20260528` also match)\n- **Other Claude:** `claude-sonnet-4-6`, `claude-opus-4-6`, `claude-haiku-4-5` — legacy Claude tokenizer (~1–2% off)\n\n**Google, xAI, others** — rough `characters ÷ 4` estimate only (e.g. `gemini-2.5-pro`, `grok-3`). Exact tokenizers for these families are not bundled yet.\n\nUse the same model name you plan to paste or upload the zip into. Partial names match by prefix (e.g. `gpt-5.5-thinking` → o200k tokenizer)."
}
}
},
{
"title": "File collection",
"id": "fileCollection",
"order": 20,
"properties": {
"export2ai.ignoreGitIgnore": {
"type": "boolean",
"default": true,
"order": 0,
"description": "Merge workspace .gitignore rules into the exclude list when collecting files."
},
"export2ai.ignoreDotFiles": {
"type": "boolean",
"default": true,
"order": 1,
"description": "Skip files and folders whose names start with a dot (.)."
},
"export2ai.ignoreDollarFiles": {
"type": "boolean",
"default": true,
"order": 2,
"description": "Skip $* and **/$* paths (common temp-file patterns)."
},
"export2ai.softDeleteGitMetadata": {
"type": "boolean",
"default": true,
"order": 3,
"description": "Keep repository control files such as .github, .gitignore, and .gitattributes in exports while replacing unsafe local .git internals with a harmless marker outside .git by default.",
"markdownDescription": "Keep repository control files such as `.github/**`, `.gitignore`, `.gitattributes`, `.gitmodules`, `.mailmap`, `.gitkeep`, and `.git-blame-ignore-revs` in exports even when broad dot-file ignores are enabled.\n\nWhen enabled, Export2AI improves full-source validation compatibility by preserving CI workflows, Dependabot config, archive rules, and other repository files that tests may inspect. The unsafe local `.git` directory is still soft-deleted: Export2AI does **not** traverse it and, by default, writes `_EXPORT2AI_PLACEHOLDERS/git/EXPORT2AI_SOFT_DELETE_PLACEHOLDER.txt` outside `.git` so test suites that check `Path(\".git\").exists()` do not mistake the export for a real Git repository. Remotes, refs, branches, local history, hooks, object database, and credentials are not exported.\n\nUnreadable repository-control paths stay visible as `Export2AI Repository-Control Read Error` placeholders or `EXPORT2AI_READ_ERROR.txt` markers instead of silently disappearing.\n\nExplicit `excludePaths` entries still hard-exclude matching paths."
},
"export2ai.softDeleteGitMetadata.realGitPathPlaceholder": {
"type": "boolean",
"default": false,
"order": 4,
"description": "Advanced compatibility option. Write the .git placeholder at .git/EXPORT2AI_SOFT_DELETE_PLACEHOLDER.txt instead of outside .git. Default: false."
},
"export2ai.excludePatterns": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"order": 5,
"description": "Additional glob patterns to exclude. These are appended to the built-in safe defaults unless export2ai.useBuiltInExcludePatterns is disabled.",
"markdownDescription": "Additional glob patterns to exclude. These are appended to the built-in safe defaults unless `export2ai.useBuiltInExcludePatterns` is disabled.\n\nThis setting defaults to an empty array so the native Settings UI stays compact. Use it for project-specific extra excludes."
},
"export2ai.useBuiltInExcludePatterns": {
"type": "boolean",
"default": true,
"order": 6,
"description": "Use Export2AI's built-in safe default exclude patterns.",
"markdownDescription": "Use Export2AI's built-in safe default exclude patterns.\n\nBuilt-in preview (first 6 of 30):\n1. `node_modules`\n2. `*.log`\n3. `*.tmp`\n4. `*.temp`\n5. `*.bak`\n6. `dist`\n\nRun **Export2AI: Manage Built-in Exclude Patterns** from the Command Palette to edit the full built-in list as a checklist. Checked patterns stay excluded; unchecked patterns are written to `export2ai.disabledBuiltInExcludePatterns` and matching files are included again.\n\nThe native VS Code/Cursor Settings UI does not provide a custom inline expand/collapse control for extension-owned settings."
},
"export2ai.disabledBuiltInExcludePatterns": {
"type": "array",
"default": [],
"items": {
"type": "string",
"enum": [
"node_modules",
"*.log",
"*.tmp",
"*.temp",
"*.bak",
"dist",
"site",
"build",
"out",
".git",
"__pycache__",
".pytest_cache",
".cache",
".tmp",
"**/*.pem",
"**/*.key",
"**/*.p8",
"**/*.p12",
"**/*.pfx",
"**/id_rsa",
"**/id_dsa",
"**/id_ecdsa",
"**/id_ed25519",
"**/*.asc",
"**/*.gpg",
"**/.env",
"**/.env.*",
"out*.json",
"*-chatgpt-context-*.zip",
"*-*-context-*.zip"
]
},
"order": 7,
"description": "Built-in exclude patterns to disable so matching files can be included again.",
"markdownDescription": "Built-in exclude patterns to disable so matching files can be included again.\n\nPrefer the **Export2AI: Manage Built-in Exclude Patterns** Command Palette action for normal editing. This array is also intentionally editable: add one of the enum values here to disable that built-in exclude, or remove it to make the built-in exclude active again."
},
"export2ai.excludePaths": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"order": 8,
"description": "Workspace-relative paths to exclude entirely (folders or files)."
},
"export2ai.maxFileSize": {
"type": "number",
"default": 1048576,
"order": 9,
"description": "Maximum file size in bytes to include in the zip. Larger files become a placeholder entry. Default: 1 MB."
},
"export2ai.fileConcurrency": {
"type": "number",
"default": 4,
"minimum": 1,
"maximum": 32,
"order": 10,
"description": "Parallel file reads when scanning large folders (clamped 1–32 at runtime)."
}
}
},
{
"title": "Zip archive",
"id": "zipArchive",
"order": 30,
"properties": {
"export2ai.compressCode": {
"type": "boolean",
"default": false,
"order": 0,
"description": "Reduces exported source text for smaller context size, but may remove formatting, blank lines, or exact layout; keep it OFF when faithful full-code review matters.",
"markdownDescription": "Reduces exported source text for smaller context size, but may remove formatting, blank lines, or exact layout; keep it **OFF** when faithful full-code review matters.\n\n**Technical:** Trims trailing whitespace and collapses extra blank lines in text files before zipping (`FileProcessor.compressCodeContent`). Does not strip comments — use **Remove comments** for that."
},
"export2ai.compressionLevel": {
"type": "number",
"default": 9,
"minimum": 0,
"maximum": 9,
"order": 1,
"description": "Controls only how tightly the archive file is packed for upload size; it does not change code contents or reduce token usage after extraction, so level 9 is safest when upload size matters.",
"markdownDescription": "Controls only how tightly the archive file is packed for upload size; it does not change code contents or reduce token usage after extraction, so level **9** is safest when upload size matters.\n\n**Technical:** Zip compression level passed to the archiver zlib option. **0** = store/fastest; **9** = smallest archive file on disk."
},
"export2ai.includeManifest": {
"type": "boolean",
"default": true,
"order": 2,
"description": "Add _EXPORT2AI_MANIFEST.txt inside the archive (target model, options, file list summary)."
},
"export2ai.copyPathAfterCreate": {
"type": "boolean",
"default": true,
"order": 3,
"description": "Copy the new zip path to the clipboard after creation."
}
}
},
{
"title": "Comments",
"id": "comments",
"order": 40,
"properties": {
"export2ai.removeComments": {
"type": "boolean",
"default": false,
"order": 0,
"description": "Strips comments from exported files to save space, but removes rationale, warnings, edge-case explanations, and useful developer context; keep it OFF for debugging or agent handoff.",
"markdownDescription": "Strips comments from exported files to save space, but removes rationale, warnings, edge-case explanations, and useful developer context; keep it **OFF** for debugging or agent handoff.\n\nWhen enabled, Export2AI removes comments **per file extension** before adding source files to the zip.\n\nThe stripper is **string-aware**: line comments, block comments, and nested blocks are handled per syntax family. String literals, template literals, and shebang lines are preserved where possible.\n\n**18 syntax families** cover **175 extensions** (plus special names like `Dockerfile` and `Makefile`).\n\nPlain text, `.json`, `.md`, and unknown extensions are **not** modified.\n\nSee **Comment Strip Languages** below for the full per-family extension map."
},
"export2ai.commentStripLanguages": {
"type": "string",
"default": "18 syntax families · 175 file extensions (see description below for full map)",
"readOnly": true,
"order": 1,
"markdownDescription": "Read-only reference synced at build time from `commentProfiles.ts`. Export2AI picks a syntax family from the file extension (or special filename) and applies the matching comment rules when **Remove Comments** is on.\n\n**18 syntax families · 175 mapped extensions**\n\n| Comment syntax | Languages | Example extensions |\n|----------------|-----------|---------------------|\n| `//` · `/* */` | C, C++, C#, Java, JavaScript, TypeScript, Go, Rust, Swift, Kotlin, … (39) | `.c`, `.cc`, `.cjs`, `.cpp`, `.cs`, `.cu`, `.cuda`, `.cxx`, `.dart`, `.glsl`, +29 more |\n| `//` · `#` · `/* */` | PHP (6) | `.php`, `.php3`, `.php4`, `.php5`, `.phps`, `.phtml` |\n| `#` | Python, Ruby, Shell, Perl, YAML, TOML, Terraform, Dockerfile, … (61) | `.awk`, `.bash`, `.cfg`, `.clj`, `.cljc`, `.cljs`, `.cmake`, `.coffee`, `.conf`, `.containerfile`, +51 more |\n| `;` | Assembly (GAS/NASM-style) (3) | `.asm`, `.il`, `.s` |\n| `--` · `/* */` | SQL, MySQL, PostgreSQL, PL/SQL (9) | `.cql`, `.ddl`, `.dml`, `.eql`, `.mysql`, `.pgsql`, `.plsql`, `.psql`, `.sql` |\n| `<!-- -->` | HTML, XML, SVG, XAML, MSBuild project files (18) | `.csproj`, `.fsproj`, `.ftl`, `.htm`, `.html`, `.props`, `.svg`, `.targets`, `.vbproj`, `.vm`, +8 more |\n| `/* */` | CSS, SCSS, Sass, Less (5) | `.css`, `.less`, `.sass`, `.scss`, `.styl` |\n| `--` · `--[[ ]]` | Lua (1) | `.lua` |\n| `--` · `{- -}` | Haskell (2) | `.hs`, `.lhs` |\n| `(* *)` | OCaml, F#, Standard ML (9) | `.fs`, `.fsx`, `.fsxi`, `.fun`, `.ml`, `.mli`, `.mll`, `.mly`, `.sig` |\n| `'` | Visual Basic, VBScript (3) | `.bas`, `.vb`, `.vbs` |\n| `%` · `%{ %}` | MATLAB, Octave (2) | `.mat`, `.octave` |\n| `%` | Erlang (2) | `.erl`, `.hrl` |\n| `#` · `<# #>` | PowerShell (3) | `.ps1`, `.psd1`, `.psm1` |\n| `REM` · `::` (line start) | Windows Batch (.bat, .cmd) (2) | `.bat`, `.cmd` |\n| `;` | Lisp, Scheme, Racket (3) | `.lisp`, `.scm`, `.ss` |\n| `\"` | Vim script (1) | `.vim` |\n| `%` | LaTeX, TeX, BibTeX (6) | `.bbl`, `.bib`, `.cls`, `.latex`, `.sty`, `.tex` |\n\n**Also recognized (no dot extension):** `Dockerfile`, `Makefile`, `CMakeLists.txt`, `.env*`.\n\n**Never stripped:** `.json`, `.md`, plain text, binary files, and extensions not listed above.\n\n**Limitations:** nested strings, regex literals, and some edge-case encodings may still lose inner text; JSON-with-comments (`.jsonc`) uses the C-family profile.",
"description": "Supported comment syntax families and mapped file extensions (read-only; synced from build)."
}
}
},
{
"title": "Copy structure",
"id": "copyStructure",
"order": 50,
"properties": {
"export2ai.maxDepth": {
"type": "number",
"default": 5,
"order": 0,
"description": "Maximum folder depth when copying project structure to the clipboard."
},
"export2ai.outputFormat": {
"type": "string",
"enum": [
"plaintext",
"markdown",
"xml"
],
"default": "plaintext",
"order": 1,
"description": "Output format for the copied project tree."
}
}
},
{
"title": "Advanced",
"id": "advanced",
"order": 60,
"properties": {
"export2ai.debug": {
"type": "boolean",
"default": false,
"order": 0,
"description": "Log full Export2AI diagnostics to the Export2AI output channel and reveal it when debug mode turns on (View → Output). When off, routine debug entries are not written."
},
"export2ai.exclude": {
"type": "array",
"default": [],
"order": 90,
"deprecationMessage": "Use export2ai.excludePatterns instead.",
"description": "Deprecated. Use export2ai.excludePatterns."
},
"export2ai.outputFolder": {
"type": "string",
"default": ".",
"order": 91,
"deprecationMessage": "Ignored. Zips are always written to the workspace root.",
"description": "Deprecated. Zips are always created in the workspace root."
}
}
}
]
},
"scripts": {
"generate:menus": "node scripts/generate-all-menus.js",
"merge:package": "node scripts/merge-package.js",
"precompile": "npm run generate:menus",
"compile": "tsc -p ./",
"postcompile": "node scripts/sync-comment-settings.js && npm run merge:package",
"watch": "tsc -watch -p ./",
"package": "npm run compile && node scripts/package-vsix.js",
"vscode:prepublish": "node scripts/verify-build.js",
"slim:package": "node scripts/slim-package.js",
"release:notes": "node scripts/release-notes.js",
"test:live": "node scripts/live-test.js",
"test:explorer-badges": "node scripts/test-explorer-badges.js",
"test:tokens": "node scripts/test-token-format.js",
"test:soft-delete": "node scripts/test-soft-delete.js",
"test:debug-logger": "node scripts/test-debug-logger.js",
"test:comments": "node scripts/test-comment-strip.js",
"test:menu-merge": "node scripts/test-menu-merge.js",
"test:model-format": "node scripts/test-model-format.js",
"test:marketplace-assets": "node scripts/test-marketplace-assets.js",
"test:settings-nav": "node scripts/test-extension-settings.js",
"test:critical": "node tests/run-critical-tests.js",
"test:critical:list": "node tests/run-critical-tests.js --list",
"test:critical:compile": "node tests/run-critical-tests.js compile",
"test:critical:tokens": "node tests/run-critical-tests.js tokens",
"test:critical:soft-delete": "node tests/run-critical-tests.js soft-delete",
"test:critical:explorer-badges": "node tests/run-critical-tests.js explorer-badges",
"test:critical:debug-logger": "node tests/run-critical-tests.js debug-logger",
"test:critical:comments": "node tests/run-critical-tests.js comments",
"test:critical:model-format": "node tests/run-critical-tests.js model-format",
"test:critical:menu-merge": "node tests/run-critical-tests.js menu-merge",
"test:critical:settings-nav": "node tests/run-critical-tests.js settings-nav",
"test:critical:live": "node tests/run-critical-tests.js live",
"test:critical:package-assets": "node tests/run-critical-tests.js package-assets"
},
"dependencies": {
"@anthropic-ai/tokenizer": "^0.0.4",
"archiver": "^8.0.0",
"gpt-tokenizer": "^3.4.0",
"ignore": "^7.0.5",
"isbinaryfile": "^6.0.0"
},
"devDependencies": {
"@types/archiver": "^7.0.0",
"@types/node": "^25.9.1",
"@types/vscode": "^1.105.0",
"@vscode/vsce": "^3.9.1",
"typescript": "^6.0.3"
}
}