recoder-code 2.2.0 → 2.2.2
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 +66 -10
- package/cli/collaboration-manager.js +3 -1
- package/cli/dev-tools-integration.js +3 -1
- package/cli/enhanced-setup.js +3 -1
- package/cli/file-watcher-manager.js +216 -0
- package/cli/interactive.js +2258 -165
- package/cli/logger.js +181 -0
- package/cli/mcp-client.js +32 -9
- package/cli/ml-training-manager.js +3 -1
- package/cli/model-manager.js +3 -1
- package/cli/natural-language-processor.js +3 -1
- package/cli/project-manager.js +3 -1
- package/cli/rules-engine.js +9 -4
- package/cli/run.js +90 -13
- package/cli/setup-wizard.js +3 -1
- package/cli/slash-commands.js +132 -5
- package/cli/task-manager.js +13 -5
- package/cli/team-collaboration.js +3 -1
- package/cli/todo-manager.js +391 -0
- package/cli/unified-error-handler.js +260 -0
- package/cli/user-experience.js +3 -1
- package/cli/user-onboarding.js +251 -0
- package/cli/vision-analyzer.js +3 -1
- package/index.js +88 -13
- package/package.json +7 -1
- package/plugins/enhanced-plugin-manager.js +31 -11
- package/scripts/performance-benchmark.js +3 -1
- package/scripts/security-audit.js +3 -1
- package/setup.js +3 -1
|
@@ -57,21 +57,41 @@ class EnhancedPluginManager {
|
|
|
57
57
|
filename: filename,
|
|
58
58
|
enabled: pluginModule.enabled !== false,
|
|
59
59
|
|
|
60
|
-
// Plugin functions
|
|
61
|
-
init: pluginModule.init
|
|
62
|
-
cleanup: pluginModule.cleanup
|
|
63
|
-
onMessage: pluginModule.onMessage
|
|
64
|
-
onResponse: pluginModule.onResponse
|
|
65
|
-
onCommand: pluginModule.onCommand
|
|
66
|
-
onFileChange: pluginModule.onFileChange
|
|
60
|
+
// Plugin functions - bind to original module context
|
|
61
|
+
init: pluginModule.init ? pluginModule.init.bind(pluginModule) : (() => {}),
|
|
62
|
+
cleanup: pluginModule.cleanup ? pluginModule.cleanup.bind(pluginModule) : (() => {}),
|
|
63
|
+
onMessage: pluginModule.onMessage ? pluginModule.onMessage.bind(pluginModule) : null,
|
|
64
|
+
onResponse: pluginModule.onResponse ? pluginModule.onResponse.bind(pluginModule) : null,
|
|
65
|
+
onCommand: pluginModule.onCommand ? pluginModule.onCommand.bind(pluginModule) : null,
|
|
66
|
+
onFileChange: pluginModule.onFileChange ? pluginModule.onFileChange.bind(pluginModule) : null,
|
|
67
67
|
|
|
68
|
-
//
|
|
69
|
-
|
|
68
|
+
// Store reference to original module for context
|
|
69
|
+
module: pluginModule,
|
|
70
70
|
|
|
71
|
-
//
|
|
72
|
-
|
|
71
|
+
// Custom commands - bind each command handler
|
|
72
|
+
commands: {},
|
|
73
|
+
|
|
74
|
+
// Hooks - bind each hook handler
|
|
75
|
+
hooks: {}
|
|
73
76
|
};
|
|
74
77
|
|
|
78
|
+
// Bind ALL methods of the plugin module to preserve context
|
|
79
|
+
Object.getOwnPropertyNames(pluginModule).forEach(prop => {
|
|
80
|
+
if (typeof pluginModule[prop] === 'function' && !plugin.hasOwnProperty(prop)) {
|
|
81
|
+
plugin[prop] = pluginModule[prop].bind(pluginModule);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// Bind command handlers to original module context
|
|
86
|
+
Object.entries(pluginModule.commands || {}).forEach(([command, handler]) => {
|
|
87
|
+
plugin.commands[command] = typeof handler === 'function' ? handler.bind(pluginModule) : handler;
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// Bind hook handlers to original module context
|
|
91
|
+
Object.entries(pluginModule.hooks || {}).forEach(([hook, handler]) => {
|
|
92
|
+
plugin.hooks[hook] = typeof handler === 'function' ? handler.bind(pluginModule) : handler;
|
|
93
|
+
});
|
|
94
|
+
|
|
75
95
|
// Register plugin
|
|
76
96
|
this.plugins.set(plugin.name, plugin);
|
|
77
97
|
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
const fs = require('fs');
|
|
9
9
|
const path = require('path');
|
|
10
10
|
const { execSync, spawn } = require('child_process');
|
|
11
|
-
|
|
11
|
+
// Handle chalk properly
|
|
12
|
+
const chalkModule = require('chalk');
|
|
13
|
+
const chalk = chalkModule.default || chalkModule;
|
|
12
14
|
const { performance } = require('perf_hooks');
|
|
13
15
|
|
|
14
16
|
class PerformanceBenchmark {
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
const fs = require('fs');
|
|
9
9
|
const path = require('path');
|
|
10
10
|
const { execSync } = require('child_process');
|
|
11
|
-
|
|
11
|
+
// Handle chalk properly
|
|
12
|
+
const chalkModule = require('chalk');
|
|
13
|
+
const chalk = chalkModule.default || chalkModule;
|
|
12
14
|
|
|
13
15
|
class SecurityAuditor {
|
|
14
16
|
constructor() {
|
package/setup.js
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const readline = require('readline');
|
|
6
|
-
|
|
6
|
+
// Handle chalk properly
|
|
7
|
+
const chalkModule = require('chalk');
|
|
8
|
+
const chalk = chalkModule.default || chalkModule;
|
|
7
9
|
const { exec } = require('child_process');
|
|
8
10
|
const { promisify } = require('util');
|
|
9
11
|
|