recoder-code 2.2.3 → 2.2.5

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 (2) hide show
  1. package/cli/interactive.js +13 -28
  2. package/package.json +1 -1
@@ -1070,6 +1070,10 @@ class InteractiveRecoderChat {
1070
1070
  setupReadlineHandlers() {
1071
1071
  if (!this.rl) return;
1072
1072
 
1073
+ // Remove any existing listeners to prevent duplicates
1074
+ this.rl.removeAllListeners('line');
1075
+ this.rl.removeAllListeners('close');
1076
+
1073
1077
  this.rl.on('line', async (input) => {
1074
1078
  await this.handleUserInput(input.trim());
1075
1079
  });
@@ -1078,13 +1082,6 @@ class InteractiveRecoderChat {
1078
1082
  console.log('\nGoodbye!');
1079
1083
  process.exit(0);
1080
1084
  });
1081
-
1082
- // Handle advanced keyboard shortcuts
1083
- process.stdin.on('keypress', (str, key) => {
1084
- if (key && key.ctrl) {
1085
- this.handleCtrlKeys(key);
1086
- }
1087
- });
1088
1085
  }
1089
1086
 
1090
1087
  initializeWithApiKey() {
@@ -1126,24 +1123,8 @@ class InteractiveRecoderChat {
1126
1123
  }
1127
1124
 
1128
1125
  setupEventHandlers() {
1129
- // Set up readline event handlers for user input
1130
- this.rl.on('line', async (input) => {
1131
- await this.handleUserInput(input.trim());
1132
- });
1133
-
1134
- this.rl.on('close', () => {
1135
- console.log('\nGoodbye!');
1136
- process.exit(0);
1137
- });
1138
-
1139
- // Handle advanced keyboard shortcuts
1140
- process.stdin.on('keypress', (str, key) => {
1141
- if (key) {
1142
- this.handleKeyboardShortcuts(key);
1143
- }
1144
- });
1145
-
1146
- // Start the prompt
1126
+ // Event handlers already set up in setupReadlineHandlers()
1127
+ // Just start the prompt
1147
1128
  this.rl.prompt();
1148
1129
  }
1149
1130
 
@@ -1227,9 +1208,13 @@ class InteractiveRecoderChat {
1227
1208
  // Finalize streaming display
1228
1209
  this.finalizeStreamingResponse(response, totalDuration);
1229
1210
  }
1230
-
1211
+
1212
+ // Ensure progressive loading is stopped
1213
+ this.stopProgressiveLoading();
1214
+ this.stopStreamingDisplay();
1215
+
1231
1216
  console.log('');
1232
-
1217
+
1233
1218
  } catch (error) {
1234
1219
  this.stopProgressiveLoading();
1235
1220
  this.stopStreamingDisplay();
@@ -1237,7 +1222,7 @@ class InteractiveRecoderChat {
1237
1222
  this.showEnhancedError(error);
1238
1223
  console.log('');
1239
1224
  }
1240
-
1225
+
1241
1226
  this.rl.prompt();
1242
1227
  }
1243
1228
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recoder-code",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "Complete AI-powered development platform with ML model training, plugin registry, real-time collaboration, monitoring, infrastructure automation, and enterprise deployment capabilities",
5
5
  "main": "index.js",
6
6
  "scripts": {