hedgequantx 2.5.17 → 2.5.19

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.17",
3
+ "version": "2.5.19",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -46,7 +46,9 @@ const aiAgentMenu = async () => {
46
46
  // List all agents
47
47
  for (let i = 0; i < agents.length; i++) {
48
48
  const agent = agents[i];
49
- const activeMarker = agent.isActive ? chalk.yellow(' *') : '';
49
+ // Show ACTIVE marker (if single agent, it's always active)
50
+ const isActive = agent.isActive || agents.length === 1;
51
+ const activeMarker = isActive ? chalk.green(' [ACTIVE]') : '';
50
52
  const providerColor = agent.providerId === 'anthropic' ? chalk.magenta :
51
53
  agent.providerId === 'openai' ? chalk.green :
52
54
  agent.providerId === 'openrouter' ? chalk.yellow : chalk.cyan;
@@ -66,7 +68,10 @@ const aiAgentMenu = async () => {
66
68
  console.log(makeLine(chalk.green('[+] ADD NEW AGENT')));
67
69
 
68
70
  if (agentCount > 0) {
69
- console.log(makeLine(chalk.cyan('[S] SET ACTIVE AGENT')));
71
+ // Only show SET ACTIVE if more than 1 agent
72
+ if (agentCount > 1) {
73
+ console.log(makeLine(chalk.cyan('[S] SET ACTIVE AGENT')));
74
+ }
70
75
  console.log(makeLine(chalk.yellow('[M] CHANGE MODEL')));
71
76
  console.log(makeLine(chalk.red('[R] REMOVE AGENT')));
72
77
  if (agentCount > 1) {
@@ -79,24 +79,30 @@ const balStr = statsInfo.balance !== null ? `$${statsInfo.balance.toLocaleString
79
79
 
80
80
  console.log(chalk.cyan('╠' + '═'.repeat(W) + '╣'));
81
81
 
82
- // Menu in 3 columns - evenly distributed
82
+ // Menu in 3 columns - fixed width columns for perfect alignment
83
+ const colWidth = Math.floor(W / 3);
84
+
83
85
  const menuRow3 = (col1, col2, col3) => {
84
86
  const c1Plain = col1.replace(/\x1b\[[0-9;]*m/g, '');
85
87
  const c2Plain = col2.replace(/\x1b\[[0-9;]*m/g, '');
86
88
  const c3Plain = col3.replace(/\x1b\[[0-9;]*m/g, '');
87
89
 
88
- // Total content length
89
- const totalContent = c1Plain.length + c2Plain.length + c3Plain.length;
90
- // Available space for padding
91
- const totalPadding = W - totalContent;
92
- // Divide into 4 gaps: left margin, between 1-2, between 2-3, right margin
93
- const gap = Math.floor(totalPadding / 4);
94
- const extraPad = totalPadding - (gap * 4);
90
+ // Center each item within its fixed-width column
91
+ const pad1Left = Math.floor((colWidth - c1Plain.length) / 2);
92
+ const pad1Right = colWidth - c1Plain.length - pad1Left;
93
+
94
+ const pad2Left = Math.floor((colWidth - c2Plain.length) / 2);
95
+ const pad2Right = colWidth - c2Plain.length - pad2Left;
96
+
97
+ // Third column gets remaining width
98
+ const col3Width = W - (colWidth * 2);
99
+ const pad3Left = Math.floor((col3Width - c3Plain.length) / 2);
100
+ const pad3Right = col3Width - c3Plain.length - pad3Left;
95
101
 
96
- const line = ' '.repeat(gap) +
97
- col1 + ' '.repeat(gap) +
98
- col2 + ' '.repeat(gap) +
99
- col3 + ' '.repeat(gap + extraPad);
102
+ const line =
103
+ ' '.repeat(pad1Left) + col1 + ' '.repeat(pad1Right) +
104
+ ' '.repeat(pad2Left) + col2 + ' '.repeat(pad2Right) +
105
+ ' '.repeat(pad3Left) + col3 + ' '.repeat(pad3Right);
100
106
 
101
107
  console.log(chalk.cyan('║') + line + chalk.cyan('║'));
102
108
  };
@@ -108,8 +114,14 @@ const balStr = statsInfo.balance !== null ? `$${statsInfo.balance.toLocaleString
108
114
  console.log(chalk.cyan('║') + ' '.repeat(leftPad) + content + ' '.repeat(padding - leftPad) + chalk.cyan('║'));
109
115
  };
110
116
 
111
- menuRow3(chalk.cyan('[1] VIEW ACCOUNTS'), chalk.cyan('[2] VIEW STATS'), chalk.cyan('[+] ADD ACCOUNT'));
112
- menuRow3(chalk.magenta('[A] ALGO TRADING'), chalk.magenta('[I] AI AGENT'), chalk.yellow('[U] UPDATE HQX'));
117
+ // Fixed-width menu items for perfect alignment
118
+ const menuItem = (key, label, color) => {
119
+ const text = `[${key}] ${label.padEnd(14)}`;
120
+ return color(text);
121
+ };
122
+
123
+ menuRow3(menuItem('1', 'VIEW ACCOUNTS', chalk.cyan), menuItem('2', 'VIEW STATS', chalk.cyan), menuItem('+', 'ADD ACCOUNT', chalk.cyan));
124
+ menuRow3(menuItem('A', 'ALGO TRADING', chalk.magenta), menuItem('I', 'AI AGENT', chalk.magenta), menuItem('U', 'UPDATE HQX', chalk.yellow));
113
125
 
114
126
  // Separator and disconnect button centered
115
127
  console.log(chalk.cyan('╠' + '═'.repeat(W) + '╣'));