erosolar-cli 1.7.244 → 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 +135 -20
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/terminalInput.d.ts +48 -116
- package/dist/shell/terminalInput.d.ts.map +1 -1
- package/dist/shell/terminalInput.js +317 -522
- 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);
|
|
@@ -495,10 +514,9 @@ export class InteractiveShell {
|
|
|
495
514
|
// Dispose unified UI adapter
|
|
496
515
|
this.uiAdapter.dispose();
|
|
497
516
|
display.newLine();
|
|
498
|
-
console.log(theme.
|
|
499
|
-
console.log(
|
|
500
|
-
console.log(
|
|
501
|
-
console.log(theme.gradient.warm('━'.repeat(50)));
|
|
517
|
+
console.log(theme.ui.muted('━'.repeat(44)));
|
|
518
|
+
console.log(theme.ui.muted(' Goodbye! · support@ero.solar'));
|
|
519
|
+
console.log(theme.ui.muted('━'.repeat(44)));
|
|
502
520
|
exit(0);
|
|
503
521
|
}
|
|
504
522
|
/**
|
|
@@ -668,6 +686,7 @@ export class InteractiveShell {
|
|
|
668
686
|
});
|
|
669
687
|
}
|
|
670
688
|
setProcessingStatus(detail) {
|
|
689
|
+
this.latestTokenUsage = { used: null, limit: this.latestTokenUsage.limit };
|
|
671
690
|
this.statusTracker.setBase('Working on your request', {
|
|
672
691
|
detail: this.describeStatusDetail(detail),
|
|
673
692
|
tone: 'info',
|
|
@@ -687,12 +706,18 @@ export class InteractiveShell {
|
|
|
687
706
|
}
|
|
688
707
|
refreshContextGauge() {
|
|
689
708
|
const tokens = getContextWindowTokens(this.sessionState.model);
|
|
690
|
-
|
|
691
|
-
|
|
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
|
+
}
|
|
692
717
|
}
|
|
693
718
|
updateContextUsage(percentage) {
|
|
694
719
|
this.uiAdapter.updateContextUsage(percentage);
|
|
695
|
-
this.terminalInput.setContextUsage(percentage);
|
|
720
|
+
this.terminalInput.setContextUsage(percentage, CONTEXT_AUTOCOMPACT_PERCENT);
|
|
696
721
|
}
|
|
697
722
|
refreshControlBar() {
|
|
698
723
|
this.terminalInput.setModeToggles({
|
|
@@ -700,6 +725,7 @@ export class InteractiveShell {
|
|
|
700
725
|
autoContinueEnabled: this.autoContinueEnabled,
|
|
701
726
|
verificationHotkey: 'alt+v',
|
|
702
727
|
autoContinueHotkey: 'alt+c',
|
|
728
|
+
thinkingModeLabel: this.thinkingMode,
|
|
703
729
|
});
|
|
704
730
|
this.refreshStatusLine();
|
|
705
731
|
this.terminalInput.render();
|
|
@@ -731,6 +757,20 @@ export class InteractiveShell {
|
|
|
731
757
|
// Set main status (tool execution, etc.) - shown when not overridden
|
|
732
758
|
const statusText = this.formatStatusLine(this.statusLineState);
|
|
733
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
|
+
});
|
|
734
774
|
if (forceRender) {
|
|
735
775
|
this.terminalInput.render();
|
|
736
776
|
}
|
|
@@ -790,13 +830,11 @@ export class InteractiveShell {
|
|
|
790
830
|
this.terminalInput.render();
|
|
791
831
|
}
|
|
792
832
|
/**
|
|
793
|
-
*
|
|
794
|
-
*
|
|
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.
|
|
795
835
|
*/
|
|
796
|
-
logUserPrompt(
|
|
797
|
-
//
|
|
798
|
-
const prefix = formatUserPrompt();
|
|
799
|
-
display.stream(`\n${prefix}${text}\n\n`);
|
|
836
|
+
logUserPrompt(_text) {
|
|
837
|
+
// Intentionally no-op to keep the input area persistent and uncluttered.
|
|
800
838
|
}
|
|
801
839
|
requestPromptRefresh(force = false) {
|
|
802
840
|
if (force) {
|
|
@@ -1739,6 +1777,75 @@ export class InteractiveShell {
|
|
|
1739
1777
|
}
|
|
1740
1778
|
return `${warning.label}: ${warning.reason}.`;
|
|
1741
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
|
+
}
|
|
1742
1849
|
buildSlashCommandList(header) {
|
|
1743
1850
|
const lines = [theme.gradient.primary(header), ''];
|
|
1744
1851
|
for (const command of this.slashCommands) {
|
|
@@ -2308,6 +2415,7 @@ When truly finished with ALL tasks, explicitly state "TASK_FULLY_COMPLETE".`;
|
|
|
2308
2415
|
try {
|
|
2309
2416
|
// Send the request and capture the response (streaming disabled)
|
|
2310
2417
|
display.showThinking('Responding...');
|
|
2418
|
+
this.refreshStatusLine(true);
|
|
2311
2419
|
const response = await agent.send(currentPrompt, true);
|
|
2312
2420
|
await this.awaitPendingCleanup();
|
|
2313
2421
|
this.captureHistorySnapshot();
|
|
@@ -2807,8 +2915,10 @@ What's the next action?`;
|
|
|
2807
2915
|
try {
|
|
2808
2916
|
// Send the error to the agent for fixing
|
|
2809
2917
|
display.showThinking('Analyzing build errors');
|
|
2918
|
+
this.refreshStatusLine(true);
|
|
2810
2919
|
const response = await this.agent.send(prompt, true);
|
|
2811
2920
|
display.stopThinking();
|
|
2921
|
+
this.refreshStatusLine(true);
|
|
2812
2922
|
if (response) {
|
|
2813
2923
|
display.showAssistantMessage(response, { isFinal: true });
|
|
2814
2924
|
}
|
|
@@ -3039,9 +3149,14 @@ What's the next action?`;
|
|
|
3039
3149
|
return null;
|
|
3040
3150
|
}
|
|
3041
3151
|
const usageRatio = total / windowTokens;
|
|
3152
|
+
this.latestTokenUsage = {
|
|
3153
|
+
used: total,
|
|
3154
|
+
limit: windowTokens,
|
|
3155
|
+
};
|
|
3042
3156
|
// Always update context usage in the UI
|
|
3043
3157
|
const percentUsed = Math.round(usageRatio * 100);
|
|
3044
3158
|
this.updateContextUsage(percentUsed);
|
|
3159
|
+
this.refreshStatusLine(true);
|
|
3045
3160
|
if (usageRatio < CONTEXT_USAGE_THRESHOLD) {
|
|
3046
3161
|
return null;
|
|
3047
3162
|
}
|