hedgequantx 2.6.116 → 2.6.118
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 -7
package/package.json
CHANGED
package/src/menus/ai-agent.js
CHANGED
|
@@ -1065,15 +1065,11 @@ const setupProxyOAuth = async (provider, config) => {
|
|
|
1065
1065
|
});
|
|
1066
1066
|
}
|
|
1067
1067
|
|
|
1068
|
-
// Debug: show what we got
|
|
1069
|
-
console.log(chalk.gray(` [DEBUG] Got: "${callbackUrl ? callbackUrl.substring(0, 50) + '...' : 'EMPTY'}"`));
|
|
1070
|
-
|
|
1071
1068
|
if (callbackUrl && callbackUrl.trim()) {
|
|
1072
1069
|
const submitSpinner = ora({ text: 'Submitting callback...', color: 'cyan' }).start();
|
|
1073
1070
|
try {
|
|
1074
1071
|
await proxyManager.submitCallback(callbackUrl.trim(), provider.id);
|
|
1075
1072
|
// Callback succeeded - CLIProxyAPI handles the token exchange
|
|
1076
|
-
// No need to poll waitForAuth, the callback endpoint already did everything
|
|
1077
1073
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
1078
1074
|
authSuccess = true;
|
|
1079
1075
|
submitSpinner.succeed('Authorization successful!');
|
|
@@ -1109,14 +1105,14 @@ const setupProxyOAuth = async (provider, config) => {
|
|
|
1109
1105
|
}
|
|
1110
1106
|
|
|
1111
1107
|
// Step 5: Fetch models from CLIProxyAPI
|
|
1112
|
-
|
|
1113
|
-
waitSpinner.start();
|
|
1108
|
+
const modelSpinner = ora({ text: 'Fetching available models from API...', color: 'cyan' }).start();
|
|
1114
1109
|
|
|
1115
1110
|
let models = [];
|
|
1116
1111
|
try {
|
|
1117
1112
|
models = await proxyManager.getModels();
|
|
1113
|
+
modelSpinner.succeed(`Found ${models.length} models`);
|
|
1118
1114
|
} catch (error) {
|
|
1119
|
-
|
|
1115
|
+
modelSpinner.fail(`Failed to fetch models: ${error.message}`);
|
|
1120
1116
|
await prompts.waitForEnter();
|
|
1121
1117
|
return await selectProviderOption(provider);
|
|
1122
1118
|
}
|