polydev-ai 1.8.89 → 1.8.90

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.
@@ -470,6 +470,7 @@ To re-login: npx polydev-ai`
470
470
 
471
471
  console.error('[Polydev] Login successful, token saved');
472
472
 
473
+ // Wait 7 seconds before closing server (gives time for 5s auto-close countdown + buffer)
473
474
  setTimeout(() => {
474
475
  server.close();
475
476
  resolve({
@@ -497,7 +498,7 @@ To re-login: npx polydev-ai`
497
498
  }]
498
499
  }
499
500
  });
500
- }, 500);
501
+ }, 7000);
501
502
  } else {
502
503
  res.writeHead(400, { 'Content-Type': 'text/plain' });
503
504
  res.end('Invalid or missing token');
@@ -893,6 +894,16 @@ Error: ${error.message}`
893
894
  }
894
895
  .secondary-btn:hover { background: #fafafa; }
895
896
  .note { color: #999; font-size: 11px; margin-top: 16px; }
897
+ .countdown {
898
+ color: #666; font-size: 12px; margin-top: 8px;
899
+ display: flex; align-items: center; justify-content: center; gap: 6px;
900
+ }
901
+ .countdown-spinner {
902
+ width: 12px; height: 12px; border: 2px solid #e5e5e5;
903
+ border-top-color: #666; border-radius: 50%;
904
+ animation: spin 1s linear infinite;
905
+ }
906
+ @keyframes spin { to { transform: rotate(360deg); } }
896
907
  </style>
897
908
  </head>
898
909
  <body>
@@ -937,8 +948,29 @@ Error: ${error.message}`
937
948
  </a>
938
949
  <button onclick="window.close()" class="secondary-btn">Close Window</button>
939
950
 
940
- <p class="note">Restart your IDE to use the new token</p>
951
+ <p class="note">✓ Token saved. Restart your IDE to activate.</p>
952
+ <div class="countdown" id="countdown">
953
+ <div class="countdown-spinner"></div>
954
+ <span>Closing in <strong id="seconds">5</strong>s...</span>
955
+ </div>
941
956
  </div>
957
+ <script>
958
+ // Auto-close countdown
959
+ let seconds = 5;
960
+ const interval = setInterval(() => {
961
+ seconds--;
962
+ document.getElementById('seconds').textContent = seconds;
963
+ if (seconds <= 0) {
964
+ clearInterval(interval);
965
+ document.getElementById('countdown').innerHTML = 'Closing...';
966
+ window.close();
967
+ // Fallback: if window.close() doesn't work, hide countdown
968
+ setTimeout(() => {
969
+ document.getElementById('countdown').innerHTML = 'You can close this tab now.';
970
+ }, 500);
971
+ }
972
+ }, 1000);
973
+ </script>
942
974
  </body>
943
975
  </html>`;
944
976
  }
@@ -1395,7 +1427,7 @@ Error: ${error.message}`
1395
1427
  if (this._cliDetectionReady && !this._cliDetectionComplete) {
1396
1428
  console.error('[Stdio Wrapper] Waiting for initial CLI detection to complete...');
1397
1429
  await this._cliDetectionReady;
1398
- console.error('[Stdio Wrapper] CLI detection ready, proceeding with request');
1430
+ console.error('[Polydev] CLI detection ready, proceeding with request');
1399
1431
  }
1400
1432
 
1401
1433
  const results = await this.cliManager.forceCliDetection();
@@ -2371,6 +2403,7 @@ Error: ${error.message}`
2371
2403
 
2372
2404
  console.error('[Polydev] Login successful, token saved');
2373
2405
 
2406
+ // Wait 7 seconds before closing server (gives time for 5s auto-close countdown + buffer)
2374
2407
  setTimeout(() => {
2375
2408
  server.close();
2376
2409
  resolve({
@@ -2398,7 +2431,7 @@ Error: ${error.message}`
2398
2431
  }]
2399
2432
  }
2400
2433
  });
2401
- }, 500);
2434
+ }, 7000);
2402
2435
  } else {
2403
2436
  res.writeHead(400, { 'Content-Type': 'text/plain' });
2404
2437
  res.end('Invalid or missing token');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.8.89",
3
+ "version": "1.8.90",
4
4
  "engines": {
5
5
  "node": ">=20.x <=22.x"
6
6
  },