@averyyy/pi-coding-agent 0.80.6-piclient.4 → 0.80.6-piclient.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/dist/core/pi-client-runtime-update.d.ts +14 -0
- package/dist/core/pi-client-runtime-update.d.ts.map +1 -0
- package/dist/core/pi-client-runtime-update.js +27 -0
- package/dist/core/pi-client-runtime-update.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +26 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/package.json +4 -4
|
@@ -20,6 +20,7 @@ import { KeybindingsManager } from "../../core/keybindings.js";
|
|
|
20
20
|
import { createCompactionSummaryMessage } from "../../core/messages.js";
|
|
21
21
|
import { defaultModelPerProvider, findExactModelReferenceMatch, resolveModelScope } from "../../core/model-resolver.js";
|
|
22
22
|
import { DefaultPackageManager } from "../../core/package-manager.js";
|
|
23
|
+
import { getPiClientUpdateMarkerPath, PI_CLIENT_RUNTIME_RELOAD_EXIT_CODE, readPiClientUpdateMarker, writePiClientRuntimeReloadState, } from "../../core/pi-client-runtime-update.js";
|
|
23
24
|
import { BUILT_IN_PROVIDER_DISPLAY_NAMES } from "../../core/provider-display-names.js";
|
|
24
25
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
25
26
|
import { SessionManager, sessionEntryToContextMessages } from "../../core/session-manager.js";
|
|
@@ -2181,6 +2182,12 @@ export class InteractiveMode {
|
|
|
2181
2182
|
await this.handleReloadCommand();
|
|
2182
2183
|
return;
|
|
2183
2184
|
}
|
|
2185
|
+
const pendingPiClientUpdate = readPiClientUpdateMarker();
|
|
2186
|
+
if (pendingPiClientUpdate) {
|
|
2187
|
+
this.showWarning(`pi-client ${pendingPiClientUpdate.version} is installed. Run /reload to continue this session with the new version.`);
|
|
2188
|
+
this.editor.setText(text);
|
|
2189
|
+
return;
|
|
2190
|
+
}
|
|
2184
2191
|
if (text === "/debug") {
|
|
2185
2192
|
this.handleDebugCommand();
|
|
2186
2193
|
this.editor.setText("");
|
|
@@ -4368,6 +4375,25 @@ export class InteractiveMode {
|
|
|
4368
4375
|
this.showWarning("Wait for compaction to finish before reloading.");
|
|
4369
4376
|
return;
|
|
4370
4377
|
}
|
|
4378
|
+
const pendingPiClientUpdate = readPiClientUpdateMarker();
|
|
4379
|
+
if (pendingPiClientUpdate) {
|
|
4380
|
+
const reloadStatePath = process.env.PI_CLIENT_RELOAD_STATE_PATH;
|
|
4381
|
+
if (!reloadStatePath) {
|
|
4382
|
+
this.showWarning(`pi-client ${pendingPiClientUpdate.version} is installed. Restart pi-client to load the new runtime.`);
|
|
4383
|
+
return;
|
|
4384
|
+
}
|
|
4385
|
+
writePiClientRuntimeReloadState(reloadStatePath, {
|
|
4386
|
+
sessionId: this.sessionManager.getSessionId(),
|
|
4387
|
+
sessionDir: this.sessionManager.usesDefaultSessionDir() ? undefined : this.sessionManager.getSessionDir(),
|
|
4388
|
+
updateMarkerPath: getPiClientUpdateMarkerPath(),
|
|
4389
|
+
});
|
|
4390
|
+
this.isShuttingDown = true;
|
|
4391
|
+
this.themeController.disableAutoSync();
|
|
4392
|
+
await this.ui.terminal.drainInput(1000);
|
|
4393
|
+
this.stop();
|
|
4394
|
+
await this.runtimeHost.dispose();
|
|
4395
|
+
process.exit(PI_CLIENT_RUNTIME_RELOAD_EXIT_CODE);
|
|
4396
|
+
}
|
|
4371
4397
|
this.resetExtensionUI();
|
|
4372
4398
|
const reloadBox = new Container();
|
|
4373
4399
|
const borderColor = (s) => theme.fg("border", s);
|