pi-image-preview 0.1.4 → 0.1.5
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 +1 -1
- package/package.json +2 -2
- package/src/extension-runtime.ts +6 -0
- package/src/image-gallery.ts +1 -1
package/index.ts
CHANGED
|
@@ -18,7 +18,7 @@ async function loadPiImageResizer(): Promise<ImageResizer | null> {
|
|
|
18
18
|
cachedResizerPromise = (async () => {
|
|
19
19
|
try {
|
|
20
20
|
const require = createRequire(import.meta.url);
|
|
21
|
-
const piEntry = require.resolve("@
|
|
21
|
+
const piEntry = require.resolve("@earendil-works/pi-coding-agent");
|
|
22
22
|
const distDir = path.dirname(piEntry);
|
|
23
23
|
const moduleUrl = pathToFileURL(
|
|
24
24
|
path.join(distDir, "utils", "image-resize.js"),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-image-preview",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Image preview extension for pi coding agent
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Image preview extension for pi coding agent — renders inline image thumbnails above the editor using kitty graphics protocol with tmux support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
7
7
|
"kitty",
|
package/src/extension-runtime.ts
CHANGED
|
@@ -228,6 +228,12 @@ export function registerImagePreviewExtension(
|
|
|
228
228
|
debugLog("Error during editor text scan", err);
|
|
229
229
|
});
|
|
230
230
|
}, POLL_INTERVAL_MS);
|
|
231
|
+
// Don't let the poll timer keep the Node event loop alive.
|
|
232
|
+
// In non-interactive modes (e.g. `pi --print`), the process must be
|
|
233
|
+
// able to exit once work is done — an active interval would block exit.
|
|
234
|
+
if (typeof pollTimer.unref === "function") {
|
|
235
|
+
pollTimer.unref();
|
|
236
|
+
}
|
|
231
237
|
}
|
|
232
238
|
|
|
233
239
|
function stopPolling(): void {
|