hedgequantx 2.7.4 → 2.7.5
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 +1 -1
- package/src/menus/dashboard.js +21 -12
package/package.json
CHANGED
package/src/menus/dashboard.js
CHANGED
|
@@ -43,7 +43,7 @@ const dashboardMenu = async (service) => {
|
|
|
43
43
|
console.log(makeLine(propfirmText, 'center'));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
// Stats bar with
|
|
46
|
+
// Stats bar with aligned columns
|
|
47
47
|
const statsInfo = getCachedStats();
|
|
48
48
|
if (statsInfo) {
|
|
49
49
|
console.log(chalk.cyan('╠' + '═'.repeat(W) + '╣'));
|
|
@@ -56,18 +56,27 @@ const dashboardMenu = async (service) => {
|
|
|
56
56
|
const agentDisplay = agentCount > 0 ? `${agentCount} connected` : 'disconnected';
|
|
57
57
|
const agentColor = agentCount > 0 ? chalk.green : chalk.red;
|
|
58
58
|
|
|
59
|
-
//
|
|
59
|
+
// Fixed width columns for alignment (3 columns now)
|
|
60
60
|
const icon = chalk.yellow('✔ ');
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
icon + chalk.white(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
61
|
+
const colWidth = Math.floor(W / 3);
|
|
62
|
+
|
|
63
|
+
const formatCol = (label, value, valueColor = chalk.white) => {
|
|
64
|
+
const text = `${label}: ${value}`;
|
|
65
|
+
const padding = colWidth - text.length - 2; // -2 for icon
|
|
66
|
+
return icon + chalk.white(label + ': ') + valueColor(value) + ' '.repeat(Math.max(0, padding));
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const col1 = formatCol('Accounts', String(statsInfo.accounts));
|
|
70
|
+
const col2 = formatCol('Balance', balStr, balColor);
|
|
71
|
+
const col3 = formatCol('AI Agents', agentDisplay, agentColor);
|
|
72
|
+
|
|
73
|
+
const statsLine = col1 + col2 + col3;
|
|
74
|
+
const statsPlainLen = statsLine.replace(/\x1b\[[0-9;]*m/g, '').length;
|
|
75
|
+
const totalPad = W - statsPlainLen;
|
|
76
|
+
const leftPad = Math.floor(totalPad / 2);
|
|
77
|
+
const rightPad = totalPad - leftPad;
|
|
78
|
+
|
|
79
|
+
console.log(chalk.cyan('║') + ' '.repeat(Math.max(0, leftPad)) + statsLine + ' '.repeat(Math.max(0, rightPad)) + chalk.cyan('║'));
|
|
71
80
|
}
|
|
72
81
|
|
|
73
82
|
console.log(chalk.cyan('╠' + '═'.repeat(W) + '╣'));
|