@kcurtet/pi-image-preview 0.1.0 → 0.1.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/index.ts +3 -3
- package/package.json +7 -3
package/index.ts
CHANGED
|
@@ -99,9 +99,9 @@ function extractCandidatePaths(text: string, cwd: string): string[] {
|
|
|
99
99
|
if (!trimmed || trimmed.length > 4096) continue;
|
|
100
100
|
let candidate = trimmed;
|
|
101
101
|
if (candidate.startsWith("~")) candidate = path.join(os.homedir(), candidate.slice(1));
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (
|
|
102
|
+
// Only image extensions count — "any path that exists" would chip log files,
|
|
103
|
+
// config files and every other path a tool prints.
|
|
104
|
+
if (!/\.(png|jpe?g|gif|webp|bmp)$/i.test(candidate)) continue;
|
|
105
105
|
const absolute = path.resolve(cwd, candidate);
|
|
106
106
|
if (seen.has(absolute)) continue;
|
|
107
107
|
try {
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kcurtet/pi-image-preview",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Hover previews for image paths in the pi coding agent: chips above the editor and in the transcript, kitty/iTerm2 inline rendering, /images viewer",
|
|
5
5
|
"private": false,
|
|
6
|
-
"keywords": [
|
|
6
|
+
"keywords": [
|
|
7
|
+
"pi-package"
|
|
8
|
+
],
|
|
7
9
|
"license": "MIT",
|
|
8
10
|
"repository": {
|
|
9
11
|
"type": "git",
|
|
10
12
|
"url": "git+https://github.com/kcurtet/pi-image-preview.git"
|
|
11
13
|
},
|
|
12
14
|
"pi": {
|
|
13
|
-
"extensions": [
|
|
15
|
+
"extensions": [
|
|
16
|
+
"./index.ts"
|
|
17
|
+
]
|
|
14
18
|
},
|
|
15
19
|
"peerDependencies": {
|
|
16
20
|
"@earendil-works/pi-coding-agent": "*",
|