polydev-ai 1.8.76 → 1.8.77
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/mcp/stdio-wrapper.js +21 -0
- package/package.json +1 -1
package/mcp/stdio-wrapper.js
CHANGED
|
@@ -439,6 +439,7 @@ class StdioMCPWrapper {
|
|
|
439
439
|
this.saveTokenToFiles(token);
|
|
440
440
|
this.userToken = token;
|
|
441
441
|
this.isAuthenticated = true;
|
|
442
|
+
this._freshLogin = true; // Flag for opening models page after CLI detection
|
|
442
443
|
|
|
443
444
|
res.writeHead(200, {
|
|
444
445
|
'Content-Type': 'text/html; charset=utf-8',
|
|
@@ -2050,6 +2051,7 @@ class StdioMCPWrapper {
|
|
|
2050
2051
|
this.saveTokenToFiles(token);
|
|
2051
2052
|
this.userToken = token;
|
|
2052
2053
|
this.isAuthenticated = true;
|
|
2054
|
+
this._freshLogin = true; // Flag for opening models page after CLI detection
|
|
2053
2055
|
|
|
2054
2056
|
res.writeHead(200, {
|
|
2055
2057
|
'Content-Type': 'text/html; charset=utf-8',
|
|
@@ -2203,6 +2205,25 @@ class StdioMCPWrapper {
|
|
|
2203
2205
|
}
|
|
2204
2206
|
|
|
2205
2207
|
console.error('─'.repeat(50) + '\n');
|
|
2208
|
+
|
|
2209
|
+
// Open models page on fresh login for API key setup
|
|
2210
|
+
if (this._freshLogin) {
|
|
2211
|
+
this._freshLogin = false;
|
|
2212
|
+
console.error('Opening Polydev Models page for API key configuration...');
|
|
2213
|
+
console.error('Add your API keys to unlock more models!\n');
|
|
2214
|
+
|
|
2215
|
+
const { execFile } = require('child_process');
|
|
2216
|
+
const modelsUrl = 'https://polydev.ai/dashboard/models';
|
|
2217
|
+
const platform = process.platform;
|
|
2218
|
+
|
|
2219
|
+
if (platform === 'darwin') {
|
|
2220
|
+
execFile('open', [modelsUrl]);
|
|
2221
|
+
} else if (platform === 'win32') {
|
|
2222
|
+
execFile('cmd', ['/c', 'start', '', modelsUrl]);
|
|
2223
|
+
} else {
|
|
2224
|
+
execFile('xdg-open', [modelsUrl]);
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2206
2227
|
} catch (error) {
|
|
2207
2228
|
// Ignore errors in status display
|
|
2208
2229
|
}
|