@openeryc/pi-coding-agent 0.75.18 → 0.75.20
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/CHANGELOG.md +4 -0
- package/dist/core/session-manager.d.ts +1 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +48 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +12 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +16 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
|
@@ -2069,6 +2069,11 @@ export class InteractiveMode {
|
|
|
2069
2069
|
await this.handleCompactCommand(customInstructions);
|
|
2070
2070
|
return;
|
|
2071
2071
|
}
|
|
2072
|
+
if (text === "/cleanup") {
|
|
2073
|
+
this.editor.setText("");
|
|
2074
|
+
await this.handleCleanupCommand();
|
|
2075
|
+
return;
|
|
2076
|
+
}
|
|
2072
2077
|
if (text === "/reload") {
|
|
2073
2078
|
this.editor.setText("");
|
|
2074
2079
|
await this.handleReloadCommand();
|
|
@@ -4449,6 +4454,17 @@ export class InteractiveMode {
|
|
|
4449
4454
|
console.log(`\n${APP_NAME} updated. Restart pi.`);
|
|
4450
4455
|
process.exit(0);
|
|
4451
4456
|
}
|
|
4457
|
+
async handleCleanupCommand() {
|
|
4458
|
+
const retentionDays = this.settingsManager.getProjectSettings().sessionRetentionDays ?? 30;
|
|
4459
|
+
this.showStatus(`Cleaning up sessions older than ${retentionDays} days...`);
|
|
4460
|
+
this.ui.requestRender();
|
|
4461
|
+
const deleted = await SessionManager.cleanupOldSessions(retentionDays);
|
|
4462
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
4463
|
+
this.chatContainer.addChild(new Text(theme.fg("dim", deleted > 0
|
|
4464
|
+
? `Cleaned up ${deleted} session(s) older than ${retentionDays} days.`
|
|
4465
|
+
: `No sessions older than ${retentionDays} days to clean up.`), 1, 0));
|
|
4466
|
+
this.ui.requestRender();
|
|
4467
|
+
}
|
|
4452
4468
|
handleMemoryCommand() {
|
|
4453
4469
|
const memory = this.session.resourceLoader.getMemory();
|
|
4454
4470
|
const memoryPath = path.join(this.sessionManager.getCwd(), ".pi", "memory", "MEMORY.md");
|