hedgequantx 2.6.66 → 2.6.67
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 +16 -4
package/package.json
CHANGED
package/src/menus/ai-agent.js
CHANGED
|
@@ -893,10 +893,22 @@ const setupConnection = async (provider, option) => {
|
|
|
893
893
|
|
|
894
894
|
// Show URL and open browser
|
|
895
895
|
if (option.url && (field === 'apiKey' || field === 'sessionKey' || field === 'accessToken')) {
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
896
|
+
const browserOpened = await openBrowser(option.url);
|
|
897
|
+
if (browserOpened) {
|
|
898
|
+
console.log(makeLine(chalk.green('BROWSER OPENED')));
|
|
899
|
+
console.log(makeLine(''));
|
|
900
|
+
console.log(makeLine(chalk.cyan('LINK: ') + chalk.white(option.url)));
|
|
901
|
+
} else {
|
|
902
|
+
console.log(makeLine(chalk.yellow('COULD NOT OPEN BROWSER (VPS/SSH?)')));
|
|
903
|
+
console.log(makeLine(''));
|
|
904
|
+
console.log(makeLine(chalk.white('OPEN THIS URL IN YOUR BROWSER:')));
|
|
905
|
+
console.log(makeLine(''));
|
|
906
|
+
// Split URL into chunks that fit the box width
|
|
907
|
+
const maxUrlLen = W - 4;
|
|
908
|
+
for (let i = 0; i < option.url.length; i += maxUrlLen) {
|
|
909
|
+
console.log(makeLine(chalk.cyan(option.url.substring(i, i + maxUrlLen))));
|
|
910
|
+
}
|
|
911
|
+
}
|
|
900
912
|
}
|
|
901
913
|
|
|
902
914
|
// Show default for endpoint
|