@dreb/coding-agent 2.36.1 → 2.38.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.
@@ -514,11 +514,20 @@ export class InteractiveMode {
514
514
  const settings = this.settingsManager.getTabTitleSettings();
515
515
  if (settings?.enabled === false)
516
516
  return;
517
+ // Don't auto-title a session that already has a name (e.g. resumed sessions).
518
+ // Auto-titling exists to name unnamed sessions; overwriting a user's/prior name
519
+ // with fresh context would be the cross-session confusion this guards against.
520
+ if (this.sessionManager.getSessionName())
521
+ return;
517
522
  this.tabTitleGenerator = new TabTitleGenerator(settings, {
518
523
  setTitle: (title) => this.ui.terminal.setTitle(title),
519
524
  setSessionName: (name) => {
525
+ // Re-check at fire time: a name may have been set between init and firing.
526
+ if (this.sessionManager.getSessionName())
527
+ return;
520
528
  this.session.setSessionName(name);
521
529
  },
530
+ getSessionName: () => this.sessionManager.getSessionName(),
522
531
  getMessages: () => this.session.state.messages,
523
532
  getModel: () => this.session.model,
524
533
  getModelRegistry: () => this.session.modelRegistry,
@@ -527,6 +536,9 @@ export class InteractiveMode {
527
536
  getBranch: () => this.footerDataProvider.getGitBranch(),
528
537
  getRepo: () => path.basename(process.cwd()),
529
538
  getCwd: () => process.cwd(),
539
+ onError: (err) => {
540
+ this.showError(`Tab title auto-generation failed: ${err instanceof Error ? err.message : String(err)}`);
541
+ },
530
542
  });
531
543
  }
532
544
  /**