hedgequantx 2.7.48 → 2.7.50

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.7.48",
3
+ "version": "2.7.50",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
package/src/app.js CHANGED
@@ -175,7 +175,7 @@ const run = async () => {
175
175
  await refreshStats();
176
176
  }
177
177
 
178
- spinner.stop();
178
+ // Don't stop spinner here - dashboardMenu will clear the screen
179
179
 
180
180
  // Main loop
181
181
  while (true) {
@@ -237,8 +237,19 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
237
237
  try { loginResult.childProcess.kill(); } catch (e) { /* ignore */ }
238
238
  }
239
239
 
240
- // Fetch models directly from CLIProxy
241
- const modelsResult = await cliproxy.fetchProviderModels(provider.id);
240
+ // Fetch models from CLIProxy (retry a few times if needed)
241
+ let modelsResult = { success: false, models: [] };
242
+ const spinner = ora({ text: 'LOADING MODELS...', color: 'yellow' }).start();
243
+
244
+ for (let i = 0; i < 5; i++) {
245
+ modelsResult = await cliproxy.fetchProviderModels(provider.id);
246
+ if (modelsResult.success && modelsResult.models.length > 0) {
247
+ spinner.stop();
248
+ break;
249
+ }
250
+ await new Promise(r => setTimeout(r, 1000));
251
+ }
252
+ spinner.stop();
242
253
 
243
254
  if (modelsResult.success && modelsResult.models.length > 0) {
244
255
  const selectedModel = await selectModelFromList(provider, modelsResult.models, boxWidth);
@@ -254,18 +265,15 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
254
265
  await prompts.waitForEnter();
255
266
  return true;
256
267
  }
268
+ // User pressed B to go back - still save as connected but no model selected yet
269
+ return true;
257
270
  }
258
271
 
259
- // No models available - use auto mode
260
- activateProvider(config, provider.id, {
261
- connectionType: 'cliproxy',
262
- modelId: null,
263
- modelName: 'AUTO'
264
- });
265
- saveConfig(config);
266
- console.log(chalk.green(`\n ✓ ${provider.name.toUpperCase()} CONNECTED (AUTO MODE)`));
272
+ // No models found - show error
273
+ console.log(chalk.red('\n NO MODELS AVAILABLE'));
274
+ console.log(chalk.gray(' TRY RECONNECTING OR USE API KEY'));
267
275
  await prompts.waitForEnter();
268
- return true;
276
+ return false;
269
277
  };
270
278
 
271
279
  /** Handle API Key connection */