hedgequantx 2.5.31 → 2.5.32

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/pages/stats.js +11 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.5.31",
3
+ "version": "2.5.32",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -426,11 +426,17 @@ const showStats = async (service) => {
426
426
  const supervisedAccounts = supervisionData.totalAccounts;
427
427
  const supervisedPnL = supervisionData.totalPnL;
428
428
 
429
- console.log(chalk.cyan('\u2551') + fmtRow('CONNECTED AGENTS:', chalk.green(String(aiAgents.length)), col1) + chalk.cyan('\u2502') + fmtRow('SUPERVISED ACCOUNTS:', supervisedAccounts > 0 ? chalk.white(String(supervisedAccounts)) : chalk.gray('0'), col2) + chalk.cyan('\u2551'));
430
- console.log(chalk.cyan('\u2551') + fmtRow('MODE:', modeColor(agentMode), col1) + chalk.cyan('\u2502') + fmtRow('SUPERVISED P&L:', supervisedPnL !== 0 ? (supervisedPnL >= 0 ? chalk.green('$' + supervisedPnL.toFixed(2)) : chalk.red('$' + supervisedPnL.toFixed(2))) : chalk.gray('$0.00'), col2) + chalk.cyan('\u2551'));
431
- console.log(chalk.cyan('\u2551') + fmtRow('ACTIVE:', activeAgent ? chalk.green(activeAgent.name) : chalk.gray('NONE'), col1) + chalk.cyan('\u2502') + fmtRow('POSITIONS:', chalk.white(String(supervisionData.totalPositions)), col2) + chalk.cyan('\u2551'));
432
- console.log(chalk.cyan('\u2551') + fmtRow('SESSION TIME:', chalk.white(sessionTimeStr), col1) + chalk.cyan('\u2502') + fmtRow('OPEN ORDERS:', chalk.white(String(supervisionData.totalOrders)), col2) + chalk.cyan('\u2551'));
433
- console.log(chalk.cyan('\u2551') + fmtRow('AGENTS:', chalk.gray(agentNames.substring(0, col1 - 10)), col1) + chalk.cyan('\u2502') + fmtRow('TRADES TODAY:', chalk.white(String(supervisionData.totalTrades)), col2) + chalk.cyan('\u2551'));
429
+ // Calculate max agent name length to fit in column (label=18 + space=1 + padding buffer)
430
+ const maxAgentNameLen = col1 - 20;
431
+ const agentNamesDisplay = agentNames.length > maxAgentNameLen
432
+ ? agentNames.substring(0, maxAgentNameLen - 2) + '..'
433
+ : agentNames;
434
+
435
+ console.log(chalk.cyan('\u2551') + fmtRow('CONNECTED AGENTS:', chalk.green(String(aiAgents.length)), col1) + chalk.cyan('\u2502') + fmtRow('SUPERVISED ACCOUNTS:', chalk.white(String(supervisedAccounts)), col2) + chalk.cyan('\u2551'));
436
+ console.log(chalk.cyan('\u2551') + fmtRow('MODE:', modeColor(agentMode), col1) + chalk.cyan('\u2502') + fmtRow('SUPERVISED P&L:', supervisedPnL >= 0 ? chalk.green('$' + supervisedPnL.toFixed(2)) : chalk.red('$' + supervisedPnL.toFixed(2)), col2) + chalk.cyan('\u2551'));
437
+ console.log(chalk.cyan('\u2551') + fmtRow('ACTIVE:', activeAgent ? chalk.green(activeAgent.name) : chalk.white('NONE'), col1) + chalk.cyan('\u2502') + fmtRow('POSITIONS:', chalk.white(String(supervisionData.totalPositions)), col2) + chalk.cyan('\u2551'));
438
+ console.log(chalk.cyan('\u2551') + fmtRow('SESSION TIME:', sessionTimeStr === 'INACTIVE' ? chalk.yellow(sessionTimeStr) : chalk.white(sessionTimeStr), col1) + chalk.cyan('\u2502') + fmtRow('OPEN ORDERS:', chalk.white(String(supervisionData.totalOrders)), col2) + chalk.cyan('\u2551'));
439
+ console.log(chalk.cyan('\u2551') + fmtRow('AGENTS:', chalk.white(agentNamesDisplay), col1) + chalk.cyan('\u2502') + fmtRow('TRADES TODAY:', chalk.white(String(supervisionData.totalTrades)), col2) + chalk.cyan('\u2551'));
434
440
 
435
441
  drawBoxFooter(boxWidth);
436
442
  }