-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
305 lines (305 loc) · 9.22 KB
/
Copy pathpackage.json
File metadata and controls
305 lines (305 loc) · 9.22 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
{
"name": "clipshot",
"displayName": "ClipShot",
"description": "Paste clipboard images with automatic file saving - perfect for AI chat and documentation",
"version": "0.9.0",
"publisher": "kkdev92",
"author": {
"name": "kkdev92",
"url": "https://kkdev92.dev/"
},
"license": "MIT",
"homepage": "https://kkdev92.dev/",
"repository": {
"type": "git",
"url": "https://github.com/kkdev92/clipshot"
},
"bugs": {
"url": "https://github.com/kkdev92/clipshot/issues"
},
"engines": {
"node": ">=22.12.0",
"vscode": "^1.138.0"
},
"categories": [
"AI",
"Other"
],
"keywords": [
"image",
"paste",
"clipboard",
"screenshot",
"ai",
"markdown"
],
"icon": "images/icon.png",
"galleryBanner": {
"color": "#1e1e1e",
"theme": "dark"
},
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "clipshot.pasteImage",
"title": "ClipShot: Paste Image"
},
{
"command": "clipshot.enableInTerminal",
"title": "ClipShot: Enable Shortcut in Integrated Terminal"
}
],
"keybindings": [
{
"command": "clipshot.pasteImage",
"key": "ctrl+shift+v",
"mac": "cmd+shift+v"
},
{
"command": "clipshot.pasteImage",
"key": "ctrl+shift+v",
"mac": "cmd+shift+v",
"when": "terminalFocus",
"args": {
"surface": "terminal"
}
}
],
"configuration": {
"title": "ClipShot",
"properties": {
"clipshot.enabled": {
"type": "boolean",
"default": true,
"description": "Enable or disable the extension"
},
"clipshot.logLevel": {
"type": "string",
"default": "info",
"enum": [
"trace",
"debug",
"info",
"warn",
"error",
"silent"
],
"description": "Log level for the extension"
},
"clipshot.saveDirectory": {
"type": "string",
"default": ".clipshot",
"description": "Directory to save images (relative to workspace root)"
},
"clipshot.fileName.pattern": {
"type": "string",
"default": "image_${yyyy}${MM}${dd}_${HH}${mm}${ss}_${seq3}",
"description": "File name pattern for saved images"
},
"clipshot.fileName.sequenceDigits": {
"type": "integer",
"default": 3,
"minimum": 1,
"maximum": 6,
"description": "Number of digits for sequence number"
},
"clipshot.output.format": {
"type": "string",
"default": "png",
"enum": [
"png",
"jpeg",
"webp"
],
"description": "Output image format"
},
"clipshot.output.jpegQuality": {
"type": "integer",
"default": 80,
"minimum": 1,
"maximum": 100,
"description": "JPEG quality (1-100)"
},
"clipshot.output.webpQuality": {
"type": "integer",
"default": 80,
"minimum": 1,
"maximum": 100,
"description": "WebP quality (1-100)"
},
"clipshot.resize.mode": {
"type": "string",
"default": "off",
"enum": [
"off",
"fit"
],
"enumDescriptions": [
"No resizing - save images at original size",
"Resize images to fit within maxWidth/maxHeight while maintaining aspect ratio"
],
"description": "Image resize mode"
},
"clipshot.resize.maxWidth": {
"type": [
"integer",
"null"
],
"default": 1200,
"minimum": 1,
"maximum": 16384,
"description": "Maximum image width in pixels (1-16384), or null for no width limit. Ignored if preset is set."
},
"clipshot.resize.maxHeight": {
"type": [
"integer",
"null"
],
"default": 1200,
"minimum": 1,
"maximum": 16384,
"description": "Maximum image height in pixels (1-16384), or null for no height limit. Ignored if preset is set."
},
"clipshot.resize.preset": {
"type": [
"string",
"null"
],
"default": null,
"enum": [
null,
"ai-optimized"
],
"enumDescriptions": [
"Use manual maxWidth/maxHeight settings",
"Optimized for AI chat (1200x1200 max, reduces token usage)"
],
"description": "Resize preset. Overrides maxWidth/maxHeight when set."
},
"clipshot.insert.format": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"path",
"markdown",
"html"
],
"enumDescriptions": [
"Auto-detect based on file type (Markdown → markdown, HTML → html, others → path)",
"Insert file path only",
"Insert as Markdown image: ",
"Insert as HTML image: <img src=\"path\" alt=\"alt\" />"
],
"description": "Format for inserted text"
},
"clipshot.insert.altSource": {
"type": "string",
"default": "filename",
"enum": [
"filename",
"literal"
],
"description": "Source for alt text in markdown/html"
},
"clipshot.insert.altLiteral": {
"type": "string",
"default": "image",
"description": "Custom alt text when altSource is 'literal'"
},
"clipshot.limits.maxFileSizeMB": {
"type": "integer",
"default": 10,
"minimum": 1,
"maximum": 100,
"description": "Maximum file size in MB"
},
"clipshot.notifications.level": {
"type": "string",
"default": "all",
"enum": [
"all",
"errors",
"none"
],
"description": "Notification level"
},
"clipshot.terminal.registerShortcut": {
"type": "boolean",
"default": true,
"description": "Let Ctrl+Shift+V reach ClipShot while the integrated terminal has focus, by adding clipshot.pasteImage to terminal.integrated.commandsToSkipShell in your User settings. Without that entry the terminal keeps the key press and nothing happens. ClipShot appends the entry once and never removes it; turn this off to leave your settings untouched."
},
"clipshot.terminal.target": {
"type": "string",
"default": "terminal",
"enum": [
"terminal",
"clipboard"
],
"enumDescriptions": [
"Type the path into the focused terminal. No newline is sent, so nothing runs until you press Enter.",
"Copy the path to the clipboard and say so, for pasting with Ctrl+V."
],
"description": "Where the path goes when Ctrl+Shift+V is pressed with the integrated terminal focused. The default types it into the terminal; switch to 'clipboard' if you would rather ClipShot did not write into whatever is running there."
}
}
}
},
"capabilities": {
"untrustedWorkspaces": {
"supported": false,
"description": "This extension requires a trusted workspace to save images"
}
},
"scripts": {
"vscode:prepublish": "npm run bundle:prod",
"bundle": "node esbuild.mjs",
"bundle:prod": "node esbuild.mjs --production",
"bundle:watch": "node esbuild.mjs --watch",
"compile": "tsc -p ./",
"compile:e2e": "tsc -p ./test/e2e/tsconfig.json",
"typecheck:test": "tsc -p ./test/tsconfig.json",
"watch": "tsc -watch -p ./",
"lint": "eslint src --max-warnings 0",
"lint:fix": "eslint src --fix",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"test:unit": "vitest run test/image test/clipboard test/security test/config test/keyboard test/core test/terminal",
"test:integration": "vitest run test/integration/",
"test:platform": "vitest run test/clipboard/providers/",
"test:e2e": "npm run bundle && npm run compile:e2e && node ./test/e2e/out/runTests.js",
"verify": "npm run lint && npm run compile && npm run typecheck:test && npm run test:coverage && npm run test:e2e",
"package": "vsce package",
"verify:vsix": "node scripts/verify-vsix.mjs",
"clean": "rimraf dist out"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@kkdev92/vscode-ext-kit": "^7.0.0",
"@types/mocha": "^10.0.10",
"@types/node": "^22.20.4",
"@types/vscode": "~1.138.0",
"@vitest/coverage-v8": "^5.0.1",
"@vscode/test-electron": "^3.1.0",
"@vscode/vsce": "^4.0.0",
"esbuild": "^0.28.2",
"eslint": "^10.11.0",
"glob": "^13.0.6",
"mocha": "^12.0.2",
"rimraf": "^6.1.3",
"typescript": "~6.0.3",
"typescript-eslint": "^8.70.0",
"vitest": "^5.0.0"
},
"dependencies": {
"sharp": "^0.35.4"
},
"bundleDependencies": [
"sharp"
]
}