@pi-archimedes/image-paste 1.9.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Daniel Cherubini and contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # @pi-archimedes/image-paste
2
+
3
+ Paste images from your clipboard directly into the Pi chat with inline previews.
4
+
5
+ ## Features
6
+
7
+ - **Clipboard image paste** — grab a screenshot and paste it straight into the prompt
8
+ - **Inline previews** — images render in the TUI so you can see what you attached
9
+ - **Marker-based attachment** — placeholder markers (`[Image #1]`) are matched and attached on submit
10
+ - **Size guard** — rejects images over 20MB with a clear warning
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ pi install npm:@pi-archimedes/image-paste
16
+ ```
17
+
18
+ Or install the full meta package:
19
+
20
+ ```bash
21
+ pi install npm:pi-archimedes
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ With Pi focused, press the paste shortcut and any image in your clipboard is attached:
27
+
28
+ | Platform | Shortcut |
29
+ |----------|----------|
30
+ | Linux | `Ctrl+V` |
31
+ | macOS | `Ctrl+V` or `Alt+V` |
32
+ | Windows | `Alt+V` |
33
+
34
+ A `[Image #N]` placeholder is inserted into your draft. When you submit, any images referenced by markers are automatically attached to the message. If you remove the markers before submitting, the images are discarded.
35
+
36
+ ## Settings
37
+
38
+ Uses Pi's core `terminal.showImages` setting to control inline previews. No package-specific settings.
39
+
40
+ ## Troubleshooting
41
+
42
+ ### `ctrl+v` shortcut conflict on Linux
43
+
44
+ Pi has a built-in `ctrl+v` handler (`app.clipboard.pasteImage`) that conflicts with this extension. You'll see a warning like:
45
+
46
+ ```
47
+ Extension shortcut conflict: 'ctrl+v' is built-in shortcut for app.clipboard.pasteImage
48
+ ```
49
+
50
+ **Fix:** Clear the built-in binding in `~/.pi/agent/keybindings.json`:
51
+
52
+ ```json
53
+ {
54
+ "app.clipboard.pasteImage": []
55
+ }
56
+ ```
57
+
58
+ This lets archimedes' handler take over (it does the same thing plus inline previews) without the warning.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-archimedes/image-paste",
3
- "version": "1.9.0",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "pi-package"