recoder-code 2.2.4 ā 2.2.6
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/cli/interactive.js +32 -44
- package/package.json +1 -1
package/cli/interactive.js
CHANGED
|
@@ -766,22 +766,10 @@ class InteractiveRecoderChat {
|
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
setupKeyboardShortcuts() {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
try {
|
|
774
|
-
process.stdin.setRawMode(true);
|
|
775
|
-
process.stdin.on('data', (key) => {
|
|
776
|
-
this.handleKeyboardInput(key);
|
|
777
|
-
});
|
|
778
|
-
} catch (error) {
|
|
779
|
-
this.logger.warn('Could not set up keyboard shortcuts', { error: error.message });
|
|
780
|
-
this.keyboardShortcutsEnabled = false;
|
|
781
|
-
}
|
|
782
|
-
} else {
|
|
783
|
-
this.keyboardShortcutsEnabled = false;
|
|
784
|
-
}
|
|
769
|
+
// Disable raw mode keyboard shortcuts to prevent double input with readline
|
|
770
|
+
// Readline already handles keyboard input properly
|
|
771
|
+
this.keyboardShortcutsEnabled = false;
|
|
772
|
+
return;
|
|
785
773
|
}
|
|
786
774
|
|
|
787
775
|
handleKeyboardInput(key) {
|
|
@@ -917,6 +905,21 @@ class InteractiveRecoderChat {
|
|
|
917
905
|
return [hits.length ? hits : commonModels, modelPrefix];
|
|
918
906
|
}
|
|
919
907
|
|
|
908
|
+
// Show help menu when user just types /
|
|
909
|
+
if (line === '/') {
|
|
910
|
+
console.log(chalk.cyan('\nš Available Commands:'));
|
|
911
|
+
console.log(chalk.gray('ā'.repeat(50)));
|
|
912
|
+
console.log(chalk.yellow(' /help') + chalk.gray(' - Show all commands'));
|
|
913
|
+
console.log(chalk.yellow(' /clear') + chalk.gray(' - Clear conversation'));
|
|
914
|
+
console.log(chalk.yellow(' /model') + chalk.gray(' - Change AI model'));
|
|
915
|
+
console.log(chalk.yellow(' /stats') + chalk.gray(' - Show session stats'));
|
|
916
|
+
console.log(chalk.yellow(' /save') + chalk.gray(' - Save conversation'));
|
|
917
|
+
console.log(chalk.yellow(' /exit') + chalk.gray(' - Exit interactive mode'));
|
|
918
|
+
console.log(chalk.gray('ā'.repeat(50)));
|
|
919
|
+
console.log(chalk.gray('Press TAB to autocomplete ⢠Type /help for full list\n'));
|
|
920
|
+
return [commands, line];
|
|
921
|
+
}
|
|
922
|
+
|
|
920
923
|
// Regular command completion
|
|
921
924
|
if (line.startsWith('/')) {
|
|
922
925
|
const hits = commands.filter(cmd => cmd.startsWith(line));
|
|
@@ -1070,6 +1073,10 @@ class InteractiveRecoderChat {
|
|
|
1070
1073
|
setupReadlineHandlers() {
|
|
1071
1074
|
if (!this.rl) return;
|
|
1072
1075
|
|
|
1076
|
+
// Remove any existing listeners to prevent duplicates
|
|
1077
|
+
this.rl.removeAllListeners('line');
|
|
1078
|
+
this.rl.removeAllListeners('close');
|
|
1079
|
+
|
|
1073
1080
|
this.rl.on('line', async (input) => {
|
|
1074
1081
|
await this.handleUserInput(input.trim());
|
|
1075
1082
|
});
|
|
@@ -1078,13 +1085,6 @@ class InteractiveRecoderChat {
|
|
|
1078
1085
|
console.log('\nGoodbye!');
|
|
1079
1086
|
process.exit(0);
|
|
1080
1087
|
});
|
|
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
1088
|
}
|
|
1089
1089
|
|
|
1090
1090
|
initializeWithApiKey() {
|
|
@@ -1126,24 +1126,8 @@ class InteractiveRecoderChat {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
|
|
1128
1128
|
setupEventHandlers() {
|
|
1129
|
-
//
|
|
1130
|
-
|
|
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
|
|
1129
|
+
// Event handlers already set up in setupReadlineHandlers()
|
|
1130
|
+
// Just start the prompt
|
|
1147
1131
|
this.rl.prompt();
|
|
1148
1132
|
}
|
|
1149
1133
|
|
|
@@ -1227,9 +1211,13 @@ class InteractiveRecoderChat {
|
|
|
1227
1211
|
// Finalize streaming display
|
|
1228
1212
|
this.finalizeStreamingResponse(response, totalDuration);
|
|
1229
1213
|
}
|
|
1230
|
-
|
|
1214
|
+
|
|
1215
|
+
// Ensure progressive loading is stopped
|
|
1216
|
+
this.stopProgressiveLoading();
|
|
1217
|
+
this.stopStreamingDisplay();
|
|
1218
|
+
|
|
1231
1219
|
console.log('');
|
|
1232
|
-
|
|
1220
|
+
|
|
1233
1221
|
} catch (error) {
|
|
1234
1222
|
this.stopProgressiveLoading();
|
|
1235
1223
|
this.stopStreamingDisplay();
|
|
@@ -1237,7 +1225,7 @@ class InteractiveRecoderChat {
|
|
|
1237
1225
|
this.showEnhancedError(error);
|
|
1238
1226
|
console.log('');
|
|
1239
1227
|
}
|
|
1240
|
-
|
|
1228
|
+
|
|
1241
1229
|
this.rl.prompt();
|
|
1242
1230
|
}
|
|
1243
1231
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recoder-code",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
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": {
|