@mariozechner/pi-coding-agent 0.43.0 → 0.44.0
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 +20 -0
- package/README.md +3 -0
- package/dist/core/agent-session.d.ts +5 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +6 -3
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +8 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +2 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +13 -3
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/session-manager.d.ts +13 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +37 -2
- package/dist/core/session-manager.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +30 -9
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +1 -1
- package/dist/modes/interactive/components/settings-selector.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 +41 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +22 -8
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +7 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +7 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/docs/extensions.md +21 -0
- package/docs/session.md +12 -0
- package/docs/tui.md +1 -0
- package/examples/extensions/README.md +1 -0
- package/examples/extensions/notify.ts +25 -0
- package/examples/extensions/preset.ts +3 -3
- package/examples/extensions/tools.ts +7 -6
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
|
@@ -182,6 +182,7 @@ export class InteractiveMode {
|
|
|
182
182
|
{ name: "export", description: "Export session to HTML file" },
|
|
183
183
|
{ name: "share", description: "Share session as a secret GitHub gist" },
|
|
184
184
|
{ name: "copy", description: "Copy last agent message to clipboard" },
|
|
185
|
+
{ name: "name", description: "Set session display name" },
|
|
185
186
|
{ name: "session", description: "Show session info and stats" },
|
|
186
187
|
{ name: "changelog", description: "Show changelog entries" },
|
|
187
188
|
{ name: "hotkeys", description: "Show all keyboard shortcuts" },
|
|
@@ -299,7 +300,7 @@ export class InteractiveMode {
|
|
|
299
300
|
theme.fg("muted", " to queue follow-up") +
|
|
300
301
|
"\n" +
|
|
301
302
|
theme.fg("dim", dequeue) +
|
|
302
|
-
theme.fg("muted", " to
|
|
303
|
+
theme.fg("muted", " to edit all queued messages") +
|
|
303
304
|
"\n" +
|
|
304
305
|
theme.fg("dim", "ctrl+v") +
|
|
305
306
|
theme.fg("muted", " to paste image") +
|
|
@@ -332,6 +333,7 @@ export class InteractiveMode {
|
|
|
332
333
|
this.ui.addChild(this.pendingMessagesContainer);
|
|
333
334
|
this.ui.addChild(this.statusContainer);
|
|
334
335
|
this.ui.addChild(this.widgetContainer);
|
|
336
|
+
this.renderWidgets(); // Initialize with default spacer
|
|
335
337
|
this.ui.addChild(this.editorContainer);
|
|
336
338
|
this.ui.addChild(this.footer);
|
|
337
339
|
this.ui.setFocus(this.editor);
|
|
@@ -522,8 +524,14 @@ export class InteractiveMode {
|
|
|
522
524
|
appendEntry: (customType, data) => {
|
|
523
525
|
this.sessionManager.appendCustomEntry(customType, data);
|
|
524
526
|
},
|
|
527
|
+
setSessionName: (name) => {
|
|
528
|
+
this.sessionManager.appendSessionInfo(name);
|
|
529
|
+
},
|
|
530
|
+
getSessionName: () => {
|
|
531
|
+
return this.sessionManager.getSessionName();
|
|
532
|
+
},
|
|
525
533
|
getActiveTools: () => this.session.getActiveToolNames(),
|
|
526
|
-
getAllTools: () => this.session.
|
|
534
|
+
getAllTools: () => this.session.getAllTools(),
|
|
527
535
|
setActiveTools: (toolNames) => this.session.setActiveToolsByName(toolNames),
|
|
528
536
|
setModel: async (model) => {
|
|
529
537
|
const key = await this.session.modelRegistry.getApiKey(model);
|
|
@@ -1189,6 +1197,11 @@ export class InteractiveMode {
|
|
|
1189
1197
|
this.editor.setText("");
|
|
1190
1198
|
return;
|
|
1191
1199
|
}
|
|
1200
|
+
if (text === "/name" || text.startsWith("/name ")) {
|
|
1201
|
+
this.handleNameCommand(text);
|
|
1202
|
+
this.editor.setText("");
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1192
1205
|
if (text === "/session") {
|
|
1193
1206
|
this.handleSessionCommand();
|
|
1194
1207
|
this.editor.setText("");
|
|
@@ -1977,6 +1990,9 @@ export class InteractiveMode {
|
|
|
1977
1990
|
const text = theme.fg("dim", `Follow-up: ${message}`);
|
|
1978
1991
|
this.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));
|
|
1979
1992
|
}
|
|
1993
|
+
const dequeueHint = this.getAppKeyDisplay("dequeue");
|
|
1994
|
+
const hintText = theme.fg("dim", `↳ ${dequeueHint} to edit all queued messages`);
|
|
1995
|
+
this.pendingMessagesContainer.addChild(new TruncatedText(hintText, 1, 0));
|
|
1980
1996
|
}
|
|
1981
1997
|
}
|
|
1982
1998
|
restoreQueuedMessagesToEditor(options) {
|
|
@@ -2783,9 +2799,32 @@ export class InteractiveMode {
|
|
|
2783
2799
|
this.showError(error instanceof Error ? error.message : String(error));
|
|
2784
2800
|
}
|
|
2785
2801
|
}
|
|
2802
|
+
handleNameCommand(text) {
|
|
2803
|
+
const name = text.replace(/^\/name\s*/, "").trim();
|
|
2804
|
+
if (!name) {
|
|
2805
|
+
const currentName = this.sessionManager.getSessionName();
|
|
2806
|
+
if (currentName) {
|
|
2807
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
2808
|
+
this.chatContainer.addChild(new Text(theme.fg("dim", `Session name: ${currentName}`), 1, 0));
|
|
2809
|
+
}
|
|
2810
|
+
else {
|
|
2811
|
+
this.showWarning("Usage: /name <name>");
|
|
2812
|
+
}
|
|
2813
|
+
this.ui.requestRender();
|
|
2814
|
+
return;
|
|
2815
|
+
}
|
|
2816
|
+
this.sessionManager.appendSessionInfo(name);
|
|
2817
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
2818
|
+
this.chatContainer.addChild(new Text(theme.fg("dim", `Session name set: ${name}`), 1, 0));
|
|
2819
|
+
this.ui.requestRender();
|
|
2820
|
+
}
|
|
2786
2821
|
handleSessionCommand() {
|
|
2787
2822
|
const stats = this.session.getSessionStats();
|
|
2823
|
+
const sessionName = this.sessionManager.getSessionName();
|
|
2788
2824
|
let info = `${theme.bold("Session Info")}\n\n`;
|
|
2825
|
+
if (sessionName) {
|
|
2826
|
+
info += `${theme.fg("dim", "Name:")} ${sessionName}\n`;
|
|
2827
|
+
}
|
|
2789
2828
|
info += `${theme.fg("dim", "File:")} ${stats.sessionFile ?? "In-memory"}\n`;
|
|
2790
2829
|
info += `${theme.fg("dim", "ID:")} ${stats.sessionId}\n\n`;
|
|
2791
2830
|
info += `${theme.bold("Messages")}\n`;
|