hedgequantx 2.6.117 → 2.6.119
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 +3 -12
package/package.json
CHANGED
package/src/menus/ai-agent.js
CHANGED
|
@@ -1065,17 +1065,11 @@ const setupProxyOAuth = async (provider, config) => {
|
|
|
1065
1065
|
});
|
|
1066
1066
|
}
|
|
1067
1067
|
|
|
1068
|
-
// Debug: show what we got
|
|
1069
|
-
console.log(chalk.yellow(` [DEBUG] Got: "${callbackUrl || 'EMPTY'}"`));
|
|
1070
|
-
console.log(chalk.yellow(` [DEBUG] Length: ${callbackUrl ? callbackUrl.length : 0}`));
|
|
1071
|
-
await prompts.waitForEnter(' [DEBUG] Press Enter to continue...');
|
|
1072
|
-
|
|
1073
1068
|
if (callbackUrl && callbackUrl.trim()) {
|
|
1074
1069
|
const submitSpinner = ora({ text: 'Submitting callback...', color: 'cyan' }).start();
|
|
1075
1070
|
try {
|
|
1076
1071
|
await proxyManager.submitCallback(callbackUrl.trim(), provider.id);
|
|
1077
1072
|
// Callback succeeded - CLIProxyAPI handles the token exchange
|
|
1078
|
-
// No need to poll waitForAuth, the callback endpoint already did everything
|
|
1079
1073
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
1080
1074
|
authSuccess = true;
|
|
1081
1075
|
submitSpinner.succeed('Authorization successful!');
|
|
@@ -1111,14 +1105,14 @@ const setupProxyOAuth = async (provider, config) => {
|
|
|
1111
1105
|
}
|
|
1112
1106
|
|
|
1113
1107
|
// Step 5: Fetch models from CLIProxyAPI
|
|
1114
|
-
|
|
1115
|
-
waitSpinner.start();
|
|
1108
|
+
const modelSpinner = ora({ text: 'Fetching available models from API...', color: 'cyan' }).start();
|
|
1116
1109
|
|
|
1117
1110
|
let models = [];
|
|
1118
1111
|
try {
|
|
1119
1112
|
models = await proxyManager.getModels();
|
|
1113
|
+
modelSpinner.succeed(`Found ${models.length} models`);
|
|
1120
1114
|
} catch (error) {
|
|
1121
|
-
|
|
1115
|
+
modelSpinner.fail(`Failed to fetch models: ${error.message}`);
|
|
1122
1116
|
await prompts.waitForEnter();
|
|
1123
1117
|
return await selectProviderOption(provider);
|
|
1124
1118
|
}
|
|
@@ -1142,7 +1136,6 @@ const setupProxyOAuth = async (provider, config) => {
|
|
|
1142
1136
|
const availableModels = filteredModels.length > 0 ? filteredModels : models;
|
|
1143
1137
|
|
|
1144
1138
|
if (!availableModels || availableModels.length === 0) {
|
|
1145
|
-
waitSpinner.fail('No models available');
|
|
1146
1139
|
console.log();
|
|
1147
1140
|
console.log(chalk.red(' ERROR: No models found for this provider'));
|
|
1148
1141
|
console.log(chalk.gray(' Make sure your subscription is active.'));
|
|
@@ -1151,8 +1144,6 @@ const setupProxyOAuth = async (provider, config) => {
|
|
|
1151
1144
|
return await selectProviderOption(provider);
|
|
1152
1145
|
}
|
|
1153
1146
|
|
|
1154
|
-
waitSpinner.succeed(`Found ${availableModels.length} models`);
|
|
1155
|
-
|
|
1156
1147
|
// Step 6: Let user select model
|
|
1157
1148
|
const selectedModel = await selectModelFromList(availableModels, config.name);
|
|
1158
1149
|
if (!selectedModel) {
|