hedgequantx 2.6.72 → 2.6.74

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.6.72",
3
+ "version": "2.6.74",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -286,7 +286,8 @@ const selectActiveAgent = async () => {
286
286
 
287
287
  const choice = await prompts.textInput(chalk.cyan('SELECT AGENT:'));
288
288
 
289
- if (choice === '<' || choice?.toLowerCase() === 'b') {
289
+ // Empty input or < = go back
290
+ if (!choice || choice.trim() === '' || choice === '<' || choice?.toLowerCase() === 'b') {
290
291
  return await aiAgentMenu();
291
292
  }
292
293
 
@@ -340,7 +341,8 @@ const selectAgentForModelChange = async () => {
340
341
 
341
342
  const choice = await prompts.textInput(chalk.cyan('SELECT AGENT:'));
342
343
 
343
- if (choice === '<' || choice?.toLowerCase() === 'b') {
344
+ // Empty input or < = go back
345
+ if (!choice || choice.trim() === '' || choice === '<' || choice?.toLowerCase() === 'b') {
344
346
  return await aiAgentMenu();
345
347
  }
346
348
 
@@ -393,7 +395,8 @@ const selectAgentToRemove = async () => {
393
395
 
394
396
  const choice = await prompts.textInput(chalk.cyan('SELECT AGENT TO REMOVE:'));
395
397
 
396
- if (choice === '<' || choice?.toLowerCase() === 'b') {
398
+ // Empty input or < = go back
399
+ if (!choice || choice.trim() === '' || choice === '<' || choice?.toLowerCase() === 'b') {
397
400
  return await aiAgentMenu();
398
401
  }
399
402
 
@@ -1145,8 +1148,10 @@ const setupConnection = async (provider, option) => {
1145
1148
  case 'endpoint':
1146
1149
  const defaultEndpoint = option.defaultEndpoint || '';
1147
1150
  value = await prompts.textInput(chalk.cyan(`ENDPOINT [${defaultEndpoint || 'required'}]:`));
1148
- if (value && value.trim() === '<') return await selectProviderOption(provider);
1149
- credentials.endpoint = (value || defaultEndpoint).trim();
1151
+ if (!value || value.trim() === '<' || value.trim() === '') {
1152
+ if (!defaultEndpoint) return await selectProviderOption(provider);
1153
+ }
1154
+ credentials.endpoint = (value && value.trim() !== '<' ? value : defaultEndpoint).trim();
1150
1155
  if (!credentials.endpoint) return await selectProviderOption(provider);
1151
1156
  break;
1152
1157
 
@@ -1290,7 +1295,8 @@ const selectModelFromList = async (models, providerName) => {
1290
1295
 
1291
1296
  const choice = await prompts.textInput(chalk.cyan('SELECT MODEL:'));
1292
1297
 
1293
- if (choice === '<' || choice?.toLowerCase() === 'b') {
1298
+ // Empty input or < = go back
1299
+ if (!choice || choice.trim() === '' || choice === '<' || choice?.toLowerCase() === 'b') {
1294
1300
  return null;
1295
1301
  }
1296
1302
 
@@ -1415,7 +1421,8 @@ const selectModel = async (agent) => {
1415
1421
 
1416
1422
  const choice = await prompts.textInput(chalk.cyan('SELECT MODEL:'));
1417
1423
 
1418
- if (choice === '<' || choice?.toLowerCase() === 'b') {
1424
+ // Empty input or < = go back
1425
+ if (!choice || choice.trim() === '' || choice === '<' || choice?.toLowerCase() === 'b') {
1419
1426
  return await aiAgentMenu();
1420
1427
  }
1421
1428