hedgequantx 2.5.19 → 2.5.21
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/ai-agent.js +34 -11
- package/src/services/ai/providers/index.js +10 -2
package/package.json
CHANGED
package/src/menus/ai-agent.js
CHANGED
|
@@ -64,23 +64,46 @@ const aiAgentMenu = async () => {
|
|
|
64
64
|
|
|
65
65
|
console.log(chalk.cyan('╠' + '═'.repeat(W) + '╣'));
|
|
66
66
|
|
|
67
|
-
// Menu
|
|
68
|
-
|
|
67
|
+
// Menu in 2 columns
|
|
68
|
+
const colWidth = Math.floor(W / 2);
|
|
69
69
|
|
|
70
|
+
const menuRow2 = (col1, col2 = '') => {
|
|
71
|
+
const c1Plain = col1.replace(/\x1b\[[0-9;]*m/g, '');
|
|
72
|
+
const c2Plain = col2.replace(/\x1b\[[0-9;]*m/g, '');
|
|
73
|
+
|
|
74
|
+
const pad1Left = Math.floor((colWidth - c1Plain.length) / 2);
|
|
75
|
+
const pad1Right = colWidth - c1Plain.length - pad1Left;
|
|
76
|
+
|
|
77
|
+
const col2Width = W - colWidth;
|
|
78
|
+
const pad2Left = Math.floor((col2Width - c2Plain.length) / 2);
|
|
79
|
+
const pad2Right = col2Width - c2Plain.length - pad2Left;
|
|
80
|
+
|
|
81
|
+
const line =
|
|
82
|
+
' '.repeat(pad1Left) + col1 + ' '.repeat(pad1Right) +
|
|
83
|
+
' '.repeat(pad2Left) + col2 + ' '.repeat(pad2Right);
|
|
84
|
+
|
|
85
|
+
console.log(chalk.cyan('║') + line + chalk.cyan('║'));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const menuItem = (key, label, color) => {
|
|
89
|
+
const text = `[${key}] ${label.padEnd(14)}`;
|
|
90
|
+
return color(text);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// Menu options in 2 columns
|
|
70
94
|
if (agentCount > 0) {
|
|
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
|
-
}
|
|
75
|
-
console.log(makeLine(chalk.yellow('[M] CHANGE MODEL')));
|
|
76
|
-
console.log(makeLine(chalk.red('[R] REMOVE AGENT')));
|
|
77
95
|
if (agentCount > 1) {
|
|
78
|
-
|
|
96
|
+
menuRow2(menuItem('+', 'ADD AGENT', chalk.green), menuItem('S', 'SET ACTIVE', chalk.cyan));
|
|
97
|
+
menuRow2(menuItem('M', 'CHANGE MODEL', chalk.yellow), menuItem('R', 'REMOVE AGENT', chalk.red));
|
|
98
|
+
menuRow2(menuItem('X', 'REMOVE ALL', chalk.red), menuItem('<', 'BACK', chalk.gray));
|
|
99
|
+
} else {
|
|
100
|
+
menuRow2(menuItem('+', 'ADD AGENT', chalk.green), menuItem('M', 'CHANGE MODEL', chalk.yellow));
|
|
101
|
+
menuRow2(menuItem('R', 'REMOVE AGENT', chalk.red), menuItem('<', 'BACK', chalk.gray));
|
|
79
102
|
}
|
|
103
|
+
} else {
|
|
104
|
+
menuRow2(menuItem('+', 'ADD AGENT', chalk.green), menuItem('<', 'BACK', chalk.gray));
|
|
80
105
|
}
|
|
81
106
|
|
|
82
|
-
console.log(makeLine(chalk.gray('[<] BACK')));
|
|
83
|
-
|
|
84
107
|
drawBoxFooter(boxWidth);
|
|
85
108
|
|
|
86
109
|
const choice = await prompts.textInput(chalk.cyan('SELECT:'));
|
|
@@ -43,8 +43,16 @@ const PROVIDERS = {
|
|
|
43
43
|
name: 'CLAUDE (ANTHROPIC)',
|
|
44
44
|
description: 'Direct connection to Claude',
|
|
45
45
|
category: 'direct',
|
|
46
|
-
models: [
|
|
47
|
-
|
|
46
|
+
models: [
|
|
47
|
+
'claude-opus-4-20250514', // Claude Opus 4 (latest flagship)
|
|
48
|
+
'claude-sonnet-4-20250514', // Claude Sonnet 4
|
|
49
|
+
'claude-sonnet-4-5-20250929', // Claude Sonnet 4.5 (extended thinking)
|
|
50
|
+
'claude-3-5-sonnet-20241022', // Claude 3.5 Sonnet v2
|
|
51
|
+
'claude-3-5-haiku-20241022', // Claude 3.5 Haiku
|
|
52
|
+
'claude-3-opus-20240229', // Claude 3 Opus
|
|
53
|
+
'claude-3-haiku-20240307' // Claude 3 Haiku
|
|
54
|
+
],
|
|
55
|
+
defaultModel: 'claude-sonnet-4-20250514',
|
|
48
56
|
options: [
|
|
49
57
|
{
|
|
50
58
|
id: 'api_key',
|