erosolar-cli 2.1.211 → 2.1.212
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/dist/contracts/unified-schema.json +2 -2
- package/dist/core/agent.d.ts +11 -0
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +45 -0
- package/dist/core/agent.js.map +1 -1
- package/dist/core/agentOrchestrator.d.ts.map +1 -1
- package/dist/core/agentOrchestrator.js +7 -3
- package/dist/core/agentOrchestrator.js.map +1 -1
- package/dist/runtime/agentSession.d.ts +3 -1
- package/dist/runtime/agentSession.d.ts.map +1 -1
- package/dist/runtime/agentSession.js +2 -1
- package/dist/runtime/agentSession.js.map +1 -1
- package/dist/shell/interactiveShell.d.ts +4 -4
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +19 -9
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/ui/PromptController.d.ts.map +1 -1
- package/dist/ui/PromptController.js +1 -0
- package/dist/ui/PromptController.js.map +1 -1
- package/dist/ui/UnifiedUIRenderer.d.ts.map +1 -1
- package/dist/ui/UnifiedUIRenderer.js +11 -14
- package/dist/ui/UnifiedUIRenderer.js.map +1 -1
- package/package.json +1 -1
|
@@ -1069,22 +1069,32 @@ export class InteractiveShell {
|
|
|
1069
1069
|
this.syncRendererInput();
|
|
1070
1070
|
}
|
|
1071
1071
|
/**
|
|
1072
|
-
* Handle Ctrl+C presses
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1075
|
-
*
|
|
1072
|
+
* Handle Ctrl+C presses with context-aware behavior:
|
|
1073
|
+
* - If buffer has text: clear the buffer first
|
|
1074
|
+
* - If buffer is empty and AI is running: first Ctrl+C pauses AI, second quits
|
|
1075
|
+
* - If buffer is empty and AI is idle: first Ctrl+C shows hint, second quits
|
|
1076
1076
|
*/
|
|
1077
1077
|
handleCtrlCPress(hadBuffer) {
|
|
1078
1078
|
this.ctrlCHandledThisPress = true;
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
this.
|
|
1079
|
+
if (hadBuffer) {
|
|
1080
|
+
// Buffer had text, it was cleared by the renderer - reset the counter
|
|
1081
|
+
this.ctrlCPressCount = 0;
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1084
|
+
// Buffer is empty - increment counter for pause/quit sequence
|
|
1085
|
+
this.ctrlCPressCount = Math.min(this.ctrlCPressCount + 1, 2);
|
|
1086
|
+
if (this.ctrlCPressCount === 1) {
|
|
1087
|
+
// First Ctrl+C with empty buffer: pause AI if running, otherwise show hint
|
|
1088
|
+
if (this.isProcessing && this.agent) {
|
|
1089
|
+
this.agent.requestCancellation();
|
|
1090
|
+
display.showWarning('Pausing AI execution... (press Ctrl+C again to quit)');
|
|
1091
|
+
}
|
|
1092
|
+
else {
|
|
1093
|
+
display.showInfo('Press Ctrl+C again to quit');
|
|
1094
|
+
}
|
|
1086
1095
|
return;
|
|
1087
1096
|
}
|
|
1097
|
+
// Second Ctrl+C with empty buffer: quit
|
|
1088
1098
|
this.shutdown();
|
|
1089
1099
|
}
|
|
1090
1100
|
pauseAiExecution() {
|