pi-image-tools 1.0.8 → 1.0.10
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 +30 -2
- package/README.md +12 -3
- package/package.json +67 -61
- package/src/image-preview.ts +497 -469
- package/src/index.ts +22 -17
- package/src/inline-user-preview.ts +10 -31
- package/src/sixel-protocol.ts +57 -0
- package/src/terminal-image-width.ts +90 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.0.10] - 2026-04-22
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Added preview width resolution from Pi terminal settings so inline and recent-image previews can honor `terminal.imageWidthCells`.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Updated recent image selection previews to resolve terminal settings from the active session working directory before rendering.
|
|
17
|
+
- Windows Sixel fallback now activates only when native terminal image support is unavailable, with environment toggles to force or disable Sixel rendering.
|
|
18
|
+
- Clarified README global install and config paths when `PI_CODING_AGENT_DIR` is set.
|
|
19
|
+
- Updated `@mariozechner/pi-coding-agent` and `@mariozechner/pi-tui` peer dependencies to ^0.68.1.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- Ensured generated Sixel output is emitted as a complete DCS sequence and preserved inline image protocol rows during preview width fitting.
|
|
23
|
+
|
|
24
|
+
## [1.0.9] - 2026-04-01
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Updated README image to use HTML tag for better npm display compatibility
|
|
28
|
+
- Added npm keywords for improved package discoverability
|
|
29
|
+
- Added Related Pi Extensions cross-linking section to README
|
|
30
|
+
|
|
3
31
|
## [1.0.8] - 2026-04-01
|
|
4
32
|
|
|
5
33
|
### Changed
|
|
@@ -46,11 +74,11 @@
|
|
|
46
74
|
- Rewrote README.md with professional documentation standards
|
|
47
75
|
- Added comprehensive feature documentation, configuration reference, and usage examples
|
|
48
76
|
|
|
49
|
-
## 1.0.1
|
|
77
|
+
## [1.0.1] - 2026-03-04
|
|
50
78
|
|
|
51
79
|
- Included `asset/` in the npm package whitelist so README image assets ship in the tarball.
|
|
52
80
|
|
|
53
|
-
## 1.0.0
|
|
81
|
+
## [1.0.0] - 2026-03-02
|
|
54
82
|
|
|
55
83
|
- Standardized repository layout to `src/` + root shim entrypoint.
|
|
56
84
|
- Added TypeScript/Bundler project config, package metadata, and publish whitelist.
|
package/README.md
CHANGED
|
@@ -4,7 +4,8 @@ Image attachment and preview extension for the **Pi coding agent**.
|
|
|
4
4
|
|
|
5
5
|
`pi-image-tools` lets you attach clipboard images or recent screenshots to your next user message, then preview them inline in the TUI before the message is sent.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<img width="1360" height="752" alt="image" src="https://github.com/user-attachments/assets/c7b462c4-6316-495e-a3fa-5a7e22edd91f" />
|
|
8
|
+
|
|
8
9
|
|
|
9
10
|
## Features
|
|
10
11
|
|
|
@@ -35,7 +36,7 @@ Place this folder in one of these locations:
|
|
|
35
36
|
|
|
36
37
|
| Scope | Path |
|
|
37
38
|
|-------|------|
|
|
38
|
-
| Global | `~/.pi/agent/extensions/pi-image-tools` |
|
|
39
|
+
| Global default | `~/.pi/agent/extensions/pi-image-tools` (respects `PI_CODING_AGENT_DIR`) |
|
|
39
40
|
| Project | `.pi/extensions/pi-image-tools` |
|
|
40
41
|
|
|
41
42
|
Pi auto-discovers extensions in those paths.
|
|
@@ -115,7 +116,8 @@ $env:PI_IMAGE_TOOLS_RECENT_DIRS = "C:\Users\me\Pictures\Screenshots;D:\Shares\Sc
|
|
|
115
116
|
A config file can be placed at:
|
|
116
117
|
|
|
117
118
|
```text
|
|
118
|
-
~/.pi/agent/extensions/pi-image-tools/config.json
|
|
119
|
+
Default global path: ~/.pi/agent/extensions/pi-image-tools/config.json
|
|
120
|
+
Actual global path: $PI_CODING_AGENT_DIR/extensions/pi-image-tools/config.json when PI_CODING_AGENT_DIR is set
|
|
119
121
|
```
|
|
120
122
|
|
|
121
123
|
Starter template:
|
|
@@ -239,6 +241,13 @@ npm run test
|
|
|
239
241
|
npm run check
|
|
240
242
|
```
|
|
241
243
|
|
|
244
|
+
## Related Pi Extensions
|
|
245
|
+
|
|
246
|
+
- [pi-tool-display](https://github.com/MasuRii/pi-tool-display) — Compact tool rendering and diff visualization
|
|
247
|
+
- [pi-hide-messages](https://github.com/MasuRii/pi-hide-messages) — Hide older chat messages without losing context
|
|
248
|
+
- [pi-startup-redraw-fix](https://github.com/MasuRii/pi-startup-redraw-fix) — Fix terminal redraw glitches on startup
|
|
249
|
+
- [pi-smart-voice-notify](https://github.com/MasuRii/pi-smart-voice-notify) — Multi-channel TTS and sound notifications
|
|
250
|
+
|
|
242
251
|
## License
|
|
243
252
|
|
|
244
253
|
MIT
|
package/package.json
CHANGED
|
@@ -1,61 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-image-tools",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Image attachment and rendering extension for Pi TUI",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./index.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./index.ts"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"index.ts",
|
|
12
|
-
"src",
|
|
13
|
-
"config/config.example.json",
|
|
14
|
-
"asset",
|
|
15
|
-
"README.md",
|
|
16
|
-
"CHANGELOG.md",
|
|
17
|
-
"LICENSE"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "npx --yes -p typescript@5.7.3 tsc -p tsconfig.json --noCheck",
|
|
21
|
-
"lint": "npm run build",
|
|
22
|
-
"test": "node --test",
|
|
23
|
-
"check": "npm run lint && npm run test"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"pi-package",
|
|
27
|
-
"pi",
|
|
28
|
-
"pi-extension",
|
|
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
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-image-tools",
|
|
3
|
+
"version": "1.0.10",
|
|
4
|
+
"description": "Image attachment and rendering extension for Pi TUI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.ts"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"index.ts",
|
|
12
|
+
"src",
|
|
13
|
+
"config/config.example.json",
|
|
14
|
+
"asset",
|
|
15
|
+
"README.md",
|
|
16
|
+
"CHANGELOG.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "npx --yes -p typescript@5.7.3 tsc -p tsconfig.json --noCheck",
|
|
21
|
+
"lint": "npm run build",
|
|
22
|
+
"test": "node --test",
|
|
23
|
+
"check": "npm run lint && npm run test"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"pi-package",
|
|
27
|
+
"pi",
|
|
28
|
+
"pi-extension",
|
|
29
|
+
"pi-coding-agent",
|
|
30
|
+
"pi-tui",
|
|
31
|
+
"coding-agent",
|
|
32
|
+
"image",
|
|
33
|
+
"image-attachment",
|
|
34
|
+
"image-preview",
|
|
35
|
+
"clipboard",
|
|
36
|
+
"preview",
|
|
37
|
+
"windows"
|
|
38
|
+
],
|
|
39
|
+
"author": "MasuRii",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/MasuRii/pi-image-tools.git"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://github.com/MasuRii/pi-image-tools#readme",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/MasuRii/pi-image-tools/issues"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=20"
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"pi": {
|
|
56
|
+
"extensions": [
|
|
57
|
+
"./index.ts"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@mariozechner/pi-coding-agent": "^0.68.1",
|
|
62
|
+
"@mariozechner/pi-tui": "^0.68.1"
|
|
63
|
+
},
|
|
64
|
+
"optionalDependencies": {
|
|
65
|
+
"@mariozechner/clipboard": "^0.3.2"
|
|
66
|
+
}
|
|
67
|
+
}
|