hedgequantx 2.5.34 → 2.5.35
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/pages/stats.js +17 -1
package/package.json
CHANGED
package/src/pages/stats.js
CHANGED
|
@@ -394,7 +394,13 @@ const showStats = async (service) => {
|
|
|
394
394
|
drawBoxHeader('AI SUPERVISION', boxWidth);
|
|
395
395
|
draw2ColHeader('AGENTS', 'PERFORMANCE', boxWidth);
|
|
396
396
|
|
|
397
|
-
// Agent
|
|
397
|
+
// Agent mode - INDIVIDUAL (1 agent) or CONSENSUS (2+ agents)
|
|
398
|
+
const isConsensusMode = aiAgents.length >= 2;
|
|
399
|
+
const agentMode = isConsensusMode ? 'CONSENSUS' : 'INDIVIDUAL';
|
|
400
|
+
const modeColor = isConsensusMode ? chalk.magenta : chalk.cyan;
|
|
401
|
+
|
|
402
|
+
// Get consensus data if in consensus mode
|
|
403
|
+
const consensusData = isConsensusMode ? AISupervisor.getConsensus() : null;
|
|
398
404
|
|
|
399
405
|
// Supervision metrics
|
|
400
406
|
let totalDecisions = 0;
|
|
@@ -437,9 +443,19 @@ const showStats = async (service) => {
|
|
|
437
443
|
// Agents column data (left side) - each agent on its own line with ● indicator
|
|
438
444
|
const agentsData = [
|
|
439
445
|
{ label: 'CONNECTED:', value: chalk.green(String(aiAgents.length) + ' AGENT' + (aiAgents.length > 1 ? 'S' : '')) },
|
|
446
|
+
{ label: 'MODE:', value: modeColor(agentMode) },
|
|
440
447
|
{ label: 'SESSION:', value: sessionTimeStr === 'INACTIVE' ? chalk.yellow(sessionTimeStr) : chalk.white(sessionTimeStr) }
|
|
441
448
|
];
|
|
442
449
|
|
|
450
|
+
// Add consensus info if in consensus mode
|
|
451
|
+
if (isConsensusMode && consensusData) {
|
|
452
|
+
const agreement = consensusData.agreement !== null
|
|
453
|
+
? Math.round(consensusData.agreement * 100) + '%'
|
|
454
|
+
: 'N/A';
|
|
455
|
+
const consensusAction = consensusData.action || 'PENDING';
|
|
456
|
+
agentsData.push({ label: 'CONSENSUS:', value: chalk.magenta(consensusAction + ' (' + agreement + ')') });
|
|
457
|
+
}
|
|
458
|
+
|
|
443
459
|
// Add each agent as a separate line with ● indicator
|
|
444
460
|
aiAgents.forEach((agent, idx) => {
|
|
445
461
|
const agentLabel = idx === 0 ? 'AGENTS:' : '';
|