hedgequantx 2.7.43 → 2.7.44

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.43",
3
+ "version": "2.7.44",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -250,6 +250,7 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
250
250
  restartSpinner.text = 'WAITING FOR CLIPROXYAPI TO LOAD TOKENS...';
251
251
  let modelsResult = { success: false, models: [] };
252
252
 
253
+ let foundModels = false;
253
254
  for (let i = 0; i < 15; i++) {
254
255
  await new Promise(r => setTimeout(r, 2000));
255
256
  restartSpinner.text = `LOADING MODELS (${i + 1}/15)...`;
@@ -260,13 +261,19 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
260
261
  modelsResult = await cliproxy.fetchProviderModels(provider.id);
261
262
  if (modelsResult.success && modelsResult.models.length > 0) {
262
263
  restartSpinner.succeed(`CLIPROXYAPI READY - ${modelsResult.models.length} MODELS FOUND`);
264
+ foundModels = true;
263
265
  break;
264
266
  }
265
267
  }
266
268
  }
267
269
 
270
+ // Stop spinner if still running (no models found after 15 tries)
271
+ if (!foundModels) {
272
+ restartSpinner.warn('NO MODELS FOUND - USING AUTO MODE');
273
+ }
274
+
268
275
  // Show model selection or fallback to auto
269
- if (modelsResult.success && modelsResult.models.length > 0) {
276
+ if (foundModels && modelsResult.models.length > 0) {
270
277
  const selectedModel = await selectModelFromList(provider, modelsResult.models, boxWidth);
271
278
  if (selectedModel) {
272
279
  activateProvider(config, provider.id, {
@@ -278,17 +285,19 @@ const handleCliProxyConnection = async (provider, config, boxWidth) => {
278
285
  console.log(chalk.green(`\n ✓ ${provider.name.toUpperCase()} CONNECTED VIA PAID PLAN`));
279
286
  console.log(chalk.cyan(` MODEL: ${selectedModel.name.toUpperCase()}`));
280
287
  }
288
+ await prompts.waitForEnter();
289
+ return true;
281
290
  }
282
- } else {
283
- // No models but auth might have worked
284
- activateProvider(config, provider.id, {
285
- connectionType: 'cliproxy',
286
- modelId: null,
287
- modelName: 'AUTO'
288
- });
289
- if (saveConfig(config)) {
290
- console.log(chalk.green(`\n ${provider.name.toUpperCase()} CONNECTED VIA PAID PLAN (AUTO MODE)`));
291
- }
291
+ }
292
+
293
+ // No models or user cancelled - use auto mode
294
+ activateProvider(config, provider.id, {
295
+ connectionType: 'cliproxy',
296
+ modelId: null,
297
+ modelName: 'AUTO'
298
+ });
299
+ if (saveConfig(config)) {
300
+ console.log(chalk.green(`\n ✓ ${provider.name.toUpperCase()} CONNECTED VIA PAID PLAN (AUTO MODE)`));
292
301
  }
293
302
 
294
303
  await prompts.waitForEnter();