erosolar-cli 2.1.238 → 2.1.240
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 +9 -0
- package/dist/contracts/tools.schema.json +3 -1
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +5 -1
- package/dist/core/agent.js.map +1 -1
- package/dist/core/agentOrchestrator.d.ts +4 -0
- package/dist/core/agentOrchestrator.d.ts.map +1 -1
- package/dist/core/agentOrchestrator.js +58 -6
- package/dist/core/agentOrchestrator.js.map +1 -1
- package/dist/core/autoExecutionOrchestrator.d.ts +172 -0
- package/dist/core/autoExecutionOrchestrator.d.ts.map +1 -0
- package/dist/core/autoExecutionOrchestrator.js +591 -0
- package/dist/core/autoExecutionOrchestrator.js.map +1 -0
- package/dist/core/contextManager.d.ts.map +1 -1
- package/dist/core/contextManager.js.map +1 -1
- package/dist/core/dualAgentOrchestrator.d.ts +34 -0
- package/dist/core/dualAgentOrchestrator.d.ts.map +1 -0
- package/dist/core/dualAgentOrchestrator.js +94 -0
- package/dist/core/dualAgentOrchestrator.js.map +1 -0
- package/dist/core/errors/safetyValidator.d.ts +25 -12
- package/dist/core/errors/safetyValidator.d.ts.map +1 -1
- package/dist/core/errors/safetyValidator.js +165 -17
- package/dist/core/errors/safetyValidator.js.map +1 -1
- package/dist/core/governmentProcedures.d.ts +118 -0
- package/dist/core/governmentProcedures.d.ts.map +1 -0
- package/dist/core/governmentProcedures.js +912 -0
- package/dist/core/governmentProcedures.js.map +1 -0
- package/dist/core/infrastructureTemplates.d.ts +123 -0
- package/dist/core/infrastructureTemplates.d.ts.map +1 -0
- package/dist/core/infrastructureTemplates.js +1326 -0
- package/dist/core/infrastructureTemplates.js.map +1 -0
- package/dist/core/integrityVerification.d.ts +250 -0
- package/dist/core/integrityVerification.d.ts.map +1 -0
- package/dist/core/integrityVerification.js +616 -0
- package/dist/core/integrityVerification.js.map +1 -0
- package/dist/core/orchestration.d.ts +534 -0
- package/dist/core/orchestration.d.ts.map +1 -0
- package/dist/core/orchestration.js +2009 -0
- package/dist/core/orchestration.js.map +1 -0
- package/dist/core/persistentObjectiveStore.d.ts +292 -0
- package/dist/core/persistentObjectiveStore.d.ts.map +1 -0
- package/dist/core/persistentObjectiveStore.js +613 -0
- package/dist/core/persistentObjectiveStore.js.map +1 -0
- package/dist/core/preferences.js +1 -1
- package/dist/core/preferences.js.map +1 -1
- package/dist/core/reliabilityPrompt.d.ts.map +1 -1
- package/dist/core/reliabilityPrompt.js +3 -0
- package/dist/core/reliabilityPrompt.js.map +1 -1
- package/dist/core/securityDeliverableGenerator.d.ts +292 -0
- package/dist/core/securityDeliverableGenerator.d.ts.map +1 -0
- package/dist/core/securityDeliverableGenerator.js +1590 -0
- package/dist/core/securityDeliverableGenerator.js.map +1 -0
- package/dist/core/taskCompletionDetector.d.ts.map +1 -1
- package/dist/core/taskCompletionDetector.js +4 -1
- package/dist/core/taskCompletionDetector.js.map +1 -1
- package/dist/shell/autoExecutor.d.ts.map +1 -1
- package/dist/shell/autoExecutor.js +32 -3
- package/dist/shell/autoExecutor.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +9 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +282 -190
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/tools/bashTools.d.ts +3 -5
- package/dist/tools/bashTools.d.ts.map +1 -1
- package/dist/tools/bashTools.js +259 -161
- package/dist/tools/bashTools.js.map +1 -1
- package/dist/tools/tao/index.d.ts +4 -4
- package/dist/tools/tao/index.d.ts.map +1 -1
- package/dist/tools/tao/index.js +15 -5
- package/dist/tools/tao/index.js.map +1 -1
- package/dist/tools/tao/rl.d.ts +164 -0
- package/dist/tools/tao/rl.d.ts.map +1 -0
- package/dist/tools/tao/rl.js +2998 -0
- package/dist/tools/tao/rl.js.map +1 -0
- package/dist/tools/taoTools.d.ts +2 -2
- package/dist/tools/taoTools.d.ts.map +1 -1
- package/dist/tools/taoTools.js +103 -20
- package/dist/tools/taoTools.js.map +1 -1
- package/dist/ui/PromptController.d.ts +3 -0
- package/dist/ui/PromptController.d.ts.map +1 -1
- package/dist/ui/PromptController.js +3 -0
- package/dist/ui/PromptController.js.map +1 -1
- package/dist/ui/UnifiedUIRenderer.d.ts +4 -0
- package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
- package/dist/ui/UnifiedUIRenderer.js +37 -6
- package/dist/ui/UnifiedUIRenderer.js.map +1 -1
- package/dist/ui/display.d.ts +9 -1
- package/dist/ui/display.d.ts.map +1 -1
- package/dist/ui/display.js +66 -9
- package/dist/ui/display.js.map +1 -1
- package/dist/ui/shortcutsHelp.d.ts.map +1 -1
- package/dist/ui/shortcutsHelp.js +1 -0
- package/dist/ui/shortcutsHelp.js.map +1 -1
- package/package.json +3 -2
- package/dist/capabilities/askUserCapability.d.ts +0 -14
- package/dist/capabilities/askUserCapability.d.ts.map +0 -1
- package/dist/capabilities/askUserCapability.js +0 -134
- package/dist/capabilities/askUserCapability.js.map +0 -1
- package/dist/capabilities/codeGenerationCapability.d.ts +0 -13
- package/dist/capabilities/codeGenerationCapability.d.ts.map +0 -1
- package/dist/capabilities/codeGenerationCapability.js +0 -25
- package/dist/capabilities/codeGenerationCapability.js.map +0 -1
- package/dist/capabilities/performanceMonitoringCapability.d.ts +0 -108
- package/dist/capabilities/performanceMonitoringCapability.d.ts.map +0 -1
- package/dist/capabilities/performanceMonitoringCapability.js +0 -176
- package/dist/capabilities/performanceMonitoringCapability.js.map +0 -1
- package/dist/capabilities/todoCapability.d.ts +0 -19
- package/dist/capabilities/todoCapability.d.ts.map +0 -1
- package/dist/capabilities/todoCapability.js +0 -170
- package/dist/capabilities/todoCapability.js.map +0 -1
- package/dist/core/baseToolFactory.d.ts +0 -187
- package/dist/core/baseToolFactory.d.ts.map +0 -1
- package/dist/core/baseToolFactory.js +0 -352
- package/dist/core/baseToolFactory.js.map +0 -1
- package/dist/core/intelligentSummarizer.d.ts +0 -79
- package/dist/core/intelligentSummarizer.d.ts.map +0 -1
- package/dist/core/intelligentSummarizer.js +0 -273
- package/dist/core/intelligentSummarizer.js.map +0 -1
- package/dist/core/memorySystem.d.ts +0 -67
- package/dist/core/memorySystem.d.ts.map +0 -1
- package/dist/core/memorySystem.js +0 -334
- package/dist/core/memorySystem.js.map +0 -1
- package/dist/core/outputStyles.d.ts +0 -48
- package/dist/core/outputStyles.d.ts.map +0 -1
- package/dist/core/outputStyles.js +0 -270
- package/dist/core/outputStyles.js.map +0 -1
- package/dist/core/toolPatternAnalyzer.d.ts +0 -87
- package/dist/core/toolPatternAnalyzer.d.ts.map +0 -1
- package/dist/core/toolPatternAnalyzer.js +0 -272
- package/dist/core/toolPatternAnalyzer.js.map +0 -1
- package/dist/tools/backgroundBashTools.d.ts +0 -21
- package/dist/tools/backgroundBashTools.d.ts.map +0 -1
- package/dist/tools/backgroundBashTools.js +0 -215
- package/dist/tools/backgroundBashTools.js.map +0 -1
- package/dist/tools/code-quality-dashboard.d.ts +0 -57
- package/dist/tools/code-quality-dashboard.d.ts.map +0 -1
- package/dist/tools/code-quality-dashboard.js +0 -218
- package/dist/tools/code-quality-dashboard.js.map +0 -1
- package/dist/tools/tao/rlEngine.d.ts +0 -40
- package/dist/tools/tao/rlEngine.d.ts.map +0 -1
- package/dist/tools/tao/rlEngine.js +0 -237
- package/dist/tools/tao/rlEngine.js.map +0 -1
|
@@ -137,6 +137,7 @@ export class InteractiveShell {
|
|
|
137
137
|
orchestrationNoticeShown = false;
|
|
138
138
|
verificationEnabled = false;
|
|
139
139
|
criticalApprovalMode = 'auto';
|
|
140
|
+
selfImprovementMode = 'single';
|
|
140
141
|
editGuardMode = 'display-edits';
|
|
141
142
|
pendingPermissionInput = null;
|
|
142
143
|
suppressNextNetworkReset = false;
|
|
@@ -198,6 +199,9 @@ export class InteractiveShell {
|
|
|
198
199
|
inlinePanelBase = [];
|
|
199
200
|
inlinePanelNotices = [];
|
|
200
201
|
inlinePanelClearTimer = null;
|
|
202
|
+
inlinePanelSoftLimit = 28;
|
|
203
|
+
lastInlinePanelRender = [];
|
|
204
|
+
inlinePanelHardLimit = 400;
|
|
201
205
|
promptRefreshTimer = null;
|
|
202
206
|
launchPaletteShown = false;
|
|
203
207
|
version;
|
|
@@ -315,19 +319,38 @@ export class InteractiveShell {
|
|
|
315
319
|
onClearContext: () => this.handleClearContext(),
|
|
316
320
|
onToggleCriticalApproval: () => this.toggleCriticalApprovalMode('shortcut'),
|
|
317
321
|
onExpandToolResult: () => this.expandLastToolResult(),
|
|
322
|
+
onToggleDualRl: () => this.toggleDualMode(),
|
|
318
323
|
});
|
|
319
324
|
// Share renderer with Display so all output flows through the unified queue
|
|
320
325
|
this.renderer = this.terminalInput.getRenderer();
|
|
321
326
|
display.setRenderer(this.renderer);
|
|
322
|
-
display.setInlinePanelHandler((
|
|
327
|
+
display.setInlinePanelHandler((payload) => {
|
|
323
328
|
if (!this.shouldCaptureInlinePanel()) {
|
|
324
329
|
return false;
|
|
325
330
|
}
|
|
326
|
-
const lines = content
|
|
331
|
+
const lines = payload.content
|
|
327
332
|
.split('\n')
|
|
328
|
-
.map((line) => line.trimEnd())
|
|
329
|
-
|
|
330
|
-
|
|
333
|
+
.map((line) => line.trimEnd());
|
|
334
|
+
const hasContent = lines.some((line) => line.trim().length > 0);
|
|
335
|
+
if (!hasContent) {
|
|
336
|
+
this.clearInlinePanel();
|
|
337
|
+
return true;
|
|
338
|
+
}
|
|
339
|
+
if (payload.mode === 'notice') {
|
|
340
|
+
const tone = payload.tone ?? 'info';
|
|
341
|
+
const nonEmptyLines = lines.filter((line) => line.trim().length > 0);
|
|
342
|
+
if (nonEmptyLines.length > 3) {
|
|
343
|
+
const formatted = nonEmptyLines.map((line) => this.formatInlineNotice({ text: line, tone }));
|
|
344
|
+
this.appendInlinePanelLines(formatted);
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
for (const line of nonEmptyLines) {
|
|
348
|
+
this.appendInlineNotice(line, tone);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return true;
|
|
352
|
+
}
|
|
353
|
+
this.appendInlinePanelLines(lines);
|
|
331
354
|
return true;
|
|
332
355
|
});
|
|
333
356
|
// Initialize Alpha Zero 2 metrics tracking
|
|
@@ -979,6 +1002,16 @@ export class InteractiveShell {
|
|
|
979
1002
|
const nextMode = this.criticalApprovalMode === 'auto' ? 'approval' : 'auto';
|
|
980
1003
|
this.setCriticalApprovalMode(nextMode, source);
|
|
981
1004
|
}
|
|
1005
|
+
toggleDualMode() {
|
|
1006
|
+
const next = this.selfImprovementMode === 'dual-rl' ? 'single' : 'dual-rl';
|
|
1007
|
+
this.selfImprovementMode = next;
|
|
1008
|
+
const enabled = next === 'dual-rl';
|
|
1009
|
+
this.refreshControlBar();
|
|
1010
|
+
const msg = enabled
|
|
1011
|
+
? '🤖 Dual-agent RL on: primary + refiner per request. Use /features alphazerodual on to make this the default.'
|
|
1012
|
+
: '🟢 Single-agent mode on: one-pass orchestration. Use /features alphazerodual off to persist.';
|
|
1013
|
+
display.showSystemMessage(msg);
|
|
1014
|
+
}
|
|
982
1015
|
setCriticalApprovalMode(mode, source) {
|
|
983
1016
|
const changed = this.criticalApprovalMode !== mode;
|
|
984
1017
|
this.criticalApprovalMode = mode;
|
|
@@ -1925,6 +1958,8 @@ export class InteractiveShell {
|
|
|
1925
1958
|
thinkingHotkey: 'tab',
|
|
1926
1959
|
criticalApprovalMode: this.criticalApprovalMode,
|
|
1927
1960
|
criticalApprovalHotkey: 'ctrl+shift+a',
|
|
1961
|
+
dualRlEnabled: this.selfImprovementMode === 'dual-rl',
|
|
1962
|
+
dualRlHotkey: 'ctrl+shift+d',
|
|
1928
1963
|
});
|
|
1929
1964
|
const workspaceDisplay = this.abbreviatePath(this.workingDir);
|
|
1930
1965
|
this.terminalInput.setChromeMeta({
|
|
@@ -2734,189 +2769,12 @@ export class InteractiveShell {
|
|
|
2734
2769
|
return false;
|
|
2735
2770
|
}
|
|
2736
2771
|
}
|
|
2737
|
-
async
|
|
2738
|
-
const [command] = input.split(/\s+/);
|
|
2739
|
-
if (!command) {
|
|
2740
|
-
this.showSlashWarning('Enter a slash command.');
|
|
2741
|
-
this.syncRendererInput();
|
|
2742
|
-
return;
|
|
2743
|
-
}
|
|
2772
|
+
async runInlineCommandScope(handler) {
|
|
2744
2773
|
this.clearInlinePanel();
|
|
2745
2774
|
this.inlinePanelScopeActive = true;
|
|
2746
2775
|
this.inlineCommandActive = true;
|
|
2747
2776
|
try {
|
|
2748
|
-
|
|
2749
|
-
case '/help':
|
|
2750
|
-
case '/?':
|
|
2751
|
-
this.showHelp();
|
|
2752
|
-
break;
|
|
2753
|
-
case '/features':
|
|
2754
|
-
this.showFeaturesMenu(input);
|
|
2755
|
-
break;
|
|
2756
|
-
case '/approvals':
|
|
2757
|
-
this.handleApprovalsCommand(input);
|
|
2758
|
-
break;
|
|
2759
|
-
case '/learn':
|
|
2760
|
-
this.showLearningStatus(input);
|
|
2761
|
-
break;
|
|
2762
|
-
case '/improve':
|
|
2763
|
-
void this.handleImprovementCommand(input);
|
|
2764
|
-
break;
|
|
2765
|
-
case '/model':
|
|
2766
|
-
this.showModelMenu();
|
|
2767
|
-
break;
|
|
2768
|
-
case '/exit':
|
|
2769
|
-
case '/quit':
|
|
2770
|
-
case '/q':
|
|
2771
|
-
this.shutdown();
|
|
2772
|
-
break;
|
|
2773
|
-
case '/secrets':
|
|
2774
|
-
this.showSecretsMenu();
|
|
2775
|
-
break;
|
|
2776
|
-
case '/tools':
|
|
2777
|
-
this.showToolsMenu();
|
|
2778
|
-
break;
|
|
2779
|
-
case '/mcp':
|
|
2780
|
-
await this.showMcpStatus();
|
|
2781
|
-
break;
|
|
2782
|
-
case '/doctor':
|
|
2783
|
-
this.runDoctor();
|
|
2784
|
-
break;
|
|
2785
|
-
case '/checks':
|
|
2786
|
-
await this.runRepoChecksCommand();
|
|
2787
|
-
break;
|
|
2788
|
-
case '/attach':
|
|
2789
|
-
await this.handleAttachCommand(input);
|
|
2790
|
-
break;
|
|
2791
|
-
case '/context':
|
|
2792
|
-
await this.refreshWorkspaceContextCommand(input);
|
|
2793
|
-
break;
|
|
2794
|
-
case '/agents':
|
|
2795
|
-
this.showAgentsMenu();
|
|
2796
|
-
break;
|
|
2797
|
-
case '/sessions':
|
|
2798
|
-
await this.handleSessionCommand(input);
|
|
2799
|
-
break;
|
|
2800
|
-
case '/skills':
|
|
2801
|
-
await this.handleSkillsCommand(input);
|
|
2802
|
-
break;
|
|
2803
|
-
case '/thinking':
|
|
2804
|
-
this.handleThinkingCommand(input);
|
|
2805
|
-
break;
|
|
2806
|
-
case '/shortcuts':
|
|
2807
|
-
case '/keys':
|
|
2808
|
-
this.handleShortcutsCommand();
|
|
2809
|
-
break;
|
|
2810
|
-
case '/changes':
|
|
2811
|
-
case '/summary':
|
|
2812
|
-
this.showFileChangeSummary();
|
|
2813
|
-
break;
|
|
2814
|
-
case '/metrics':
|
|
2815
|
-
case '/stats':
|
|
2816
|
-
case '/perf':
|
|
2817
|
-
this.showAlphaZeroMetrics();
|
|
2818
|
-
break;
|
|
2819
|
-
case '/suggestions':
|
|
2820
|
-
this.showImprovementSuggestions();
|
|
2821
|
-
break;
|
|
2822
|
-
case '/plugins':
|
|
2823
|
-
this.showPluginStatus();
|
|
2824
|
-
break;
|
|
2825
|
-
case '/evolve':
|
|
2826
|
-
void this.handleEvolveCommand(input);
|
|
2827
|
-
break;
|
|
2828
|
-
case '/test':
|
|
2829
|
-
case '/tests':
|
|
2830
|
-
void this.handleTestCommand(input);
|
|
2831
|
-
break;
|
|
2832
|
-
case '/provider':
|
|
2833
|
-
await this.handleProviderCommand(input);
|
|
2834
|
-
break;
|
|
2835
|
-
case '/providers':
|
|
2836
|
-
this.showConfiguredProviders();
|
|
2837
|
-
break;
|
|
2838
|
-
case '/local':
|
|
2839
|
-
await this.handleLocalCommand(input);
|
|
2840
|
-
break;
|
|
2841
|
-
case '/discover':
|
|
2842
|
-
await this.discoverModelsCommand();
|
|
2843
|
-
break;
|
|
2844
|
-
// Erosolar-CLI style commands
|
|
2845
|
-
case '/rewind':
|
|
2846
|
-
await this.handleRewindCommand(input);
|
|
2847
|
-
break;
|
|
2848
|
-
case '/memory':
|
|
2849
|
-
this.handleMemoryCommand(input);
|
|
2850
|
-
break;
|
|
2851
|
-
case '/vim':
|
|
2852
|
-
this.handleVimCommand();
|
|
2853
|
-
break;
|
|
2854
|
-
case '/output-style':
|
|
2855
|
-
this.handleOutputStyleCommand(input);
|
|
2856
|
-
break;
|
|
2857
|
-
case '/cost':
|
|
2858
|
-
this.handleCostCommand();
|
|
2859
|
-
break;
|
|
2860
|
-
case '/usage':
|
|
2861
|
-
this.handleUsageCommand(input);
|
|
2862
|
-
break;
|
|
2863
|
-
case '/clear':
|
|
2864
|
-
this.handleClearCommand();
|
|
2865
|
-
break;
|
|
2866
|
-
case '/resume':
|
|
2867
|
-
await this.handleResumeCommand(input);
|
|
2868
|
-
break;
|
|
2869
|
-
case '/export':
|
|
2870
|
-
this.handleExportCommand(input);
|
|
2871
|
-
break;
|
|
2872
|
-
case '/review':
|
|
2873
|
-
await this.handleReviewCommand();
|
|
2874
|
-
break;
|
|
2875
|
-
case '/security-review':
|
|
2876
|
-
await this.handleSecurityReviewCommand();
|
|
2877
|
-
break;
|
|
2878
|
-
case '/new':
|
|
2879
|
-
this.handleClearCommand();
|
|
2880
|
-
break;
|
|
2881
|
-
case '/undo':
|
|
2882
|
-
await this.handleRewindCommand(input);
|
|
2883
|
-
break;
|
|
2884
|
-
case '/diff':
|
|
2885
|
-
await this.handleDiffCommand();
|
|
2886
|
-
break;
|
|
2887
|
-
case '/mention':
|
|
2888
|
-
this.handleMentionCommand();
|
|
2889
|
-
break;
|
|
2890
|
-
case '/status':
|
|
2891
|
-
this.handleStatusCommand();
|
|
2892
|
-
break;
|
|
2893
|
-
case '/bug':
|
|
2894
|
-
this.handleBugCommand();
|
|
2895
|
-
break;
|
|
2896
|
-
case '/terminal-setup':
|
|
2897
|
-
this.handleTerminalSetupCommand();
|
|
2898
|
-
break;
|
|
2899
|
-
case '/permissions':
|
|
2900
|
-
this.handlePermissionsCommand();
|
|
2901
|
-
break;
|
|
2902
|
-
case '/update':
|
|
2903
|
-
await this.handleUpdateCommand(input);
|
|
2904
|
-
break;
|
|
2905
|
-
case '/init':
|
|
2906
|
-
this.handleInitCommand(input);
|
|
2907
|
-
break;
|
|
2908
|
-
case '/compact':
|
|
2909
|
-
await this.handleCompactCommand();
|
|
2910
|
-
break;
|
|
2911
|
-
case '/logout':
|
|
2912
|
-
this.handleLogoutCommand();
|
|
2913
|
-
break;
|
|
2914
|
-
default:
|
|
2915
|
-
if (!(await this.tryCustomSlashCommand(command, input))) {
|
|
2916
|
-
this.showInlineStatus(`Unknown command "${command}".`, 'warning', { autoClearMs: 1800 });
|
|
2917
|
-
}
|
|
2918
|
-
break;
|
|
2919
|
-
}
|
|
2777
|
+
await handler();
|
|
2920
2778
|
}
|
|
2921
2779
|
finally {
|
|
2922
2780
|
this.inlineCommandActive = false;
|
|
@@ -2924,7 +2782,193 @@ export class InteractiveShell {
|
|
|
2924
2782
|
this.inlinePanelScopeActive = false;
|
|
2925
2783
|
}
|
|
2926
2784
|
}
|
|
2927
|
-
|
|
2785
|
+
}
|
|
2786
|
+
async processSlashCommand(input) {
|
|
2787
|
+
const [command] = input.split(/\s+/);
|
|
2788
|
+
if (!command) {
|
|
2789
|
+
this.showSlashWarning('Enter a slash command.');
|
|
2790
|
+
this.syncRendererInput();
|
|
2791
|
+
return;
|
|
2792
|
+
}
|
|
2793
|
+
try {
|
|
2794
|
+
await this.runInlineCommandScope(async () => {
|
|
2795
|
+
switch (command) {
|
|
2796
|
+
case '/help':
|
|
2797
|
+
case '/?':
|
|
2798
|
+
this.showHelp();
|
|
2799
|
+
break;
|
|
2800
|
+
case '/features':
|
|
2801
|
+
this.showFeaturesMenu(input);
|
|
2802
|
+
break;
|
|
2803
|
+
case '/approvals':
|
|
2804
|
+
this.handleApprovalsCommand(input);
|
|
2805
|
+
break;
|
|
2806
|
+
case '/learn':
|
|
2807
|
+
this.showLearningStatus(input);
|
|
2808
|
+
break;
|
|
2809
|
+
case '/improve':
|
|
2810
|
+
await this.handleImprovementCommand(input);
|
|
2811
|
+
break;
|
|
2812
|
+
case '/model':
|
|
2813
|
+
await this.showModelMenu();
|
|
2814
|
+
break;
|
|
2815
|
+
case '/exit':
|
|
2816
|
+
case '/quit':
|
|
2817
|
+
case '/q':
|
|
2818
|
+
this.shutdown();
|
|
2819
|
+
break;
|
|
2820
|
+
case '/secrets':
|
|
2821
|
+
this.showSecretsMenu();
|
|
2822
|
+
break;
|
|
2823
|
+
case '/tools':
|
|
2824
|
+
this.showToolsMenu();
|
|
2825
|
+
break;
|
|
2826
|
+
case '/mcp':
|
|
2827
|
+
await this.showMcpStatus();
|
|
2828
|
+
break;
|
|
2829
|
+
case '/doctor':
|
|
2830
|
+
this.runDoctor();
|
|
2831
|
+
break;
|
|
2832
|
+
case '/checks':
|
|
2833
|
+
await this.runRepoChecksCommand();
|
|
2834
|
+
break;
|
|
2835
|
+
case '/attach':
|
|
2836
|
+
await this.handleAttachCommand(input);
|
|
2837
|
+
break;
|
|
2838
|
+
case '/context':
|
|
2839
|
+
await this.refreshWorkspaceContextCommand(input);
|
|
2840
|
+
break;
|
|
2841
|
+
case '/agents':
|
|
2842
|
+
this.showAgentsMenu();
|
|
2843
|
+
break;
|
|
2844
|
+
case '/sessions':
|
|
2845
|
+
await this.handleSessionCommand(input);
|
|
2846
|
+
break;
|
|
2847
|
+
case '/skills':
|
|
2848
|
+
await this.handleSkillsCommand(input);
|
|
2849
|
+
break;
|
|
2850
|
+
case '/thinking':
|
|
2851
|
+
this.handleThinkingCommand(input);
|
|
2852
|
+
break;
|
|
2853
|
+
case '/shortcuts':
|
|
2854
|
+
case '/keys':
|
|
2855
|
+
this.handleShortcutsCommand();
|
|
2856
|
+
break;
|
|
2857
|
+
case '/changes':
|
|
2858
|
+
case '/summary':
|
|
2859
|
+
this.showFileChangeSummary();
|
|
2860
|
+
break;
|
|
2861
|
+
case '/metrics':
|
|
2862
|
+
case '/stats':
|
|
2863
|
+
case '/perf':
|
|
2864
|
+
this.showAlphaZeroMetrics();
|
|
2865
|
+
break;
|
|
2866
|
+
case '/suggestions':
|
|
2867
|
+
this.showImprovementSuggestions();
|
|
2868
|
+
break;
|
|
2869
|
+
case '/plugins':
|
|
2870
|
+
this.showPluginStatus();
|
|
2871
|
+
break;
|
|
2872
|
+
case '/evolve':
|
|
2873
|
+
await this.handleEvolveCommand(input);
|
|
2874
|
+
break;
|
|
2875
|
+
case '/test':
|
|
2876
|
+
case '/tests':
|
|
2877
|
+
await this.handleTestCommand(input);
|
|
2878
|
+
break;
|
|
2879
|
+
case '/provider':
|
|
2880
|
+
await this.handleProviderCommand(input);
|
|
2881
|
+
break;
|
|
2882
|
+
case '/providers':
|
|
2883
|
+
this.showConfiguredProviders();
|
|
2884
|
+
break;
|
|
2885
|
+
case '/local':
|
|
2886
|
+
await this.handleLocalCommand(input);
|
|
2887
|
+
break;
|
|
2888
|
+
case '/discover':
|
|
2889
|
+
await this.discoverModelsCommand();
|
|
2890
|
+
break;
|
|
2891
|
+
// Erosolar-CLI style commands
|
|
2892
|
+
case '/rewind':
|
|
2893
|
+
await this.handleRewindCommand(input);
|
|
2894
|
+
break;
|
|
2895
|
+
case '/memory':
|
|
2896
|
+
this.handleMemoryCommand(input);
|
|
2897
|
+
break;
|
|
2898
|
+
case '/vim':
|
|
2899
|
+
this.handleVimCommand();
|
|
2900
|
+
break;
|
|
2901
|
+
case '/output-style':
|
|
2902
|
+
this.handleOutputStyleCommand(input);
|
|
2903
|
+
break;
|
|
2904
|
+
case '/cost':
|
|
2905
|
+
this.handleCostCommand();
|
|
2906
|
+
break;
|
|
2907
|
+
case '/usage':
|
|
2908
|
+
this.handleUsageCommand(input);
|
|
2909
|
+
break;
|
|
2910
|
+
case '/clear':
|
|
2911
|
+
this.handleClearCommand();
|
|
2912
|
+
break;
|
|
2913
|
+
case '/resume':
|
|
2914
|
+
await this.handleResumeCommand(input);
|
|
2915
|
+
break;
|
|
2916
|
+
case '/export':
|
|
2917
|
+
this.handleExportCommand(input);
|
|
2918
|
+
break;
|
|
2919
|
+
case '/review':
|
|
2920
|
+
await this.handleReviewCommand();
|
|
2921
|
+
break;
|
|
2922
|
+
case '/security-review':
|
|
2923
|
+
await this.handleSecurityReviewCommand();
|
|
2924
|
+
break;
|
|
2925
|
+
case '/new':
|
|
2926
|
+
this.handleClearCommand();
|
|
2927
|
+
break;
|
|
2928
|
+
case '/undo':
|
|
2929
|
+
await this.handleRewindCommand(input);
|
|
2930
|
+
break;
|
|
2931
|
+
case '/diff':
|
|
2932
|
+
await this.handleDiffCommand();
|
|
2933
|
+
break;
|
|
2934
|
+
case '/mention':
|
|
2935
|
+
this.handleMentionCommand();
|
|
2936
|
+
break;
|
|
2937
|
+
case '/status':
|
|
2938
|
+
this.handleStatusCommand();
|
|
2939
|
+
break;
|
|
2940
|
+
case '/bug':
|
|
2941
|
+
this.handleBugCommand();
|
|
2942
|
+
break;
|
|
2943
|
+
case '/terminal-setup':
|
|
2944
|
+
this.handleTerminalSetupCommand();
|
|
2945
|
+
break;
|
|
2946
|
+
case '/permissions':
|
|
2947
|
+
this.handlePermissionsCommand();
|
|
2948
|
+
break;
|
|
2949
|
+
case '/update':
|
|
2950
|
+
await this.handleUpdateCommand(input);
|
|
2951
|
+
break;
|
|
2952
|
+
case '/init':
|
|
2953
|
+
this.handleInitCommand(input);
|
|
2954
|
+
break;
|
|
2955
|
+
case '/compact':
|
|
2956
|
+
await this.handleCompactCommand();
|
|
2957
|
+
break;
|
|
2958
|
+
case '/logout':
|
|
2959
|
+
this.handleLogoutCommand();
|
|
2960
|
+
break;
|
|
2961
|
+
default:
|
|
2962
|
+
if (!(await this.tryCustomSlashCommand(command, input))) {
|
|
2963
|
+
this.showInlineStatus(`Unknown command "${command}".`, 'warning', { autoClearMs: 1800 });
|
|
2964
|
+
}
|
|
2965
|
+
break;
|
|
2966
|
+
}
|
|
2967
|
+
});
|
|
2968
|
+
}
|
|
2969
|
+
finally {
|
|
2970
|
+
this.syncRendererInput();
|
|
2971
|
+
}
|
|
2928
2972
|
}
|
|
2929
2973
|
async tryCustomSlashCommand(command, fullInput) {
|
|
2930
2974
|
const custom = this.customCommandMap.get(command);
|
|
@@ -5052,18 +5096,46 @@ export class InteractiveShell {
|
|
|
5052
5096
|
return `${shown.join(', ')}${suffix}`;
|
|
5053
5097
|
}
|
|
5054
5098
|
showInlinePanel(lines) {
|
|
5055
|
-
const normalized = (lines ?? [])
|
|
5056
|
-
|
|
5057
|
-
.filter(line => line.trim().length > 0);
|
|
5099
|
+
const normalized = (lines ?? []).map(line => line.replace(/\s+$/g, ''));
|
|
5100
|
+
const hasContent = normalized.some((line) => line.trim().length > 0);
|
|
5058
5101
|
// Reset any pending auto-clear timer whenever we render a fresh panel
|
|
5059
5102
|
if (this.inlinePanelClearTimer) {
|
|
5060
5103
|
clearTimeout(this.inlinePanelClearTimer);
|
|
5061
5104
|
this.inlinePanelClearTimer = null;
|
|
5062
5105
|
}
|
|
5063
|
-
|
|
5106
|
+
if (!hasContent) {
|
|
5107
|
+
this.clearInlinePanel();
|
|
5108
|
+
return;
|
|
5109
|
+
}
|
|
5110
|
+
this.inlinePanelBase = this.enforceInlinePanelHardLimit(normalized);
|
|
5064
5111
|
this.inlinePanelNotices = [];
|
|
5065
5112
|
this.flushInlinePanel();
|
|
5066
5113
|
}
|
|
5114
|
+
appendInlinePanelLines(lines) {
|
|
5115
|
+
const normalized = (lines ?? []).map(line => line.replace(/\s+$/g, ''));
|
|
5116
|
+
const hasContent = normalized.some((line) => line.trim().length > 0);
|
|
5117
|
+
if (!hasContent) {
|
|
5118
|
+
return;
|
|
5119
|
+
}
|
|
5120
|
+
if (this.inlinePanelClearTimer) {
|
|
5121
|
+
clearTimeout(this.inlinePanelClearTimer);
|
|
5122
|
+
this.inlinePanelClearTimer = null;
|
|
5123
|
+
}
|
|
5124
|
+
const merged = this.inlinePanelBase.length
|
|
5125
|
+
? [...this.inlinePanelBase, ...normalized]
|
|
5126
|
+
: normalized;
|
|
5127
|
+
this.inlinePanelBase = this.enforceInlinePanelHardLimit(merged);
|
|
5128
|
+
this.flushInlinePanel();
|
|
5129
|
+
}
|
|
5130
|
+
enforceInlinePanelHardLimit(lines) {
|
|
5131
|
+
if (lines.length <= this.inlinePanelHardLimit) {
|
|
5132
|
+
return lines;
|
|
5133
|
+
}
|
|
5134
|
+
const overflow = lines.length - this.inlinePanelHardLimit;
|
|
5135
|
+
const trimmed = lines.slice(-this.inlinePanelHardLimit);
|
|
5136
|
+
const notice = theme.ui.muted(`[inline panel truncated: ${overflow} earlier lines omitted]`);
|
|
5137
|
+
return [notice, ...trimmed];
|
|
5138
|
+
}
|
|
5067
5139
|
appendInlineNotice(message, tone = 'info') {
|
|
5068
5140
|
const normalized = message.trim();
|
|
5069
5141
|
if (!normalized)
|
|
@@ -5097,6 +5169,7 @@ export class InteractiveShell {
|
|
|
5097
5169
|
}
|
|
5098
5170
|
flushInlinePanel() {
|
|
5099
5171
|
if (!this.inlinePanelBase.length && !this.inlinePanelNotices.length) {
|
|
5172
|
+
this.lastInlinePanelRender = [];
|
|
5100
5173
|
display.clearInlinePanel();
|
|
5101
5174
|
return;
|
|
5102
5175
|
}
|
|
@@ -5109,7 +5182,25 @@ export class InteractiveShell {
|
|
|
5109
5182
|
lines.push(this.formatInlineNotice(notice));
|
|
5110
5183
|
}
|
|
5111
5184
|
}
|
|
5112
|
-
|
|
5185
|
+
const clamped = this.clampInlinePanel(lines);
|
|
5186
|
+
if (JSON.stringify(clamped) === JSON.stringify(this.lastInlinePanelRender)) {
|
|
5187
|
+
return;
|
|
5188
|
+
}
|
|
5189
|
+
this.lastInlinePanelRender = clamped;
|
|
5190
|
+
display.showInlinePanel(clamped);
|
|
5191
|
+
}
|
|
5192
|
+
clampInlinePanel(lines) {
|
|
5193
|
+
if (!lines.length)
|
|
5194
|
+
return lines;
|
|
5195
|
+
const maxLines = Math.max(6, this.inlinePanelSoftLimit);
|
|
5196
|
+
if (lines.length <= maxLines) {
|
|
5197
|
+
return lines;
|
|
5198
|
+
}
|
|
5199
|
+
const overflow = lines.length - maxLines;
|
|
5200
|
+
const indicator = theme.ui.muted(`… ${overflow} more lines`);
|
|
5201
|
+
const tailCount = Math.max(1, maxLines - 1);
|
|
5202
|
+
const tail = lines.slice(-tailCount);
|
|
5203
|
+
return [indicator, ...tail];
|
|
5113
5204
|
}
|
|
5114
5205
|
formatInlineNotice(notice) {
|
|
5115
5206
|
const prefix = (() => {
|
|
@@ -5182,6 +5273,7 @@ export class InteractiveShell {
|
|
|
5182
5273
|
}
|
|
5183
5274
|
this.inlinePanelBase = [];
|
|
5184
5275
|
this.inlinePanelNotices = [];
|
|
5276
|
+
this.lastInlinePanelRender = [];
|
|
5185
5277
|
display.clearInlinePanel();
|
|
5186
5278
|
}
|
|
5187
5279
|
shouldCaptureInlinePanel() {
|