@ian-pascoe/pi-termctrl 0.7.0 → 0.7.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/package.json +2 -2
- package/src/pi-termctrl-extension.ts +26 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ian-pascoe/pi-termctrl",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Interactive Terminals, Background jobs, and a /ps panel for Pi.",
|
|
6
6
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"provenance": true
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ian-pascoe/pi-utils": "^0.
|
|
37
|
+
"@ian-pascoe/pi-utils": "^0.6.0",
|
|
38
38
|
"@kitlangton/terminal-control": "^1.2.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
type ExtensionFactory,
|
|
8
8
|
type SessionShutdownEvent,
|
|
9
9
|
} from "@earendil-works/pi-coding-agent";
|
|
10
|
+
import { acceptNullForOptionalArguments } from "@ian-pascoe/pi-utils/null-optional-arguments";
|
|
10
11
|
import { expandMessageOnClick, noticeText } from "@ian-pascoe/pi-utils/ui";
|
|
11
12
|
import { createBashReplacement, RunningBashCalls } from "./bash-replacement.js";
|
|
12
13
|
import {
|
|
@@ -102,8 +103,8 @@ class PiTermctrlController {
|
|
|
102
103
|
viewport: () => this.session().viewport,
|
|
103
104
|
scrollback: () => this.session().scrollback,
|
|
104
105
|
};
|
|
105
|
-
this.pi.registerTool(createTerminalStartTool(runtime));
|
|
106
|
-
this.pi.registerTool(createTerminalSendTool(runtime));
|
|
106
|
+
this.pi.registerTool(acceptNullForOptionalArguments(createTerminalStartTool(runtime)));
|
|
107
|
+
this.pi.registerTool(acceptNullForOptionalArguments(createTerminalSendTool(runtime)));
|
|
107
108
|
this.registerManagementTools();
|
|
108
109
|
}
|
|
109
110
|
this.pi.on("session_start", (_event, context) => this.start(context));
|
|
@@ -131,17 +132,21 @@ class PiTermctrlController {
|
|
|
131
132
|
|
|
132
133
|
private registerManagementTools(): void {
|
|
133
134
|
this.pi.registerTool(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
acceptNullForOptionalArguments(
|
|
136
|
+
createTerminalStopTool({
|
|
137
|
+
registry: this.registry,
|
|
138
|
+
scrollback: () => this.session().scrollback,
|
|
139
|
+
}),
|
|
140
|
+
),
|
|
138
141
|
);
|
|
139
|
-
this.pi.registerTool(createTerminalListTool(this.registry));
|
|
142
|
+
this.pi.registerTool(acceptNullForOptionalArguments(createTerminalListTool(this.registry)));
|
|
140
143
|
this.pi.registerTool(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
acceptNullForOptionalArguments(
|
|
145
|
+
createTerminalWaitTool({
|
|
146
|
+
registry: this.registry,
|
|
147
|
+
exitTailLines: () => this.session().exitTailLines,
|
|
148
|
+
}),
|
|
149
|
+
),
|
|
145
150
|
);
|
|
146
151
|
}
|
|
147
152
|
|
|
@@ -197,14 +202,16 @@ class PiTermctrlController {
|
|
|
197
202
|
const calls = new RunningBashCalls(currentRegistry);
|
|
198
203
|
if (settings.replaceBash) {
|
|
199
204
|
this.pi.registerTool(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
acceptNullForOptionalArguments(
|
|
206
|
+
createBashReplacement({
|
|
207
|
+
cwd: context.cwd,
|
|
208
|
+
commandPrefix,
|
|
209
|
+
shellPath,
|
|
210
|
+
registry: currentRegistry,
|
|
211
|
+
calls,
|
|
212
|
+
bashTail: settings.bashTail,
|
|
213
|
+
}),
|
|
214
|
+
),
|
|
208
215
|
);
|
|
209
216
|
}
|
|
210
217
|
this.active = {
|