pi-orca-images 0.2.0 → 0.2.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.
- package/CHANGELOG.md +4 -0
- package/README.md +22 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
- README: banner, before/after screenshot and a demo GIF of the `[Image N]` labels.
|
|
6
|
+
|
|
3
7
|
## 0.2.0
|
|
4
8
|
|
|
5
9
|
- Show pasted image paths as bold, colored `[Image N]` labels in the prompt; they expand back to the path on send. `PI_IMAGE_LABELS=0` turns them off.
|
package/README.md
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/JlMoreno00/pi-orca-images/main/docs/banner.png" alt="pi-orca-images: inline images for the Pi coding agent inside Orca's terminal" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/pi-orca-images"><img src="https://img.shields.io/npm/v/pi-orca-images?color=8ab4f8&label=npm" alt="npm version"></a>
|
|
7
|
+
<a href="https://github.com/JlMoreno00/pi-orca-images/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JlMoreno00/pi-orca-images/ci.yml?branch=main&label=ci" alt="CI"></a>
|
|
8
|
+
<a href="LICENSE"><img src="https://img.shields.io/npm/l/pi-orca-images?color=8b92a3" alt="MIT license"></a>
|
|
9
|
+
<a href="https://pi.dev/packages"><img src="https://img.shields.io/badge/pi-package-ec4899" alt="Pi package"></a>
|
|
10
|
+
</p>
|
|
2
11
|
|
|
3
12
|
Inline images for the [Pi coding agent](https://pi.dev) inside [Orca](https://github.com/stablyai/orca)'s terminal.
|
|
4
13
|
|
|
5
|
-
Pi draws images natively (screenshots it reads, image tool results, previews), but inside Orca you get a blank gap or `Read image file [image/png]` and nothing else. This package fixes that with no configuration.
|
|
14
|
+
Pi draws images natively (screenshots it reads, image tool results, previews), but inside Orca you get a blank gap or `Read image file [image/png]` and nothing else. This package fixes that with no configuration, and adds OpenCode-style `[Image 1]` labels for pasted images.
|
|
6
15
|
|
|
7
16
|
```bash
|
|
8
17
|
pi install npm:pi-orca-images
|
|
@@ -10,6 +19,10 @@ pi install npm:pi-orca-images
|
|
|
10
19
|
|
|
11
20
|
Restart Pi in an Orca terminal and run `/orca-images test`. You should see a color gradient.
|
|
12
21
|
|
|
22
|
+
<p align="center">
|
|
23
|
+
<img src="https://raw.githubusercontent.com/JlMoreno00/pi-orca-images/main/docs/before-after.png" alt="The same read of an image in Pi inside Orca: without the package only the tool card shows; with it, the image is drawn in full" width="860">
|
|
24
|
+
</p>
|
|
25
|
+
|
|
13
26
|
## What it fixes
|
|
14
27
|
|
|
15
28
|
Orca renders inline images through xterm.js's image addon. Three things keep Pi's images from showing up there:
|
|
@@ -22,6 +35,10 @@ Orca renders inline images through xterm.js's image addon. Three things keep Pi'
|
|
|
22
35
|
|
|
23
36
|
## Pasted image labels
|
|
24
37
|
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="https://raw.githubusercontent.com/JlMoreno00/pi-orca-images/main/docs/image-labels.gif" alt="Typing a prompt in Pi, pasting two image paths that turn into [Image 1] and [Image 2] labels, deleting one label with a single backspace, and the sent message containing the real paths" width="760">
|
|
40
|
+
</p>
|
|
41
|
+
|
|
25
42
|
Paste an image (or drop an image file) into Pi's prompt and the path is shown as a bold, colored `[Image 1]` label, as in OpenCode. Labels are numbered per message, move and delete as one unit, and become the real path again when you send the message, so the model sees exactly what it saw before.
|
|
26
43
|
|
|
27
44
|
It recognizes pastes made only of existing image files (`png`, `jpg`, `gif`, `webp`, `bmp`, `tiff`, `heic`, `avif`): plain paths, `~/` paths, quoted or backslash-escaped paths, and `file://` URLs. Text that mixes a path with other words is left alone. This works in every terminal, not only Orca, including Pi's own clipboard paste. Set `PI_IMAGE_LABELS=0` to turn it off.
|
|
@@ -60,8 +77,11 @@ It does nothing outside Orca. Your explicit choices always win:
|
|
|
60
77
|
npm install
|
|
61
78
|
npm run check # typecheck + tests
|
|
62
79
|
pi -e ./src/index.ts # try it without installing
|
|
80
|
+
python3 scripts/banner.py # regenerate docs/banner.png (Pillow, Inter, JetBrains Mono)
|
|
63
81
|
```
|
|
64
82
|
|
|
83
|
+
The screenshots in `docs/` are real captures of Pi 1.4 in Orca 1.4.229 on macOS.
|
|
84
|
+
|
|
65
85
|
## License
|
|
66
86
|
|
|
67
87
|
MIT
|