erosolar-cli 1.7.243 → 1.7.245
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/README.md +22 -148
- package/dist/core/customCommands.d.ts +1 -0
- package/dist/core/customCommands.d.ts.map +1 -1
- package/dist/core/customCommands.js +3 -0
- package/dist/core/customCommands.js.map +1 -1
- package/dist/core/toolPreconditions.d.ts.map +1 -1
- package/dist/core/toolPreconditions.js +0 -14
- package/dist/core/toolPreconditions.js.map +1 -1
- package/dist/core/toolRuntime.d.ts.map +1 -1
- package/dist/core/toolRuntime.js +0 -5
- package/dist/core/toolRuntime.js.map +1 -1
- package/dist/core/toolValidation.d.ts.map +1 -1
- package/dist/core/toolValidation.js +14 -3
- package/dist/core/toolValidation.js.map +1 -1
- package/dist/mcp/sseClient.d.ts.map +1 -1
- package/dist/mcp/sseClient.js +9 -18
- package/dist/mcp/sseClient.js.map +1 -1
- package/dist/plugins/tools/build/buildPlugin.d.ts +0 -6
- package/dist/plugins/tools/build/buildPlugin.d.ts.map +1 -1
- package/dist/plugins/tools/build/buildPlugin.js +4 -10
- package/dist/plugins/tools/build/buildPlugin.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +9 -2
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +133 -17
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/terminalInput.d.ts +46 -117
- package/dist/shell/terminalInput.d.ts.map +1 -1
- package/dist/shell/terminalInput.js +312 -541
- package/dist/shell/terminalInput.js.map +1 -1
- package/dist/shell/terminalInputAdapter.d.ts +12 -15
- package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
- package/dist/shell/terminalInputAdapter.js +8 -22
- package/dist/shell/terminalInputAdapter.js.map +1 -1
- package/dist/ui/display.d.ts +19 -0
- package/dist/ui/display.d.ts.map +1 -1
- package/dist/ui/display.js +108 -0
- package/dist/ui/display.js.map +1 -1
- package/dist/ui/theme.d.ts.map +1 -1
- package/dist/ui/theme.js +6 -8
- package/dist/ui/theme.js.map +1 -1
- package/dist/ui/unified/layout.d.ts +1 -0
- package/dist/ui/unified/layout.d.ts.map +1 -1
- package/dist/ui/unified/layout.js +52 -25
- package/dist/ui/unified/layout.js.map +1 -1
- package/package.json +1 -1
- package/dist/core/aiFlowOptimizer.d.ts +0 -26
- package/dist/core/aiFlowOptimizer.d.ts.map +0 -1
- package/dist/core/aiFlowOptimizer.js +0 -31
- package/dist/core/aiFlowOptimizer.js.map +0 -1
- package/dist/core/aiOptimizationEngine.d.ts +0 -158
- package/dist/core/aiOptimizationEngine.d.ts.map +0 -1
- package/dist/core/aiOptimizationEngine.js +0 -428
- package/dist/core/aiOptimizationEngine.js.map +0 -1
- package/dist/core/aiOptimizationIntegration.d.ts +0 -93
- package/dist/core/aiOptimizationIntegration.d.ts.map +0 -1
- package/dist/core/aiOptimizationIntegration.js +0 -250
- package/dist/core/aiOptimizationIntegration.js.map +0 -1
- package/dist/core/enhancedErrorRecovery.d.ts +0 -100
- package/dist/core/enhancedErrorRecovery.d.ts.map +0 -1
- package/dist/core/enhancedErrorRecovery.js +0 -345
- package/dist/core/enhancedErrorRecovery.js.map +0 -1
- package/dist/shell/claudeCodeStreamHandler.d.ts +0 -145
- package/dist/shell/claudeCodeStreamHandler.d.ts.map +0 -1
- package/dist/shell/claudeCodeStreamHandler.js +0 -322
- package/dist/shell/claudeCodeStreamHandler.js.map +0 -1
- package/dist/shell/inputQueueManager.d.ts +0 -144
- package/dist/shell/inputQueueManager.d.ts.map +0 -1
- package/dist/shell/inputQueueManager.js +0 -290
- package/dist/shell/inputQueueManager.js.map +0 -1
- package/dist/shell/streamingOutputManager.d.ts +0 -115
- package/dist/shell/streamingOutputManager.d.ts.map +0 -1
- package/dist/shell/streamingOutputManager.js +0 -225
- package/dist/shell/streamingOutputManager.js.map +0 -1
- package/dist/ui/persistentPrompt.d.ts +0 -50
- package/dist/ui/persistentPrompt.d.ts.map +0 -1
- package/dist/ui/persistentPrompt.js +0 -92
- package/dist/ui/persistentPrompt.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.
|
|
11
|
-
description: 'Build and test
|
|
12
|
-
targets: ['node'
|
|
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":"
|
|
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
|
-
*
|
|
175
|
-
*
|
|
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;
|
|
@@ -233,6 +236,10 @@ export declare class InteractiveShell {
|
|
|
233
236
|
private describeWorkspaceOptions;
|
|
234
237
|
private describeContextOverrideUsage;
|
|
235
238
|
private describeToolWarning;
|
|
239
|
+
private buildLaunchCommandPalette;
|
|
240
|
+
private summarizeSecretsForPalette;
|
|
241
|
+
private getToolSelectionSummary;
|
|
242
|
+
private formatList;
|
|
236
243
|
private buildSlashCommandList;
|
|
237
244
|
private showModelMenu;
|
|
238
245
|
private buildProviderOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactiveShell.d.ts","sourceRoot":"","sources":["../../src/shell/interactiveShell.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE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AAC,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
|
|
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';
|
|
@@ -48,11 +48,13 @@ const MODEL_PRESETS = getModels().map((model) => ({
|
|
|
48
48
|
const BASE_SLASH_COMMANDS = getSlashCommands().map((cmd) => ({
|
|
49
49
|
command: cmd.command,
|
|
50
50
|
description: cmd.description,
|
|
51
|
+
category: cmd.category,
|
|
51
52
|
}));
|
|
52
53
|
// Load PROVIDER_LABELS from centralized schema
|
|
53
54
|
const PROVIDER_LABELS = Object.fromEntries(getProviders().map((provider) => [provider.id, provider.label]));
|
|
54
55
|
// Allow enough time for paste detection to kick in before flushing buffered lines
|
|
55
56
|
const CONTEXT_USAGE_THRESHOLD = 0.9;
|
|
57
|
+
const CONTEXT_AUTOCOMPACT_PERCENT = Math.round(CONTEXT_USAGE_THRESHOLD * 100);
|
|
56
58
|
const CONTEXT_RECENT_MESSAGE_COUNT = 12;
|
|
57
59
|
const CONTEXT_CLEANUP_CHARS_PER_CHUNK = 6000;
|
|
58
60
|
const CONTEXT_CLEANUP_MAX_OUTPUT_TOKENS = 800;
|
|
@@ -98,6 +100,7 @@ export class InteractiveShell {
|
|
|
98
100
|
followUpQueue = [];
|
|
99
101
|
isDrainingQueue = false;
|
|
100
102
|
activeContextWindowTokens = null;
|
|
103
|
+
latestTokenUsage = { used: null, limit: null };
|
|
101
104
|
sessionPreferences;
|
|
102
105
|
autosaveEnabled;
|
|
103
106
|
autoContinueEnabled;
|
|
@@ -128,6 +131,7 @@ export class InteractiveShell {
|
|
|
128
131
|
statusLineState = null;
|
|
129
132
|
statusMessageOverride = null;
|
|
130
133
|
promptRefreshTimer = null;
|
|
134
|
+
launchPaletteShown = false;
|
|
131
135
|
constructor(config) {
|
|
132
136
|
this.profile = config.profile;
|
|
133
137
|
this.profileLabel = config.profileLabel;
|
|
@@ -161,6 +165,7 @@ export class InteractiveShell {
|
|
|
161
165
|
this.slashCommands.push({
|
|
162
166
|
command: '/agents',
|
|
163
167
|
description: 'Select the default agent profile (applies on next launch)',
|
|
168
|
+
category: 'configuration',
|
|
164
169
|
});
|
|
165
170
|
}
|
|
166
171
|
this.customCommands = loadCustomSlashCommands();
|
|
@@ -169,18 +174,21 @@ export class InteractiveShell {
|
|
|
169
174
|
this.slashCommands.push({
|
|
170
175
|
command: custom.command,
|
|
171
176
|
description: `${custom.description} (custom)`,
|
|
177
|
+
category: custom.category ?? 'other',
|
|
172
178
|
});
|
|
173
179
|
}
|
|
174
180
|
if (!this.slashCommands.some((cmd) => cmd.command === '/exit')) {
|
|
175
181
|
this.slashCommands.push({
|
|
176
182
|
command: '/exit',
|
|
177
183
|
description: 'Quit the CLI immediately',
|
|
184
|
+
category: 'other',
|
|
178
185
|
});
|
|
179
186
|
}
|
|
180
187
|
// Add /plugins command
|
|
181
188
|
this.slashCommands.push({
|
|
182
189
|
command: '/plugins',
|
|
183
190
|
description: 'Show available and loaded plugins',
|
|
191
|
+
category: 'configuration',
|
|
184
192
|
});
|
|
185
193
|
this.statusTracker = config.statusTracker;
|
|
186
194
|
this.ui = config.ui;
|
|
@@ -215,9 +223,6 @@ export class InteractiveShell {
|
|
|
215
223
|
});
|
|
216
224
|
// Register output interceptor for cursor positioning during streaming
|
|
217
225
|
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
226
|
// Initialize Alpha Zero 2 metrics tracking
|
|
222
227
|
this.alphaZeroMetrics = new MetricsTracker(`${this.profile}-${Date.now()}`);
|
|
223
228
|
this.setupStatusTracking();
|
|
@@ -275,9 +280,24 @@ export class InteractiveShell {
|
|
|
275
280
|
await this.processInputBlock(initialPrompt);
|
|
276
281
|
return;
|
|
277
282
|
}
|
|
283
|
+
this.showLaunchCommandPalette();
|
|
278
284
|
// Ensure the terminal input is visible
|
|
279
285
|
this.terminalInput.render();
|
|
280
286
|
}
|
|
287
|
+
showLaunchCommandPalette() {
|
|
288
|
+
if (this.launchPaletteShown) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const palette = this.buildLaunchCommandPalette();
|
|
292
|
+
if (!palette.length) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
display.showCommandPalette(palette, {
|
|
296
|
+
title: 'Quick commands',
|
|
297
|
+
intro: 'Describe a task or run a slash command to get started:',
|
|
298
|
+
});
|
|
299
|
+
this.launchPaletteShown = true;
|
|
300
|
+
}
|
|
281
301
|
/**
|
|
282
302
|
* TerminalInputAdapter submit handler
|
|
283
303
|
*/
|
|
@@ -291,9 +311,8 @@ export class InteractiveShell {
|
|
|
291
311
|
this.handleInputChange('');
|
|
292
312
|
return;
|
|
293
313
|
}
|
|
294
|
-
//
|
|
295
|
-
//
|
|
296
|
-
this.terminalInput.setStreaming(true);
|
|
314
|
+
// DON'T clear the input here - keep it visible while streaming.
|
|
315
|
+
// The input will be cleared after streaming completes in the finally block.
|
|
297
316
|
this.logUserPrompt(approved);
|
|
298
317
|
void this.processInputBlock(approved).catch((err) => {
|
|
299
318
|
display.showError(err instanceof Error ? err.message : String(err), err);
|
|
@@ -496,7 +515,7 @@ export class InteractiveShell {
|
|
|
496
515
|
this.uiAdapter.dispose();
|
|
497
516
|
display.newLine();
|
|
498
517
|
console.log(theme.ui.muted('━'.repeat(44)));
|
|
499
|
-
console.log(theme.ui.muted(' Goodbye! ·
|
|
518
|
+
console.log(theme.ui.muted(' Goodbye! · support@ero.solar'));
|
|
500
519
|
console.log(theme.ui.muted('━'.repeat(44)));
|
|
501
520
|
exit(0);
|
|
502
521
|
}
|
|
@@ -667,6 +686,7 @@ export class InteractiveShell {
|
|
|
667
686
|
});
|
|
668
687
|
}
|
|
669
688
|
setProcessingStatus(detail) {
|
|
689
|
+
this.latestTokenUsage = { used: null, limit: this.latestTokenUsage.limit };
|
|
670
690
|
this.statusTracker.setBase('Working on your request', {
|
|
671
691
|
detail: this.describeStatusDetail(detail),
|
|
672
692
|
tone: 'info',
|
|
@@ -686,12 +706,18 @@ export class InteractiveShell {
|
|
|
686
706
|
}
|
|
687
707
|
refreshContextGauge() {
|
|
688
708
|
const tokens = getContextWindowTokens(this.sessionState.model);
|
|
689
|
-
|
|
690
|
-
|
|
709
|
+
const normalizedTokens = typeof tokens === 'number' && Number.isFinite(tokens) ? tokens : null;
|
|
710
|
+
this.activeContextWindowTokens = normalizedTokens;
|
|
711
|
+
if (normalizedTokens !== null) {
|
|
712
|
+
this.latestTokenUsage = {
|
|
713
|
+
used: this.latestTokenUsage.used,
|
|
714
|
+
limit: normalizedTokens,
|
|
715
|
+
};
|
|
716
|
+
}
|
|
691
717
|
}
|
|
692
718
|
updateContextUsage(percentage) {
|
|
693
719
|
this.uiAdapter.updateContextUsage(percentage);
|
|
694
|
-
this.terminalInput.setContextUsage(percentage);
|
|
720
|
+
this.terminalInput.setContextUsage(percentage, CONTEXT_AUTOCOMPACT_PERCENT);
|
|
695
721
|
}
|
|
696
722
|
refreshControlBar() {
|
|
697
723
|
this.terminalInput.setModeToggles({
|
|
@@ -699,6 +725,7 @@ export class InteractiveShell {
|
|
|
699
725
|
autoContinueEnabled: this.autoContinueEnabled,
|
|
700
726
|
verificationHotkey: 'alt+v',
|
|
701
727
|
autoContinueHotkey: 'alt+c',
|
|
728
|
+
thinkingModeLabel: this.thinkingMode,
|
|
702
729
|
});
|
|
703
730
|
this.refreshStatusLine();
|
|
704
731
|
this.terminalInput.render();
|
|
@@ -730,6 +757,20 @@ export class InteractiveShell {
|
|
|
730
757
|
// Set main status (tool execution, etc.) - shown when not overridden
|
|
731
758
|
const statusText = this.formatStatusLine(this.statusLineState);
|
|
732
759
|
this.terminalInput.setStatusMessage(statusText);
|
|
760
|
+
// Surface meta header (elapsed + context usage) above the divider
|
|
761
|
+
const elapsedSeconds = this.statusLineState
|
|
762
|
+
? Math.max(0, Math.floor((Date.now() - this.statusLineState.startedAt) / 1000))
|
|
763
|
+
: null;
|
|
764
|
+
const thinkingMs = display.isSpinnerActive() ? display.getThinkingElapsedMs() : null;
|
|
765
|
+
const tokensUsed = this.latestTokenUsage.used;
|
|
766
|
+
const tokenLimit = this.latestTokenUsage.limit ?? this.activeContextWindowTokens;
|
|
767
|
+
this.terminalInput.setMetaStatus({
|
|
768
|
+
elapsedSeconds,
|
|
769
|
+
tokensUsed,
|
|
770
|
+
tokenLimit,
|
|
771
|
+
thinkingMs,
|
|
772
|
+
thinkingHasContent: display.isSpinnerActive(),
|
|
773
|
+
});
|
|
733
774
|
if (forceRender) {
|
|
734
775
|
this.terminalInput.render();
|
|
735
776
|
}
|
|
@@ -789,13 +830,11 @@ export class InteractiveShell {
|
|
|
789
830
|
this.terminalInput.render();
|
|
790
831
|
}
|
|
791
832
|
/**
|
|
792
|
-
*
|
|
793
|
-
*
|
|
833
|
+
* Keep submissions out of the transcript to preserve the persistent input area.
|
|
834
|
+
* The chat box already holds the user's prompt, so avoid echoing it into output.
|
|
794
835
|
*/
|
|
795
|
-
logUserPrompt(
|
|
796
|
-
//
|
|
797
|
-
const prefix = formatUserPrompt();
|
|
798
|
-
display.stream(`\n${prefix}${text}\n\n`);
|
|
836
|
+
logUserPrompt(_text) {
|
|
837
|
+
// Intentionally no-op to keep the input area persistent and uncluttered.
|
|
799
838
|
}
|
|
800
839
|
requestPromptRefresh(force = false) {
|
|
801
840
|
if (force) {
|
|
@@ -1738,6 +1777,75 @@ export class InteractiveShell {
|
|
|
1738
1777
|
}
|
|
1739
1778
|
return `${warning.label}: ${warning.reason}.`;
|
|
1740
1779
|
}
|
|
1780
|
+
buildLaunchCommandPalette() {
|
|
1781
|
+
const entries = [];
|
|
1782
|
+
const secretsSummary = this.summarizeSecretsForPalette();
|
|
1783
|
+
const toolSummary = this.getToolSelectionSummary();
|
|
1784
|
+
const autosaveLabel = this.autosaveEnabled ? 'on' : 'off';
|
|
1785
|
+
for (const command of this.slashCommands) {
|
|
1786
|
+
const entry = {
|
|
1787
|
+
command: command.command,
|
|
1788
|
+
description: command.description,
|
|
1789
|
+
category: command.category ?? 'other',
|
|
1790
|
+
};
|
|
1791
|
+
switch (command.command) {
|
|
1792
|
+
case '/secrets':
|
|
1793
|
+
if (secretsSummary.text) {
|
|
1794
|
+
entry.description = `${command.description} (${secretsSummary.text})`;
|
|
1795
|
+
entry.tone = secretsSummary.tone;
|
|
1796
|
+
}
|
|
1797
|
+
break;
|
|
1798
|
+
case '/tools':
|
|
1799
|
+
if (toolSummary) {
|
|
1800
|
+
entry.description = `${command.description} (${toolSummary})`;
|
|
1801
|
+
}
|
|
1802
|
+
break;
|
|
1803
|
+
case '/sessions':
|
|
1804
|
+
entry.description = `${command.description} (autosave ${autosaveLabel})`;
|
|
1805
|
+
break;
|
|
1806
|
+
case '/model':
|
|
1807
|
+
entry.description = `${command.description} (current: ${this.sessionState.model})`;
|
|
1808
|
+
break;
|
|
1809
|
+
case '/provider':
|
|
1810
|
+
entry.description = `${command.description} (current: ${this.providerLabel(this.sessionState.provider)})`;
|
|
1811
|
+
break;
|
|
1812
|
+
default:
|
|
1813
|
+
break;
|
|
1814
|
+
}
|
|
1815
|
+
entries.push(entry);
|
|
1816
|
+
}
|
|
1817
|
+
return entries;
|
|
1818
|
+
}
|
|
1819
|
+
summarizeSecretsForPalette() {
|
|
1820
|
+
const definitions = listSecretDefinitions();
|
|
1821
|
+
if (!definitions.length) {
|
|
1822
|
+
return { text: null };
|
|
1823
|
+
}
|
|
1824
|
+
const missing = definitions.filter((definition) => !getSecretValue(definition.id));
|
|
1825
|
+
if (missing.length === 0) {
|
|
1826
|
+
return { text: 'all configured', tone: 'success' };
|
|
1827
|
+
}
|
|
1828
|
+
const labels = missing.map((definition) => definition.label ?? definition.id);
|
|
1829
|
+
return { text: `missing ${this.formatList(labels)}`, tone: 'warn' };
|
|
1830
|
+
}
|
|
1831
|
+
getToolSelectionSummary() {
|
|
1832
|
+
const toolSettings = loadToolSettings();
|
|
1833
|
+
const selection = buildEnabledToolSet(toolSettings);
|
|
1834
|
+
const options = getToolToggleOptions();
|
|
1835
|
+
if (!options.length) {
|
|
1836
|
+
return null;
|
|
1837
|
+
}
|
|
1838
|
+
const enabledCount = options.filter((option) => selection.has(option.id)).length;
|
|
1839
|
+
return `${enabledCount}/${options.length} enabled`;
|
|
1840
|
+
}
|
|
1841
|
+
formatList(values, maxItems = 3) {
|
|
1842
|
+
if (!values.length) {
|
|
1843
|
+
return '';
|
|
1844
|
+
}
|
|
1845
|
+
const shown = values.slice(0, maxItems);
|
|
1846
|
+
const suffix = values.length > maxItems ? ', …' : '';
|
|
1847
|
+
return `${shown.join(', ')}${suffix}`;
|
|
1848
|
+
}
|
|
1741
1849
|
buildSlashCommandList(header) {
|
|
1742
1850
|
const lines = [theme.gradient.primary(header), ''];
|
|
1743
1851
|
for (const command of this.slashCommands) {
|
|
@@ -2307,6 +2415,7 @@ When truly finished with ALL tasks, explicitly state "TASK_FULLY_COMPLETE".`;
|
|
|
2307
2415
|
try {
|
|
2308
2416
|
// Send the request and capture the response (streaming disabled)
|
|
2309
2417
|
display.showThinking('Responding...');
|
|
2418
|
+
this.refreshStatusLine(true);
|
|
2310
2419
|
const response = await agent.send(currentPrompt, true);
|
|
2311
2420
|
await this.awaitPendingCleanup();
|
|
2312
2421
|
this.captureHistorySnapshot();
|
|
@@ -2806,8 +2915,10 @@ What's the next action?`;
|
|
|
2806
2915
|
try {
|
|
2807
2916
|
// Send the error to the agent for fixing
|
|
2808
2917
|
display.showThinking('Analyzing build errors');
|
|
2918
|
+
this.refreshStatusLine(true);
|
|
2809
2919
|
const response = await this.agent.send(prompt, true);
|
|
2810
2920
|
display.stopThinking();
|
|
2921
|
+
this.refreshStatusLine(true);
|
|
2811
2922
|
if (response) {
|
|
2812
2923
|
display.showAssistantMessage(response, { isFinal: true });
|
|
2813
2924
|
}
|
|
@@ -3038,9 +3149,14 @@ What's the next action?`;
|
|
|
3038
3149
|
return null;
|
|
3039
3150
|
}
|
|
3040
3151
|
const usageRatio = total / windowTokens;
|
|
3152
|
+
this.latestTokenUsage = {
|
|
3153
|
+
used: total,
|
|
3154
|
+
limit: windowTokens,
|
|
3155
|
+
};
|
|
3041
3156
|
// Always update context usage in the UI
|
|
3042
3157
|
const percentUsed = Math.round(usageRatio * 100);
|
|
3043
3158
|
this.updateContextUsage(percentUsed);
|
|
3159
|
+
this.refreshStatusLine(true);
|
|
3044
3160
|
if (usageRatio < CONTEXT_USAGE_THRESHOLD) {
|
|
3045
3161
|
return null;
|
|
3046
3162
|
}
|