zames_pro 2.37.1 → 2.38.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 +28 -0
  2. package/package.json +1 -1
package/dist/browser.js CHANGED
@@ -499,6 +499,30 @@ export class DeepSeekBrowser {
499
499
  catch { }
500
500
  }
501
501
  }
502
+ // A lightweight IN-PAGE marker so the operator, looking at the browser
503
+ // window, can tell that the agent is generating (the terminal spinner is not
504
+ // visible there). We prefix the tab title with a "⏳"; the ORIGINAL title is
505
+ // saved ONCE on the window and restored when generation ends, so DeepSeek's
506
+ // own chat title is never lost. Best-effort: a page error must never break
507
+ // the send loop.
508
+ async _setBusyTitle(busy) {
509
+ try {
510
+ await this.page.evaluate((on) => {
511
+ const w = window;
512
+ if (on) {
513
+ if (typeof w.__zamesTitle !== 'string') {
514
+ w.__zamesTitle = document.title.replace(/^⏳\s*/, '');
515
+ }
516
+ document.title = '⏳ ' + w.__zamesTitle;
517
+ }
518
+ else if (typeof w.__zamesTitle === 'string') {
519
+ document.title = w.__zamesTitle;
520
+ w.__zamesTitle = undefined;
521
+ }
522
+ }, busy);
523
+ }
524
+ catch { }
525
+ }
502
526
  async launch() {
503
527
  // NOTE: we deliberately do NOT kill stray chrome processes here. Per the
504
528
  // project rules, an agent must never kill a browser it did not start —
@@ -1745,6 +1769,9 @@ export class DeepSeekBrowser {
1745
1769
  }
1746
1770
  finally {
1747
1771
  this._askInFlight = Math.max(0, this._askInFlight - 1);
1772
+ // Clear the in-page "generating" marker (tab title) however the ask
1773
+ // ended (answer, error, abort), so it never sticks after a run.
1774
+ void this._setBusyTitle(false);
1748
1775
  }
1749
1776
  }
1750
1777
  // Cancel an in-flight ask() whose caller (the agent-loop watchdog) already
@@ -2053,6 +2080,7 @@ export class DeepSeekBrowser {
2053
2080
  catch { }
2054
2081
  }
2055
2082
  this._emitSendState('generating');
2083
+ void this._setBusyTitle(true);
2056
2084
  this._netCapture = '';
2057
2085
  this._netCaptureAt = 0;
2058
2086
  this._netNoAnswer = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.37.1",
3
+ "version": "2.38.0",
4
4
  "description": "Terminal coding agent over chat.deepseek.com via Playwright",
5
5
  "type": "module",
6
6
  "bin": {