hedgequantx 2.9.12 → 2.9.14

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.12",
3
+ "version": "2.9.14",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
package/src/app.js CHANGED
@@ -101,6 +101,7 @@ const refreshStats = async () => {
101
101
  balance: hasBalanceData ? totalBalance : null,
102
102
  pnl: hasPnlData ? totalPnl : null,
103
103
  pnlPercent: null,
104
+ agents: getActiveAgentCount(),
104
105
  });
105
106
  } catch (err) {
106
107
  log.warn('Failed to refresh stats', { error: err.message });
@@ -10,6 +10,7 @@ const { connections } = require('../services');
10
10
  const { getLogoWidth, centerText, prepareStdin, displayBanner, clearScreen } = require('../ui');
11
11
  const { getCachedStats } = require('../services/stats-cache');
12
12
  const { prompts } = require('../utils');
13
+ const { getActiveAgentCount } = require('../pages/ai-agents');
13
14
 
14
15
  /**
15
16
  * Dashboard menu after login
@@ -61,8 +62,8 @@ const dashboardMenu = async (service) => {
61
62
  const balStr = statsInfo.balance !== null ? `$${statsInfo.balance.toLocaleString()}` : '--';
62
63
  const balColor = statsInfo.balance !== null ? chalk.green : chalk.gray;
63
64
 
64
- // AI Agents status
65
- const agentCount = statsInfo.agents || 0;
65
+ // AI Agents status - get fresh count, not from cache
66
+ const agentCount = getActiveAgentCount();
66
67
  const agentDisplay = agentCount > 0 ? 'ON' : 'OFF';
67
68
  const agentColor = agentCount > 0 ? chalk.green : chalk.red;
68
69
 
@@ -242,11 +243,11 @@ const handleUpdate = async () => {
242
243
 
243
244
  spinner.succeed(`UPDATED TO V${latestVersion}!`);
244
245
  console.log(chalk.green('\n ✓ UPDATE SUCCESSFUL!'));
245
- console.log(chalk.yellow('\n Please restart HQX to use the new version.'));
246
- console.log(chalk.cyan(' Run: hqx\n'));
247
- await prompts.waitForEnter();
248
- // Return to let the app exit naturally from the menu loop
249
- return 'exit';
246
+ console.log(chalk.yellow('\n Restarting HQX...'));
247
+
248
+ // Small delay then exit - the user will run hqx again
249
+ await new Promise(r => setTimeout(r, 1500));
250
+ process.exit(0);
250
251
 
251
252
  } catch (error) {
252
253
  if (spinner) spinner.fail('UPDATE ERROR');