hedgequantx 2.5.3 → 2.5.4

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.5.3",
3
+ "version": "2.5.4",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -52,36 +52,29 @@ const dashboardMenu = async (service) => {
52
52
  const balStr = statsInfo.balance !== null ? `$${statsInfo.balance.toLocaleString()}` : '--';
53
53
  const balColor = statsInfo.balance !== null ? chalk.green : chalk.gray;
54
54
 
55
- let pnlDisplay, pnlColor;
56
- if (statsInfo.pnl !== null) {
57
- pnlColor = statsInfo.pnl >= 0 ? chalk.green : chalk.red;
58
- pnlDisplay = `${statsInfo.pnl >= 0 ? '+' : ''}$${Math.abs(statsInfo.pnl).toLocaleString()}`;
59
- } else {
60
- pnlColor = chalk.gray;
61
- pnlDisplay = '--';
62
- }
63
-
64
55
  // AI status
65
56
  const aiConnection = aiService.getConnection();
66
57
  const aiStatus = aiConnection
67
58
  ? aiConnection.provider.name.split(' ')[0] // Just "CLAUDE" or "OPENAI"
68
59
  : null;
69
60
 
70
- // Yellow icons: for each stat
71
- const icon = chalk.yellow(' ');
72
- const aiIcon = aiStatus ? chalk.magenta('✔ ') : chalk.gray('○ ');
73
- const aiText = aiStatus ? chalk.magenta(aiStatus) : chalk.gray('NONE');
61
+ // Build stats line with simple ASCII icons (+ for connected, - for not)
62
+ const statsContent = `+ CONNECTIONS: ${statsInfo.connections} + ACCOUNTS: ${statsInfo.accounts} + BALANCE: ${balStr} ${aiStatus ? '+' : '-'} AI: ${aiStatus || 'NONE'}`;
63
+ const statsLen = statsContent.length;
64
+ const statsLeftPad = Math.max(0, Math.floor((W - statsLen) / 2));
65
+ const statsRightPad = Math.max(0, W - statsLen - statsLeftPad);
74
66
 
75
- const statsPlain = `✔ CONNECTIONS: ${statsInfo.connections} ✔ ACCOUNTS: ${statsInfo.accounts} ✔ BALANCE: ${balStr} AI: ${aiStatus || 'NONE'}`;
76
- const statsLeftPad = Math.max(0, Math.floor((W - statsPlain.length) / 2));
77
- const statsRightPad = Math.max(0, W - statsPlain.length - statsLeftPad);
67
+ // Now build with colors (use same text so length matches)
68
+ const icon = chalk.yellow('+ ');
69
+ const aiIcon = aiStatus ? chalk.magenta('+ ') : chalk.gray('- ');
70
+ const aiText = aiStatus ? chalk.magenta(aiStatus) : chalk.gray('NONE');
78
71
 
79
72
  console.log(chalk.cyan('║') + ' '.repeat(statsLeftPad) +
80
73
  icon + chalk.white(`CONNECTIONS: ${statsInfo.connections}`) + ' ' +
81
74
  icon + chalk.white(`ACCOUNTS: ${statsInfo.accounts}`) + ' ' +
82
75
  icon + chalk.white('BALANCE: ') + balColor(balStr) + ' ' +
83
76
  aiIcon + chalk.white('AI: ') + aiText +
84
- ' '.repeat(Math.max(0, statsRightPad)) + chalk.cyan('║'));
77
+ ' '.repeat(statsRightPad) + chalk.cyan('║'));
85
78
  }
86
79
 
87
80
  console.log(chalk.cyan('╠' + '═'.repeat(W) + '╣'));