hedgequantx 2.5.30 → 2.5.31
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 +9 -4
package/package.json
CHANGED
package/src/menus/dashboard.js
CHANGED
|
@@ -24,6 +24,7 @@ const dashboardMenu = async (service) => {
|
|
|
24
24
|
|
|
25
25
|
// Check AI connection status
|
|
26
26
|
const aiConnected = aiService.isConnected();
|
|
27
|
+
const aiAgentCount = aiService.getAgentCount();
|
|
27
28
|
|
|
28
29
|
const makeLine = (content, align = 'left') => {
|
|
29
30
|
const plainLen = content.replace(/\x1b\[[0-9;]*m/g, '').length;
|
|
@@ -57,8 +58,10 @@ const balStr = statsInfo.balance !== null ? `$${statsInfo.balance.toLocaleString
|
|
|
57
58
|
const balColor = statsInfo.balance !== null ? chalk.green : chalk.gray;
|
|
58
59
|
|
|
59
60
|
// Build plain text for length calculation
|
|
60
|
-
// Format: "✔ CONNECTIONS: X ✔ ACCOUNTS: X ✔ BALANCE: $X ✔ AI:
|
|
61
|
-
const aiText =
|
|
61
|
+
// Format: "✔ CONNECTIONS: X ✔ ACCOUNTS: X ✔ BALANCE: $X ✔ AI: X AGENT(S)"
|
|
62
|
+
const aiText = aiAgentCount > 0
|
|
63
|
+
? `${aiAgentCount} AGENT${aiAgentCount > 1 ? 'S' : ''}`
|
|
64
|
+
: 'NONE';
|
|
62
65
|
const plainText = `* CONNECTIONS: ${statsInfo.connections} * ACCOUNTS: ${statsInfo.accounts} * BALANCE: ${balStr} * AI: ${aiText}`;
|
|
63
66
|
const statsLen = plainText.length;
|
|
64
67
|
const statsLeftPad = Math.max(0, Math.floor((W - statsLen) / 2));
|
|
@@ -66,8 +69,10 @@ const balStr = statsInfo.balance !== null ? `$${statsInfo.balance.toLocaleString
|
|
|
66
69
|
|
|
67
70
|
// Build with unicode icons and colors
|
|
68
71
|
const checkIcon = chalk.yellow('✔ ');
|
|
69
|
-
const aiIcon =
|
|
70
|
-
const aiTextColored =
|
|
72
|
+
const aiIcon = aiAgentCount > 0 ? chalk.magenta('✔ ') : chalk.gray('○ ');
|
|
73
|
+
const aiTextColored = aiAgentCount > 0
|
|
74
|
+
? chalk.magenta(`${aiAgentCount} AGENT${aiAgentCount > 1 ? 'S' : ''}`)
|
|
75
|
+
: chalk.gray('NONE');
|
|
71
76
|
|
|
72
77
|
console.log(chalk.cyan('║') + ' '.repeat(statsLeftPad) +
|
|
73
78
|
checkIcon + chalk.white(`CONNECTIONS: ${statsInfo.connections}`) + ' ' +
|