erosolar-cli 1.7.252 → 1.7.253

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.
Files changed (81) hide show
  1. package/README.md +22 -148
  2. package/dist/core/customCommands.d.ts +1 -0
  3. package/dist/core/customCommands.d.ts.map +1 -1
  4. package/dist/core/customCommands.js +3 -0
  5. package/dist/core/customCommands.js.map +1 -1
  6. package/dist/core/toolPreconditions.d.ts.map +1 -1
  7. package/dist/core/toolPreconditions.js +0 -14
  8. package/dist/core/toolPreconditions.js.map +1 -1
  9. package/dist/core/toolRuntime.d.ts.map +1 -1
  10. package/dist/core/toolRuntime.js +0 -5
  11. package/dist/core/toolRuntime.js.map +1 -1
  12. package/dist/core/toolValidation.d.ts.map +1 -1
  13. package/dist/core/toolValidation.js +14 -3
  14. package/dist/core/toolValidation.js.map +1 -1
  15. package/dist/mcp/sseClient.d.ts.map +1 -1
  16. package/dist/mcp/sseClient.js +9 -18
  17. package/dist/mcp/sseClient.js.map +1 -1
  18. package/dist/plugins/tools/build/buildPlugin.d.ts +0 -6
  19. package/dist/plugins/tools/build/buildPlugin.d.ts.map +1 -1
  20. package/dist/plugins/tools/build/buildPlugin.js +4 -10
  21. package/dist/plugins/tools/build/buildPlugin.js.map +1 -1
  22. package/dist/shell/interactiveShell.d.ts +10 -2
  23. package/dist/shell/interactiveShell.d.ts.map +1 -1
  24. package/dist/shell/interactiveShell.js +183 -31
  25. package/dist/shell/interactiveShell.js.map +1 -1
  26. package/dist/shell/terminalInput.d.ts +54 -124
  27. package/dist/shell/terminalInput.d.ts.map +1 -1
  28. package/dist/shell/terminalInput.js +356 -616
  29. package/dist/shell/terminalInput.js.map +1 -1
  30. package/dist/shell/terminalInputAdapter.d.ts +12 -15
  31. package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
  32. package/dist/shell/terminalInputAdapter.js +8 -22
  33. package/dist/shell/terminalInputAdapter.js.map +1 -1
  34. package/dist/ui/display.d.ts +19 -0
  35. package/dist/ui/display.d.ts.map +1 -1
  36. package/dist/ui/display.js +133 -2
  37. package/dist/ui/display.js.map +1 -1
  38. package/dist/ui/theme.d.ts.map +1 -1
  39. package/dist/ui/theme.js +6 -8
  40. package/dist/ui/theme.js.map +1 -1
  41. package/dist/ui/unified/layout.d.ts +1 -0
  42. package/dist/ui/unified/layout.d.ts.map +1 -1
  43. package/dist/ui/unified/layout.js +15 -25
  44. package/dist/ui/unified/layout.js.map +1 -1
  45. package/package.json +1 -1
  46. package/dist/core/aiFlowOptimizer.d.ts +0 -26
  47. package/dist/core/aiFlowOptimizer.d.ts.map +0 -1
  48. package/dist/core/aiFlowOptimizer.js +0 -31
  49. package/dist/core/aiFlowOptimizer.js.map +0 -1
  50. package/dist/core/aiOptimizationEngine.d.ts +0 -158
  51. package/dist/core/aiOptimizationEngine.d.ts.map +0 -1
  52. package/dist/core/aiOptimizationEngine.js +0 -428
  53. package/dist/core/aiOptimizationEngine.js.map +0 -1
  54. package/dist/core/aiOptimizationIntegration.d.ts +0 -93
  55. package/dist/core/aiOptimizationIntegration.d.ts.map +0 -1
  56. package/dist/core/aiOptimizationIntegration.js +0 -250
  57. package/dist/core/aiOptimizationIntegration.js.map +0 -1
  58. package/dist/core/enhancedErrorRecovery.d.ts +0 -100
  59. package/dist/core/enhancedErrorRecovery.d.ts.map +0 -1
  60. package/dist/core/enhancedErrorRecovery.js +0 -345
  61. package/dist/core/enhancedErrorRecovery.js.map +0 -1
  62. package/dist/shell/claudeCodeStreamHandler.d.ts +0 -145
  63. package/dist/shell/claudeCodeStreamHandler.d.ts.map +0 -1
  64. package/dist/shell/claudeCodeStreamHandler.js +0 -322
  65. package/dist/shell/claudeCodeStreamHandler.js.map +0 -1
  66. package/dist/shell/inputQueueManager.d.ts +0 -144
  67. package/dist/shell/inputQueueManager.d.ts.map +0 -1
  68. package/dist/shell/inputQueueManager.js +0 -290
  69. package/dist/shell/inputQueueManager.js.map +0 -1
  70. package/dist/shell/streamingOutputManager.d.ts +0 -115
  71. package/dist/shell/streamingOutputManager.d.ts.map +0 -1
  72. package/dist/shell/streamingOutputManager.js +0 -225
  73. package/dist/shell/streamingOutputManager.js.map +0 -1
  74. package/dist/ui/persistentPrompt.d.ts +0 -50
  75. package/dist/ui/persistentPrompt.d.ts.map +0 -1
  76. package/dist/ui/persistentPrompt.js +0 -92
  77. package/dist/ui/persistentPrompt.js.map +0 -1
  78. package/dist/ui/terminalUISchema.d.ts +0 -195
  79. package/dist/ui/terminalUISchema.d.ts.map +0 -1
  80. package/dist/ui/terminalUISchema.js +0 -113
  81. package/dist/ui/terminalUISchema.js.map +0 -1
@@ -1,16 +1,10 @@
1
- /**
2
- * Build Tool Plugin
3
- *
4
- * Provides build and test tools with AI-powered error analysis.
5
- * Auto-enabled by default for all coding sessions.
6
- */
7
1
  import { BuildCapabilityModule } from '../../../capabilities/buildCapability.js';
8
2
  export function createBuildToolPlugin() {
9
3
  return {
10
- id: 'tool.build.ai',
11
- description: 'Build and test execution with AI-powered error analysis.',
12
- targets: ['node', 'cloud'],
13
- create: (context) => {
4
+ id: 'tool.build.comprehensive',
5
+ description: 'Build and test tools with AI-powered error analysis.',
6
+ targets: ['node'],
7
+ create: async (context) => {
14
8
  return new BuildCapabilityModule({
15
9
  workingDir: context.workingDir,
16
10
  });
@@ -1 +1 @@
1
- {"version":3,"file":"buildPlugin.js","sourceRoot":"","sources":["../../../../src/plugins/tools/build/buildPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAGjF,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,EAAE,EAAE,eAAe;QACnB,WAAW,EAAE,0DAA0D;QACvE,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QAC1B,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;YAClB,OAAO,IAAI,qBAAqB,CAAC;gBAC/B,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"buildPlugin.js","sourceRoot":"","sources":["../../../../src/plugins/tools/build/buildPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,EAAE,EAAE,0BAA0B;QAC9B,WAAW,EAAE,sDAAsD;QACnE,OAAO,EAAE,CAAC,MAAM,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,OAA0B,EAAE,EAAE;YAC3C,OAAO,IAAI,qBAAqB,CAAC;gBAC/B,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -63,6 +63,7 @@ export declare class InteractiveShell {
63
63
  private readonly followUpQueue;
64
64
  private isDrainingQueue;
65
65
  private activeContextWindowTokens;
66
+ private latestTokenUsage;
66
67
  private readonly sessionPreferences;
67
68
  private autosaveEnabled;
68
69
  private autoContinueEnabled;
@@ -89,10 +90,12 @@ export declare class InteractiveShell {
89
90
  private statusLineState;
90
91
  private statusMessageOverride;
91
92
  private promptRefreshTimer;
93
+ private launchPaletteShown;
92
94
  constructor(config: ShellConfig);
93
95
  private initializeSessionHistory;
94
96
  private showSessionResumeNotice;
95
97
  start(initialPrompt?: string): Promise<void>;
98
+ private showLaunchCommandPalette;
96
99
  /**
97
100
  * TerminalInputAdapter submit handler
98
101
  */
@@ -171,8 +174,8 @@ export declare class InteractiveShell {
171
174
  */
172
175
  private ensureReadlineReady;
173
176
  /**
174
- * Log the user's prompt as a visible message in the conversation.
175
- * This creates a persistent log entry that remains visible during and after streaming.
177
+ * Keep submissions out of the transcript to preserve the persistent input area.
178
+ * The chat box already holds the user's prompt, so avoid echoing it into output.
176
179
  */
177
180
  private logUserPrompt;
178
181
  private requestPromptRefresh;
@@ -180,6 +183,7 @@ export declare class InteractiveShell {
180
183
  private startStreamingHeartbeat;
181
184
  private stopStreamingHeartbeat;
182
185
  private buildStreamingStatus;
186
+ private formatElapsedShort;
183
187
  private refreshQueueIndicators;
184
188
  private enqueueFollowUpAction;
185
189
  private scheduleQueueProcessing;
@@ -233,6 +237,10 @@ export declare class InteractiveShell {
233
237
  private describeWorkspaceOptions;
234
238
  private describeContextOverrideUsage;
235
239
  private describeToolWarning;
240
+ private buildLaunchCommandPalette;
241
+ private summarizeSecretsForPalette;
242
+ private getToolSelectionSummary;
243
+ private formatList;
236
244
  private buildSlashCommandList;
237
245
  private showModelMenu;
238
246
  private buildProviderOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"interactiveShell.d.ts","sourceRoot":"","sources":["../../src/shell/interactiveShell.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAiCtE,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EAAE,iBAAiB,EAAwB,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAyB,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAkCtF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAOxD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,cAAc,CAAC;IAC7B,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,aAAa,EAAE,iBAAiB,CAAC;IACjC,EAAE,EAAE,cAAc,CAAC;IACnB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,cAAc,CA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IvB,OAAO,CAAC,4BAA4B;IAUpC,OAAO,CAAC,wBAAwB;IAoBhC,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,qBAAqB;IAyB7B,OAAO,CAAC,qBAAqB;IAuB7B,OAAO,CAAC,wBAAwB;IAUhC;;OAEG;YACW,qBAAqB;IA6DnC;;OAEG;YACW,qBAAqB;IAyCnC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA0B/B;;OAEG;YACW,kBAAkB;IAyBhC;;OAEG;YACW,kBAAkB;IA6EhC;;OAEG;IACH,OAAO,CAAC,aAAa;IAsBrB;;;OAGG;IACH,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC;QACjC,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,GAAG,IAAI;IAIT;;;OAGG;IACH,OAAO,CAAC,oBAAoB;CAG7B"}
@@ -2,7 +2,7 @@ import { stdin as input, stdout as output, exit } from 'node:process';
2
2
  import { exec } from 'node:child_process';
3
3
  import { promisify } from 'node:util';
4
4
  import { display } from '../ui/display.js';
5
- import { theme, formatUserPrompt } from '../ui/theme.js';
5
+ import { theme } from '../ui/theme.js';
6
6
  import { getContextWindowTokens } from '../core/contextWindow.js';
7
7
  import { ensureSecretForProvider, getSecretDefinitionForProvider, getSecretValue, listSecretDefinitions, maskSecret, setSecretValue, } from '../core/secretStore.js';
8
8
  import { saveActiveProfilePreference, saveModelPreference, loadToolSettings, saveToolSettings, clearToolSettings, clearActiveProfilePreference, loadSessionPreferences, saveSessionPreferences, } from '../core/preferences.js';
@@ -34,6 +34,7 @@ const DROPDOWN_COLORS = [
34
34
  theme.success,
35
35
  theme.warning,
36
36
  ];
37
+ const STREAMING_SPINNER_FRAMES = ['◐', '◓', '◑', '◒'];
37
38
  // Load MODEL_PRESETS from centralized schema
38
39
  const MODEL_PRESETS = getModels().map((model) => ({
39
40
  id: model.id,
@@ -48,11 +49,13 @@ const MODEL_PRESETS = getModels().map((model) => ({
48
49
  const BASE_SLASH_COMMANDS = getSlashCommands().map((cmd) => ({
49
50
  command: cmd.command,
50
51
  description: cmd.description,
52
+ category: cmd.category,
51
53
  }));
52
54
  // Load PROVIDER_LABELS from centralized schema
53
55
  const PROVIDER_LABELS = Object.fromEntries(getProviders().map((provider) => [provider.id, provider.label]));
54
56
  // Allow enough time for paste detection to kick in before flushing buffered lines
55
57
  const CONTEXT_USAGE_THRESHOLD = 0.9;
58
+ const CONTEXT_AUTOCOMPACT_PERCENT = Math.round(CONTEXT_USAGE_THRESHOLD * 100);
56
59
  const CONTEXT_RECENT_MESSAGE_COUNT = 12;
57
60
  const CONTEXT_CLEANUP_CHARS_PER_CHUNK = 6000;
58
61
  const CONTEXT_CLEANUP_MAX_OUTPUT_TOKENS = 800;
@@ -98,6 +101,7 @@ export class InteractiveShell {
98
101
  followUpQueue = [];
99
102
  isDrainingQueue = false;
100
103
  activeContextWindowTokens = null;
104
+ latestTokenUsage = { used: null, limit: null };
101
105
  sessionPreferences;
102
106
  autosaveEnabled;
103
107
  autoContinueEnabled;
@@ -128,6 +132,7 @@ export class InteractiveShell {
128
132
  statusLineState = null;
129
133
  statusMessageOverride = null;
130
134
  promptRefreshTimer = null;
135
+ launchPaletteShown = false;
131
136
  constructor(config) {
132
137
  this.profile = config.profile;
133
138
  this.profileLabel = config.profileLabel;
@@ -161,6 +166,7 @@ export class InteractiveShell {
161
166
  this.slashCommands.push({
162
167
  command: '/agents',
163
168
  description: 'Select the default agent profile (applies on next launch)',
169
+ category: 'configuration',
164
170
  });
165
171
  }
166
172
  this.customCommands = loadCustomSlashCommands();
@@ -169,18 +175,21 @@ export class InteractiveShell {
169
175
  this.slashCommands.push({
170
176
  command: custom.command,
171
177
  description: `${custom.description} (custom)`,
178
+ category: custom.category ?? 'other',
172
179
  });
173
180
  }
174
181
  if (!this.slashCommands.some((cmd) => cmd.command === '/exit')) {
175
182
  this.slashCommands.push({
176
183
  command: '/exit',
177
184
  description: 'Quit the CLI immediately',
185
+ category: 'other',
178
186
  });
179
187
  }
180
188
  // Add /plugins command
181
189
  this.slashCommands.push({
182
190
  command: '/plugins',
183
191
  description: 'Show available and loaded plugins',
192
+ category: 'configuration',
184
193
  });
185
194
  this.statusTracker = config.statusTracker;
186
195
  this.ui = config.ui;
@@ -215,9 +224,6 @@ export class InteractiveShell {
215
224
  });
216
225
  // Register output interceptor for cursor positioning during streaming
217
226
  this.terminalInput.registerOutputInterceptor(display);
218
- // Use flow mode: input renders inline after content for a unified layout
219
- // This eliminates the blank space between banner and input area
220
- this.terminalInput.setFlowMode(true);
221
227
  // Initialize Alpha Zero 2 metrics tracking
222
228
  this.alphaZeroMetrics = new MetricsTracker(`${this.profile}-${Date.now()}`);
223
229
  this.setupStatusTracking();
@@ -275,9 +281,24 @@ export class InteractiveShell {
275
281
  await this.processInputBlock(initialPrompt);
276
282
  return;
277
283
  }
284
+ this.showLaunchCommandPalette();
278
285
  // Ensure the terminal input is visible
279
286
  this.terminalInput.render();
280
287
  }
288
+ showLaunchCommandPalette() {
289
+ if (this.launchPaletteShown) {
290
+ return;
291
+ }
292
+ const palette = this.buildLaunchCommandPalette();
293
+ if (!palette.length) {
294
+ return;
295
+ }
296
+ display.showCommandPalette(palette, {
297
+ title: 'Quick commands',
298
+ intro: 'Describe a task or run a slash command to get started:',
299
+ });
300
+ this.launchPaletteShown = true;
301
+ }
281
302
  /**
282
303
  * TerminalInputAdapter submit handler
283
304
  */
@@ -291,9 +312,8 @@ export class InteractiveShell {
291
312
  this.handleInputChange('');
292
313
  return;
293
314
  }
294
- // Enter streaming mode BEFORE logging prompt - this positions cursor correctly
295
- // so content appears right after the banner, not at bottom with blank space above
296
- this.terminalInput.setStreaming(true);
315
+ // DON'T clear the input here - keep it visible while streaming.
316
+ // The input will be cleared after streaming completes in the finally block.
297
317
  this.logUserPrompt(approved);
298
318
  void this.processInputBlock(approved).catch((err) => {
299
319
  display.showError(err instanceof Error ? err.message : String(err), err);
@@ -495,10 +515,9 @@ export class InteractiveShell {
495
515
  // Dispose unified UI adapter
496
516
  this.uiAdapter.dispose();
497
517
  display.newLine();
498
- console.log(theme.gradient.warm('━'.repeat(50)));
499
- console.log(` ${theme.gradient.cool('Goodbye!')} ${theme.ui.muted('·')} ${theme.info('support@ero.solar')}`);
500
- console.log(` ${theme.ui.muted('Read:')} ${theme.accent('anthropic.com/news/disrupting-AI-espionage')}`);
501
- console.log(theme.gradient.warm('━'.repeat(50)));
518
+ console.log(theme.ui.muted('━'.repeat(44)));
519
+ console.log(theme.ui.muted(' Goodbye! · support@ero.solar'));
520
+ console.log(theme.ui.muted(''.repeat(44)));
502
521
  exit(0);
503
522
  }
504
523
  /**
@@ -668,6 +687,7 @@ export class InteractiveShell {
668
687
  });
669
688
  }
670
689
  setProcessingStatus(detail) {
690
+ this.latestTokenUsage = { used: null, limit: this.latestTokenUsage.limit };
671
691
  this.statusTracker.setBase('Working on your request', {
672
692
  detail: this.describeStatusDetail(detail),
673
693
  tone: 'info',
@@ -687,12 +707,18 @@ export class InteractiveShell {
687
707
  }
688
708
  refreshContextGauge() {
689
709
  const tokens = getContextWindowTokens(this.sessionState.model);
690
- this.activeContextWindowTokens =
691
- typeof tokens === 'number' && Number.isFinite(tokens) ? tokens : null;
710
+ const normalizedTokens = typeof tokens === 'number' && Number.isFinite(tokens) ? tokens : null;
711
+ this.activeContextWindowTokens = normalizedTokens;
712
+ if (normalizedTokens !== null) {
713
+ this.latestTokenUsage = {
714
+ used: this.latestTokenUsage.used,
715
+ limit: normalizedTokens,
716
+ };
717
+ }
692
718
  }
693
719
  updateContextUsage(percentage) {
694
720
  this.uiAdapter.updateContextUsage(percentage);
695
- this.terminalInput.setContextUsage(percentage);
721
+ this.terminalInput.setContextUsage(percentage, CONTEXT_AUTOCOMPACT_PERCENT);
696
722
  }
697
723
  refreshControlBar() {
698
724
  this.terminalInput.setModeToggles({
@@ -700,6 +726,7 @@ export class InteractiveShell {
700
726
  autoContinueEnabled: this.autoContinueEnabled,
701
727
  verificationHotkey: 'alt+v',
702
728
  autoContinueHotkey: 'alt+c',
729
+ thinkingModeLabel: this.thinkingMode,
703
730
  });
704
731
  this.refreshStatusLine();
705
732
  this.terminalInput.render();
@@ -731,6 +758,20 @@ export class InteractiveShell {
731
758
  // Set main status (tool execution, etc.) - shown when not overridden
732
759
  const statusText = this.formatStatusLine(this.statusLineState);
733
760
  this.terminalInput.setStatusMessage(statusText);
761
+ // Surface meta header (elapsed + context usage) above the divider
762
+ const elapsedSeconds = this.statusLineState
763
+ ? Math.max(0, Math.floor((Date.now() - this.statusLineState.startedAt) / 1000))
764
+ : null;
765
+ const thinkingMs = display.isSpinnerActive() ? display.getThinkingElapsedMs() : null;
766
+ const tokensUsed = this.latestTokenUsage.used;
767
+ const tokenLimit = this.latestTokenUsage.limit ?? this.activeContextWindowTokens;
768
+ this.terminalInput.setMetaStatus({
769
+ elapsedSeconds,
770
+ tokensUsed,
771
+ tokenLimit,
772
+ thinkingMs,
773
+ thinkingHasContent: display.isSpinnerActive(),
774
+ });
734
775
  if (forceRender) {
735
776
  this.terminalInput.render();
736
777
  }
@@ -790,13 +831,11 @@ export class InteractiveShell {
790
831
  this.terminalInput.render();
791
832
  }
792
833
  /**
793
- * Log the user's prompt as a visible message in the conversation.
794
- * This creates a persistent log entry that remains visible during and after streaming.
834
+ * Keep submissions out of the transcript to preserve the persistent input area.
835
+ * The chat box already holds the user's prompt, so avoid echoing it into output.
795
836
  */
796
- logUserPrompt(text) {
797
- // Display the user's prompt with the standard prefix
798
- const prefix = formatUserPrompt();
799
- display.stream(`\n${prefix}${text}\n\n`);
837
+ logUserPrompt(_text) {
838
+ // Intentionally no-op to keep the input area persistent and uncluttered.
800
839
  }
801
840
  requestPromptRefresh(force = false) {
802
841
  if (force) {
@@ -824,9 +863,29 @@ export class InteractiveShell {
824
863
  this.uiUpdates.setMode('streaming');
825
864
  this.streamingHeartbeatStart = Date.now();
826
865
  this.streamingHeartbeatFrame = 0;
827
- // Note: We don't start a heartbeat during streaming anymore
828
- // because the UI shouldn't be rendering during streaming.
829
- // The streaming status is shown in the streaming header instead.
866
+ const initialFrame = STREAMING_SPINNER_FRAMES[this.streamingHeartbeatFrame];
867
+ this.streamingStatusLabel = this.buildStreamingStatus(`${initialFrame} ${label}`, 0);
868
+ display.updateStreamingStatus(this.streamingStatusLabel);
869
+ this.refreshStatusLine(true);
870
+ // Periodically refresh the pinned input/status region while streaming so
871
+ // elapsed time remains visible without interrupting the scroll region.
872
+ this.uiUpdates.startHeartbeat('streaming', {
873
+ intervalMs: 1000,
874
+ lane: 'heartbeat',
875
+ mode: ['streaming', 'processing'],
876
+ coalesceKey: 'streaming:heartbeat',
877
+ run: () => {
878
+ const elapsedSeconds = this.streamingHeartbeatStart
879
+ ? Math.max(0, Math.floor((Date.now() - this.streamingHeartbeatStart) / 1000))
880
+ : 0;
881
+ this.streamingHeartbeatFrame =
882
+ (this.streamingHeartbeatFrame + 1) % STREAMING_SPINNER_FRAMES.length;
883
+ const frame = STREAMING_SPINNER_FRAMES[this.streamingHeartbeatFrame];
884
+ this.streamingStatusLabel = this.buildStreamingStatus(`${frame} ${label}`, elapsedSeconds);
885
+ display.updateStreamingStatus(this.streamingStatusLabel);
886
+ this.refreshStatusLine(true);
887
+ },
888
+ });
830
889
  }
831
890
  stopStreamingHeartbeat() {
832
891
  // Exit global streaming mode - allows UI to render again
@@ -842,10 +901,28 @@ export class InteractiveShell {
842
901
  // Force refresh to update the input area now that streaming has ended
843
902
  this.refreshStatusLine(true);
844
903
  }
845
- buildStreamingStatus(label) {
904
+ buildStreamingStatus(label, elapsedSeconds) {
846
905
  const detail = this.describeModelDetail();
847
- const prefix = theme.info('');
848
- return detail ? `${prefix} ${label} ${theme.ui.muted('·')} ${detail}` : `${prefix} ${label}`;
906
+ const elapsedLabel = typeof elapsedSeconds === 'number' && elapsedSeconds >= 0
907
+ ? theme.ui.muted(this.formatElapsedShort(elapsedSeconds))
908
+ : null;
909
+ const prefix = theme.info('⏺');
910
+ const parts = [label];
911
+ if (detail) {
912
+ parts.push(theme.ui.muted('·'), detail);
913
+ }
914
+ if (elapsedLabel) {
915
+ parts.push(theme.ui.muted('·'), elapsedLabel);
916
+ }
917
+ return `${prefix} ${parts.join(' ')}`.trim();
918
+ }
919
+ formatElapsedShort(seconds) {
920
+ if (seconds < 60) {
921
+ return `${seconds}s`;
922
+ }
923
+ const minutes = Math.floor(seconds / 60);
924
+ const remaining = seconds % 60;
925
+ return remaining > 0 ? `${minutes}m ${remaining}s` : `${minutes}m`;
849
926
  }
850
927
  refreshQueueIndicators() {
851
928
  if (this.isProcessing) {
@@ -1739,6 +1816,75 @@ export class InteractiveShell {
1739
1816
  }
1740
1817
  return `${warning.label}: ${warning.reason}.`;
1741
1818
  }
1819
+ buildLaunchCommandPalette() {
1820
+ const entries = [];
1821
+ const secretsSummary = this.summarizeSecretsForPalette();
1822
+ const toolSummary = this.getToolSelectionSummary();
1823
+ const autosaveLabel = this.autosaveEnabled ? 'on' : 'off';
1824
+ for (const command of this.slashCommands) {
1825
+ const entry = {
1826
+ command: command.command,
1827
+ description: command.description,
1828
+ category: command.category ?? 'other',
1829
+ };
1830
+ switch (command.command) {
1831
+ case '/secrets':
1832
+ if (secretsSummary.text) {
1833
+ entry.description = `${command.description} (${secretsSummary.text})`;
1834
+ entry.tone = secretsSummary.tone;
1835
+ }
1836
+ break;
1837
+ case '/tools':
1838
+ if (toolSummary) {
1839
+ entry.description = `${command.description} (${toolSummary})`;
1840
+ }
1841
+ break;
1842
+ case '/sessions':
1843
+ entry.description = `${command.description} (autosave ${autosaveLabel})`;
1844
+ break;
1845
+ case '/model':
1846
+ entry.description = `${command.description} (current: ${this.sessionState.model})`;
1847
+ break;
1848
+ case '/provider':
1849
+ entry.description = `${command.description} (current: ${this.providerLabel(this.sessionState.provider)})`;
1850
+ break;
1851
+ default:
1852
+ break;
1853
+ }
1854
+ entries.push(entry);
1855
+ }
1856
+ return entries;
1857
+ }
1858
+ summarizeSecretsForPalette() {
1859
+ const definitions = listSecretDefinitions();
1860
+ if (!definitions.length) {
1861
+ return { text: null };
1862
+ }
1863
+ const missing = definitions.filter((definition) => !getSecretValue(definition.id));
1864
+ if (missing.length === 0) {
1865
+ return { text: 'all configured', tone: 'success' };
1866
+ }
1867
+ const labels = missing.map((definition) => definition.label ?? definition.id);
1868
+ return { text: `missing ${this.formatList(labels)}`, tone: 'warn' };
1869
+ }
1870
+ getToolSelectionSummary() {
1871
+ const toolSettings = loadToolSettings();
1872
+ const selection = buildEnabledToolSet(toolSettings);
1873
+ const options = getToolToggleOptions();
1874
+ if (!options.length) {
1875
+ return null;
1876
+ }
1877
+ const enabledCount = options.filter((option) => selection.has(option.id)).length;
1878
+ return `${enabledCount}/${options.length} enabled`;
1879
+ }
1880
+ formatList(values, maxItems = 3) {
1881
+ if (!values.length) {
1882
+ return '';
1883
+ }
1884
+ const shown = values.slice(0, maxItems);
1885
+ const suffix = values.length > maxItems ? ', …' : '';
1886
+ return `${shown.join(', ')}${suffix}`;
1887
+ }
1742
1888
  buildSlashCommandList(header) {
1743
1889
  const lines = [theme.gradient.primary(header), ''];
1744
1890
  for (const command of this.slashCommands) {
@@ -2308,6 +2454,7 @@ When truly finished with ALL tasks, explicitly state "TASK_FULLY_COMPLETE".`;
2308
2454
  try {
2309
2455
  // Send the request and capture the response (streaming disabled)
2310
2456
  display.showThinking('Responding...');
2457
+ this.refreshStatusLine(true);
2311
2458
  const response = await agent.send(currentPrompt, true);
2312
2459
  await this.awaitPendingCleanup();
2313
2460
  this.captureHistorySnapshot();
@@ -2807,8 +2954,10 @@ What's the next action?`;
2807
2954
  try {
2808
2955
  // Send the error to the agent for fixing
2809
2956
  display.showThinking('Analyzing build errors');
2957
+ this.refreshStatusLine(true);
2810
2958
  const response = await this.agent.send(prompt, true);
2811
2959
  display.stopThinking();
2960
+ this.refreshStatusLine(true);
2812
2961
  if (response) {
2813
2962
  display.showAssistantMessage(response, { isFinal: true });
2814
2963
  }
@@ -2858,18 +3007,16 @@ What's the next action?`;
2858
3007
  display.showAssistantMessage(finalContent, enriched);
2859
3008
  }
2860
3009
  }
2861
- // Show status line at end (Claude Code style: "• Context X% used • Ready for prompts (2s)")
3010
+ // Status shown in mode controls bar - no separate status line needed
2862
3011
  display.stopThinking();
2863
- // Calculate context usage
2864
- let contextInfo;
3012
+ // Update context usage for mode controls display
2865
3013
  if (enriched.contextWindowTokens && metadata.usage) {
2866
3014
  const total = this.totalTokens(metadata.usage);
2867
3015
  if (total && total > 0) {
2868
3016
  const percentage = Math.round((total / enriched.contextWindowTokens) * 100);
2869
- contextInfo = { percentage, tokens: total };
3017
+ this.updateContextUsage(percentage);
2870
3018
  }
2871
3019
  }
2872
- display.showStatusLine('Ready for prompts', enriched.elapsedMs, contextInfo);
2873
3020
  // Auto-verify changes: build first (catches type errors), then tests
2874
3021
  void this.enforceAutoBuild('final-response');
2875
3022
  void this.enforceAutoTests('final-response');
@@ -3039,9 +3186,14 @@ What's the next action?`;
3039
3186
  return null;
3040
3187
  }
3041
3188
  const usageRatio = total / windowTokens;
3189
+ this.latestTokenUsage = {
3190
+ used: total,
3191
+ limit: windowTokens,
3192
+ };
3042
3193
  // Always update context usage in the UI
3043
3194
  const percentUsed = Math.round(usageRatio * 100);
3044
3195
  this.updateContextUsage(percentUsed);
3196
+ this.refreshStatusLine(true);
3045
3197
  if (usageRatio < CONTEXT_USAGE_THRESHOLD) {
3046
3198
  return null;
3047
3199
  }