@leanandmean/coding-agent 0.74.1-scramjet.14 → 0.74.1-scramjet.16
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/agent-session.d.ts +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +16 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.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 +28 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts +2 -0
- package/dist/utils/pi-user-agent.d.ts.map +1 -0
- package/dist/utils/pi-user-agent.js +5 -0
- package/dist/utils/pi-user-agent.js.map +1 -0
- package/dist/utils/user-agent.d.ts +2 -0
- package/dist/utils/user-agent.d.ts.map +1 -0
- package/dist/utils/user-agent.js +6 -0
- package/dist/utils/user-agent.js.map +1 -0
- package/package.json +1 -1
|
@@ -127,6 +127,8 @@ export class InteractiveMode {
|
|
|
127
127
|
loadingAnimation = undefined;
|
|
128
128
|
workingMessage = undefined;
|
|
129
129
|
workingVisible = true;
|
|
130
|
+
// SCRAMJET-DIVERGENCE: title provider for extension-owned terminal titles.
|
|
131
|
+
titleProvider = undefined;
|
|
130
132
|
workingIndicatorOptions = undefined;
|
|
131
133
|
defaultWorkingMessage = "Working...";
|
|
132
134
|
defaultHiddenThinkingLabel = "Thinking...";
|
|
@@ -497,6 +499,20 @@ export class InteractiveMode {
|
|
|
497
499
|
* Update terminal title with session name and cwd.
|
|
498
500
|
*/
|
|
499
501
|
updateTerminalTitle() {
|
|
502
|
+
// SCRAMJET-DIVERGENCE: delegate to title provider when set.
|
|
503
|
+
if (this.titleProvider) {
|
|
504
|
+
let title;
|
|
505
|
+
try {
|
|
506
|
+
title = this.titleProvider();
|
|
507
|
+
}
|
|
508
|
+
catch {
|
|
509
|
+
// Provider failed; fall through to default title
|
|
510
|
+
}
|
|
511
|
+
if (title !== undefined) {
|
|
512
|
+
this.ui.terminal.setTitle(title);
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
500
516
|
const cwdBasename = path.basename(this.sessionManager.getCwd());
|
|
501
517
|
const sessionName = this.sessionManager.getSessionName();
|
|
502
518
|
if (sessionName) {
|
|
@@ -1404,6 +1420,7 @@ export class InteractiveMode {
|
|
|
1404
1420
|
this.setCustomEditorComponent(undefined);
|
|
1405
1421
|
this.setupAutocompleteProvider();
|
|
1406
1422
|
this.defaultEditor.onExtensionShortcut = undefined;
|
|
1423
|
+
this.titleProvider = undefined;
|
|
1407
1424
|
this.updateTerminalTitle();
|
|
1408
1425
|
this.workingMessage = undefined;
|
|
1409
1426
|
this.workingVisible = true;
|
|
@@ -1546,6 +1563,10 @@ export class InteractiveMode {
|
|
|
1546
1563
|
setFooter: (factory) => this.setExtensionFooter(factory),
|
|
1547
1564
|
setHeader: (factory) => this.setExtensionHeader(factory),
|
|
1548
1565
|
setTitle: (title) => this.ui.terminal.setTitle(title),
|
|
1566
|
+
setTitleProvider: (provider) => {
|
|
1567
|
+
this.titleProvider = provider;
|
|
1568
|
+
this.updateTerminalTitle();
|
|
1569
|
+
},
|
|
1549
1570
|
custom: (factory, options) => this.showExtensionCustom(factory, options),
|
|
1550
1571
|
pasteToEditor: (text) => this.editor.handleInput(`\x1b[200~${text}\x1b[201~`),
|
|
1551
1572
|
setEditorText: (text) => this.editor.setText(text),
|
|
@@ -2374,7 +2395,13 @@ export class InteractiveMode {
|
|
|
2374
2395
|
// Show retry indicator
|
|
2375
2396
|
this.statusContainer.clear();
|
|
2376
2397
|
this.retryCountdown?.dispose();
|
|
2377
|
-
const retryMessage = (seconds) =>
|
|
2398
|
+
const retryMessage = (seconds) => {
|
|
2399
|
+
const base = `Retrying (${event.attempt}/${event.maxAttempts}) in ${seconds}s...`;
|
|
2400
|
+
const cumulative = event.cumulativeErrors && event.cumulativeErrors > 1
|
|
2401
|
+
? ` [${event.cumulativeErrors} total failures this prompt]`
|
|
2402
|
+
: "";
|
|
2403
|
+
return `${base}${cumulative} (${keyText("app.interrupt")} to cancel)`;
|
|
2404
|
+
};
|
|
2378
2405
|
this.retryLoader = new Loader(this.ui, (spinner) => theme.fg("warning", spinner), (text) => theme.fg("muted", text), retryMessage(Math.ceil(event.delayMs / 1000)));
|
|
2379
2406
|
this.retryCountdown = new CountdownTimer(event.delayMs, this.ui, (seconds) => {
|
|
2380
2407
|
this.retryLoader?.setMessage(retryMessage(seconds));
|