pi-studio 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/index.ts +8 -23
- package/package.json +4 -4
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExtensionAPI, ExtensionCommandContext, SessionEntry, Theme } from "@
|
|
2
|
-
import { getAgentDir } from "@
|
|
1
|
+
import type { ExtensionAPI, ExtensionCommandContext, SessionEntry, Theme } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
3
3
|
import { spawn, spawnSync } from "node:child_process";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { readFileSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -9193,9 +9193,14 @@ export default function (pi: ExtensionAPI) {
|
|
|
9193
9193
|
syncStudioResponseHistory(entries);
|
|
9194
9194
|
};
|
|
9195
9195
|
|
|
9196
|
-
pi.on("session_start", async (
|
|
9196
|
+
pi.on("session_start", async (event, ctx) => {
|
|
9197
|
+
const isSessionReplacement = event.reason === "new" || event.reason === "resume" || event.reason === "fork";
|
|
9197
9198
|
pendingTurnPrompt = null;
|
|
9198
9199
|
clearStudioDirectRunState();
|
|
9200
|
+
if (isSessionReplacement) {
|
|
9201
|
+
clearActiveRequest({ notify: "Session switched. Studio request state cleared.", level: "warning" });
|
|
9202
|
+
lastCommandCtx = null;
|
|
9203
|
+
}
|
|
9199
9204
|
hydrateLatestAssistant(ctx.sessionManager.getBranch());
|
|
9200
9205
|
clearCompactionState();
|
|
9201
9206
|
agentBusy = false;
|
|
@@ -9212,26 +9217,6 @@ export default function (pi: ExtensionAPI) {
|
|
|
9212
9217
|
broadcastResponseHistory();
|
|
9213
9218
|
});
|
|
9214
9219
|
|
|
9215
|
-
pi.on("session_switch", async (_event, ctx) => {
|
|
9216
|
-
clearStudioDirectRunState();
|
|
9217
|
-
clearActiveRequest({ notify: "Session switched. Studio request state cleared.", level: "warning" });
|
|
9218
|
-
clearCompactionState();
|
|
9219
|
-
pendingTurnPrompt = null;
|
|
9220
|
-
lastCommandCtx = null;
|
|
9221
|
-
hydrateLatestAssistant(ctx.sessionManager.getBranch());
|
|
9222
|
-
agentBusy = false;
|
|
9223
|
-
clearPendingStudioCompletion();
|
|
9224
|
-
clearPreparedPdfExports();
|
|
9225
|
-
refreshRuntimeMetadata({ cwd: ctx.cwd, model: ctx.model });
|
|
9226
|
-
refreshContextUsage(ctx);
|
|
9227
|
-
emitDebugEvent("session_switch", {
|
|
9228
|
-
entryCount: ctx.sessionManager.getBranch().length,
|
|
9229
|
-
modelLabel: currentModelLabel,
|
|
9230
|
-
terminalSessionLabel,
|
|
9231
|
-
});
|
|
9232
|
-
setTerminalActivity("idle");
|
|
9233
|
-
broadcastResponseHistory();
|
|
9234
|
-
});
|
|
9235
9220
|
|
|
9236
9221
|
pi.on("session_tree", async (_event, ctx) => {
|
|
9237
9222
|
hydrateLatestAssistant(ctx.sessionManager.getBranch());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-studio",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Two-pane browser workspace for pi with prompt/response editing, annotations, critiques, prompt/response history, and live Markdown/LaTeX/code preview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@
|
|
43
|
+
"@earendil-works/pi-coding-agent": "*"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"ws": "^8.18.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@mariozechner/pi-coding-agent": "^0.64.0",
|
|
50
49
|
"@types/node": "^24.3.0",
|
|
51
50
|
"@types/ws": "^8.18.1",
|
|
52
|
-
"typescript": "^5.7.3"
|
|
51
|
+
"typescript": "^5.7.3",
|
|
52
|
+
"@earendil-works/pi-coding-agent": "^0.74.0"
|
|
53
53
|
}
|
|
54
54
|
}
|