zames_pro 2.41.1 → 2.42.0

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.
Files changed (2) hide show
  1. package/dist/browser.js +13 -2
  2. package/package.json +1 -1
package/dist/browser.js CHANGED
@@ -391,6 +391,12 @@ export class DeepSeekBrowser {
391
391
  // the agent hung until the timeout.
392
392
  _netBody;
393
393
  _netHookInstalled;
394
+ // The page object the net hook was installed on. A RELAUNCH (e.g. the
395
+ // headless UA fix) creates a NEW page; comparing against this lets
396
+ // _installNetHook re-attach to the new page instead of silently skipping
397
+ // (which left the post-fix page with no capture and "no answer" in
398
+ // headless, while headed worked).
399
+ _netHookPage;
394
400
  // Fired right when a message is actually typed/sent (AFTER the send-pause
395
401
  // and attachments). Used to start the "agent is working" spinner only when
396
402
  // a generation really begins, not during the pre-send phase (chat open,
@@ -462,6 +468,7 @@ export class DeepSeekBrowser {
462
468
  this._lastHistoryError = '';
463
469
  this._netBody = '';
464
470
  this._netHookInstalled = false;
471
+ this._netHookPage = null;
465
472
  this.onSendStart = null;
466
473
  this.onSendPause = null;
467
474
  this.onSendState = null;
@@ -609,12 +616,16 @@ export class DeepSeekBrowser {
609
616
  await this.page.goto(CHAT_URL, { waitUntil: 'domcontentloaded' });
610
617
  }
611
618
  _installNetHook() {
612
- if (this._netHookInstalled)
613
- return;
614
619
  const pg = this['page'];
615
620
  if (!pg)
616
621
  return;
622
+ // Skip only when the hook is ALREADY on THIS page. After a relaunch the
623
+ // page object changed, so we must attach to the new one — otherwise the
624
+ // capture stayed dead and ask() saw "no answer".
625
+ if (this._netHookInstalled && this._netHookPage === pg)
626
+ return;
617
627
  this._netHookInstalled = true;
628
+ this._netHookPage = pg;
618
629
  pg.on('response', (resp) => {
619
630
  void this._onResponse(resp).catch(() => { });
620
631
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.41.1",
3
+ "version": "2.42.0",
4
4
  "description": "Terminal coding agent over chat.deepseek.com via Playwright",
5
5
  "type": "module",
6
6
  "bin": {