hedgequantx 2.9.218 → 2.9.219

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.9.218",
3
+ "version": "2.9.219",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -71,30 +71,31 @@ const dashboardMenu = async (service) => {
71
71
  // Daemon status
72
72
  const daemonOn = isDaemonRunning();
73
73
  const daemonDisplay = daemonOn ? 'ON' : 'OFF';
74
- const daemonColor = daemonOn ? chalk.green : chalk.gray;
74
+ const daemonColor = daemonOn ? chalk.green : chalk.red;
75
75
 
76
- // Fixed width columns for alignment (4 columns)
77
- const icon = chalk.yellow('✔ ');
78
- const colWidth = Math.floor(W / 4);
76
+ // Build stats items
77
+ const icon = chalk.yellow('✔');
78
+ const items = [
79
+ { label: 'Accounts', value: String(statsInfo.accounts), color: chalk.white },
80
+ { label: 'Balance', value: balStr, color: balColor },
81
+ { label: 'Daemon', value: daemonDisplay, color: daemonColor },
82
+ { label: 'AI', value: agentDisplay, color: agentColor },
83
+ ];
79
84
 
80
- const formatCol = (label, value, valueColor = chalk.white) => {
81
- const text = `✔ ${label}: ${value}`;
82
- const textLen = text.length;
83
- const padLeft = Math.floor((colWidth - textLen) / 2);
84
- const padRight = colWidth - textLen - padLeft;
85
- return ' '.repeat(Math.max(0, padLeft)) + icon + chalk.white(label + ': ') + valueColor(value) + ' '.repeat(Math.max(0, padRight));
86
- };
87
-
88
- const col1 = formatCol('Accounts', String(statsInfo.accounts));
89
- const col2 = formatCol('Balance', balStr, balColor);
90
- const col3 = formatCol('Daemon', daemonDisplay, daemonColor);
91
- const col4 = formatCol('AI', agentDisplay, agentColor);
85
+ // Format: "✔ Label: Value" with consistent spacing
86
+ const formatted = items.map(item =>
87
+ `${icon} ${chalk.white(item.label + ':')} ${item.color(item.value)}`
88
+ );
92
89
 
93
- const statsLine = col1 + col2 + col3 + col4;
94
- const statsPlainLen = statsLine.replace(/\x1b\[[0-9;]*m/g, '').length;
95
- const extraPad = W - statsPlainLen;
90
+ // Join with consistent gaps and center the whole line
91
+ const gap = ' '; // 4 spaces between items
92
+ const statsContent = formatted.join(gap);
93
+ const statsPlainLen = statsContent.replace(/\x1b\[[0-9;]*m/g, '').length;
94
+ const totalPad = W - statsPlainLen;
95
+ const padLeft = Math.floor(totalPad / 2);
96
+ const padRight = totalPad - padLeft;
96
97
 
97
- console.log(chalk.cyan('║') + statsLine + ' '.repeat(Math.max(0, extraPad)) + chalk.cyan('║'));
98
+ console.log(chalk.cyan('║') + ' '.repeat(padLeft) + statsContent + ' '.repeat(padRight) + chalk.cyan('║'));
98
99
  }
99
100
 
100
101
  console.log(chalk.cyan('╠' + '═'.repeat(W) + '╣'));