@turri-dev/cli 0.4.2 → 0.4.3-next.aea3ca1
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/dist/chat-terminal.js +7 -7
- package/dist/chat-waiting.d.ts +4 -1
- package/dist/chat-waiting.js +7 -4
- package/dist/resume-line.d.ts +4 -1
- package/dist/resume-line.js +5 -2
- package/package.json +3 -3
package/dist/chat-terminal.js
CHANGED
|
@@ -135,17 +135,17 @@ export function driveTerminal(core, options = {}) {
|
|
|
135
135
|
return;
|
|
136
136
|
from?.ui?.hide();
|
|
137
137
|
// pi takes the shown chat's widgets and dialogs off the screen, as it does before replacing a session - but not the
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
// overlays on it: the side panel, the session's and not the chat's, stays where it is, beside the chat or over it.
|
|
139
|
+
// pi takes off every overlay it holds, so for that moment it holds none.
|
|
140
|
+
const overlays = screen?.extensionOverlays;
|
|
141
|
+
const kept = [...(overlays ?? [])];
|
|
142
|
+
overlays?.clear();
|
|
143
143
|
try {
|
|
144
144
|
runtime.beforeSessionInvalidate?.();
|
|
145
145
|
}
|
|
146
146
|
finally {
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
for (const [handle, remove] of kept)
|
|
148
|
+
overlays?.set(handle, remove);
|
|
149
149
|
}
|
|
150
150
|
runtime._session = chat.session;
|
|
151
151
|
runtime._services = chat.services;
|
package/dist/chat-waiting.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ import { type Component } from "@earendil-works/pi-tui";
|
|
|
14
14
|
export interface WaitingScreen {
|
|
15
15
|
chatContainer: Container;
|
|
16
16
|
pendingMessagesContainer: Container;
|
|
17
|
+
/** The output of commands the person ran (`!`) while the agent works: pi keeps it there until it goes in the chat. */
|
|
18
|
+
pendingBashComponents?: Component[];
|
|
17
19
|
getAllQueuedMessages(): {
|
|
18
20
|
steering: string[];
|
|
19
21
|
followUp: string[];
|
|
@@ -36,7 +38,8 @@ export declare class Shade implements Component {
|
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
40
|
* Under the chat, each message the agent has not read yet, drawn as pi draws a message in the chat - shaded, and
|
|
39
|
-
* marked not read yet - in the order they were sent
|
|
41
|
+
* marked not read yet - in the order they were sent; under the output of any command the person ran meanwhile, as pi
|
|
42
|
+
* draws them.
|
|
40
43
|
*/
|
|
41
44
|
export declare function showWaiting(screen: WaitingScreen): void;
|
|
42
45
|
/** What of pi's session `unqueue` reaches. */
|
package/dist/chat-waiting.js
CHANGED
|
@@ -21,11 +21,14 @@ export class Shade {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Under the chat, each message the agent has not read yet, drawn as pi draws a message in the chat - shaded, and
|
|
24
|
-
* marked not read yet - in the order they were sent
|
|
24
|
+
* marked not read yet - in the order they were sent; under the output of any command the person ran meanwhile, as pi
|
|
25
|
+
* draws them.
|
|
25
26
|
*/
|
|
26
27
|
export function showWaiting(screen) {
|
|
27
28
|
const area = screen.pendingMessagesContainer;
|
|
28
29
|
area.clear();
|
|
30
|
+
for (const output of screen.pendingBashComponents ?? [])
|
|
31
|
+
area.addChild(output);
|
|
29
32
|
const { steering, followUp } = screen.getAllQueuedMessages();
|
|
30
33
|
const waiting = [...steering, ...followUp];
|
|
31
34
|
if (waiting.length === 0)
|
|
@@ -36,9 +39,9 @@ export function showWaiting(screen) {
|
|
|
36
39
|
const chat = screen.chatContainer;
|
|
37
40
|
screen.chatContainer = area;
|
|
38
41
|
try {
|
|
39
|
-
for (const text of waiting) {
|
|
40
|
-
// A line between it and
|
|
41
|
-
if (
|
|
42
|
+
for (const [index, text] of waiting.entries()) {
|
|
43
|
+
// A line between it and what is above it; pi puts one between messages itself.
|
|
44
|
+
if (index === 0)
|
|
42
45
|
area.addChild(new Spacer(1));
|
|
43
46
|
const before = area.children.length;
|
|
44
47
|
screen.addMessageToChat({ role: "user", content: [{ type: "text", text }], timestamp: Date.now() });
|
package/dist/resume-line.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* pi's lines on the way out that say how to resume the session - its label, then the command on a line of its own -
|
|
3
|
+
* left out: turri leaves nothing behind but the command run.
|
|
4
|
+
*/
|
|
2
5
|
export declare function withoutResumeLine(text: string): string;
|
package/dist/resume-line.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* pi's lines on the way out that say how to resume the session - its label, then the command on a line of its own -
|
|
3
|
+
* left out: turri leaves nothing behind but the command run.
|
|
4
|
+
*/
|
|
2
5
|
export function withoutResumeLine(text) {
|
|
3
|
-
return text.replace(/^(?:\x1b\[[0-9;]*m)*To resume this session
|
|
6
|
+
return text.replace(/^(?:\x1b\[[0-9;]*m)*To resume this session:(?:\x1b\[[0-9;]*m)*\n[^\n]*\n?/m, "");
|
|
4
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turri-dev/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3-next.aea3ca1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"prepack": "npm run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
43
|
-
"@earendil-works/pi-tui": "1.
|
|
42
|
+
"@earendil-works/pi-coding-agent": "1.6.0",
|
|
43
|
+
"@earendil-works/pi-tui": "1.6.0",
|
|
44
44
|
"@langchain/langgraph": "1.4.15",
|
|
45
45
|
"gray-matter": "^4.0.3",
|
|
46
46
|
"js-yaml": "^5.4.2",
|