hedgequantx 2.7.76 → 2.7.77
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/package.json +1 -1
- package/src/pages/ai-agents.js +16 -2
package/package.json
CHANGED
package/src/pages/ai-agents.js
CHANGED
|
@@ -125,7 +125,7 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
|
|
|
125
125
|
spinner.succeed('CLIPROXYAPI INSTALLED');
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
// Check if running, start if not
|
|
128
|
+
// Check if running, start if not (or restart if config missing)
|
|
129
129
|
let status = await cliproxy.isRunning();
|
|
130
130
|
if (!status.running) {
|
|
131
131
|
const spinner = ora({ text: 'STARTING CLIPROXYAPI...', color: 'yellow' }).start();
|
|
@@ -138,7 +138,21 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
|
|
|
138
138
|
}
|
|
139
139
|
spinner.succeed('CLIPROXYAPI STARTED');
|
|
140
140
|
} else {
|
|
141
|
-
|
|
141
|
+
// Running, but check if config exists (for proper API key auth)
|
|
142
|
+
const configPath = require('path').join(require('os').homedir(), '.hqx', 'cliproxy', 'config.yaml');
|
|
143
|
+
if (!require('fs').existsSync(configPath)) {
|
|
144
|
+
console.log(chalk.yellow(' RESTARTING CLIPROXYAPI WITH PROPER CONFIG...'));
|
|
145
|
+
await cliproxy.stop();
|
|
146
|
+
const startResult = await cliproxy.start();
|
|
147
|
+
if (!startResult.success) {
|
|
148
|
+
console.log(chalk.red(` FAILED TO RESTART: ${startResult.error.toUpperCase()}`));
|
|
149
|
+
await prompts.waitForEnter();
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
console.log(chalk.green(' ✓ CLIPROXYAPI RESTARTED'));
|
|
153
|
+
} else {
|
|
154
|
+
console.log(chalk.green(' ✓ CLIPROXYAPI IS RUNNING'));
|
|
155
|
+
}
|
|
142
156
|
}
|
|
143
157
|
|
|
144
158
|
// First, check if models are already available (existing auth)
|