@leanandmean/coding-agent 0.74.1-scramjet.15 → 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.
@@ -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),