@monotykamary/pi-localterm 0.3.0 → 0.3.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/extensions/index.ts +2 -2
- package/extensions/kitty-images.ts +8 -12
- package/package.json +6 -6
package/extensions/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { registerAgentNotify } from "./agent-notify.js";
|
|
3
3
|
import { registerBashSecretScrub } from "./bash-secret-scrub.js";
|
|
4
|
-
import {
|
|
4
|
+
import { enableKittyImages } from "./kitty-images.js";
|
|
5
5
|
|
|
6
6
|
// localterm <-> pi integration, inert outside localterm. LOCALTERM=1 is
|
|
7
7
|
// injected into every localterm PTY; when it's absent, nothing is registered
|
|
@@ -15,7 +15,7 @@ import { registerKittyImages } from "./kitty-images.js";
|
|
|
15
15
|
// finished.
|
|
16
16
|
export default (pi: ExtensionAPI): void => {
|
|
17
17
|
if (process.env.LOCALTERM !== "1") return;
|
|
18
|
-
|
|
18
|
+
enableKittyImages();
|
|
19
19
|
registerBashSecretScrub(pi);
|
|
20
20
|
registerAgentNotify(pi);
|
|
21
21
|
};
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
1
|
import { getCapabilities, setCapabilities } from "@earendil-works/pi-tui";
|
|
3
2
|
|
|
4
3
|
// localterm renders xterm.js with the Kitty graphics + OSC 8 hyperlink addons
|
|
5
4
|
// loaded, but sets TERM=xterm-256color and strips terminal-identity env vars so
|
|
6
5
|
// Ink TUIs don't probe for a protocol xterm.js lacks. pi-tui therefore reports
|
|
7
|
-
// images/hyperlinks as unsupported.
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
export const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (capabilities.images) return;
|
|
16
|
-
setCapabilities({ ...capabilities, images: "kitty", hyperlinks: true });
|
|
17
|
-
});
|
|
6
|
+
// images/hyperlinks as unsupported. Enable them while the extension factory is
|
|
7
|
+
// loading, before TUI.start() checks image support and sends its CSI 16 t cell-
|
|
8
|
+
// metrics query. Waiting for session_start is too late: the first query is then
|
|
9
|
+
// skipped and image sizing keeps pi-tui's fallback cell dimensions.
|
|
10
|
+
export const enableKittyImages = (): void => {
|
|
11
|
+
const capabilities = getCapabilities();
|
|
12
|
+
if (capabilities.images === "kitty" && capabilities.hyperlinks) return;
|
|
13
|
+
setCapabilities({ ...capabilities, images: "kitty", hyperlinks: true });
|
|
18
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monotykamary/pi-localterm",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "localterm <-> pi integration: Kitty graphics for the browser renderer, scrubbing localterm-managed secret env vars from the agent's bash-tool children, and OSC 9 desktop notifications when the agent finishes a long turn.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"localterm",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@earendil-works/pi-coding-agent": "^0.80.
|
|
33
|
-
"@earendil-works/pi-tui": "^0.80.
|
|
34
|
-
"@types/node": "^26.1.
|
|
35
|
-
"typescript": "^
|
|
36
|
-
"vite-plus": "^0.2.
|
|
32
|
+
"@earendil-works/pi-coding-agent": "^0.80.6",
|
|
33
|
+
"@earendil-works/pi-tui": "^0.80.6",
|
|
34
|
+
"@types/node": "^26.1.1",
|
|
35
|
+
"typescript": "^7.0.2",
|
|
36
|
+
"vite-plus": "^0.2.4"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@earendil-works/pi-coding-agent": "*",
|