zames_pro 2.29.5 → 2.29.6

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/dist/browser.js CHANGED
@@ -1740,6 +1740,17 @@ export class DeepSeekBrowser {
1740
1740
  // code and the agent hung on "Stopped" until the timeout.
1741
1741
  if (this._netCaptureAt >= this._lastSentAt &&
1742
1742
  isGenerationIncompleteText(this._netBody)) {
1743
+ // PREFER the Continue button: it RESUMES the same truncated turn (a
1744
+ // `chat/continue` request). Resending the prompt creates a NEW turn and
1745
+ // duplicates the work. Only resend when there is no button to click.
1746
+ if (this.autoContinue && (await this._clickContinueIfVisible())) {
1747
+ this._askDebug('CLICKED Continue (incomplete, start-loop)');
1748
+ this._netBody = '';
1749
+ this._netCaptureAt = 0;
1750
+ this._netNoAnswer = false;
1751
+ await this.page.waitForTimeout(500);
1752
+ continue;
1753
+ }
1743
1754
  throw new GenerationIncompleteError(this._netBody.slice(-300));
1744
1755
  }
1745
1756
  // A FINISHED turn with NO answer (only reasoning): the UI shows a
@@ -1837,7 +1848,20 @@ export class DeepSeekBrowser {
1837
1848
  // treating this as "send failed" and hammering Enter.
1838
1849
  if (this._netCaptureAt >= this._lastSentAt &&
1839
1850
  (isGenerationIncompleteText(this._netBody) || this._netNoAnswer)) {
1840
- throw new GenerationIncompleteError(this._netBody.slice(-300));
1851
+ // Prefer Continue (resumes the same turn); resend only if unavailable.
1852
+ if (this.autoContinue && (await this._clickContinueIfVisible())) {
1853
+ this._askDebug('CLICKED Continue (incomplete, pre-loop)');
1854
+ this._netBody = '';
1855
+ this._netCaptureAt = 0;
1856
+ this._netNoAnswer = false;
1857
+ await this.page.waitForTimeout(500);
1858
+ started = true;
1859
+ // fall through to the finish loop by NOT returning here
1860
+ lastStartCur = cur;
1861
+ }
1862
+ else {
1863
+ throw new GenerationIncompleteError(this._netBody.slice(-300));
1864
+ }
1841
1865
  }
1842
1866
  if (cur &&
1843
1867
  cur.trim() &&
@@ -1905,30 +1929,32 @@ export class DeepSeekBrowser {
1905
1929
  throw new ServerBusyError(pageText.slice(0, 300));
1906
1930
  }
1907
1931
  }
1908
- // The server truncated the turn (generation_err / INCOMPLETE). The DOM
1909
- // keeps the partial answer, so without this check the loop waits out the
1910
- // whole timeout and throws ds.send_no_new_answer — the operator sees the
1911
- // agent "stop" with a Continue button in the chat. Retry the send.
1912
- // Runs on the RAW `_netBody` (a truncated body has no RESPONSE, so
1913
- // `_netCapture` is empty and the old guard was dead code).
1914
- if (this._netCaptureAt >= this._lastSentAt &&
1915
- isGenerationIncompleteText(this._netBody)) {
1916
- throw new GenerationIncompleteError(this._netBody.slice(-300));
1917
- }
1918
- // A FINISHED turn with NO answer (only reasoning): the UI shows a
1919
- // Continue button. Click it and keep waiting — otherwise the loop spins
1920
- // to the deadline on an empty answer and the operator sees "Stopped".
1921
- if (this._netNoAnswer &&
1922
- this._netCaptureAt >= this._lastSentAt &&
1923
- this.autoContinue) {
1932
+ // The server truncated the turn (generation_err / INCOMPLETE) or ended
1933
+ // it with only reasoning. PREFER the Continue button: it RESUMES the
1934
+ // same turn (`chat/continue`). Resending the prompt creates a NEW turn
1935
+ // and duplicates the work — only do that when there is no button to
1936
+ // click. Runs on the RAW `_netBody` (a truncated body has no RESPONSE,
1937
+ // so `_netCapture` is empty and the old guard was dead code).
1938
+ const truncated = this._netCaptureAt >= this._lastSentAt &&
1939
+ isGenerationIncompleteText(this._netBody);
1940
+ const noAnswer = this._netNoAnswer && this._netCaptureAt >= this._lastSentAt;
1941
+ if ((truncated || noAnswer) && this.autoContinue) {
1924
1942
  if (await this._clickContinueIfVisible()) {
1925
- this._askDebug('CLICKED Continue (net-no-answer, finish-loop)');
1943
+ this._askDebug('CLICKED Continue (finish-loop, truncated=' +
1944
+ truncated +
1945
+ ' noAnswer=' +
1946
+ noAnswer +
1947
+ ')');
1948
+ this._netBody = '';
1926
1949
  this._netNoAnswer = false;
1927
1950
  this._netCaptureAt = 0;
1928
1951
  await this.page.waitForTimeout(500);
1929
1952
  continue;
1930
1953
  }
1931
1954
  }
1955
+ if (truncated) {
1956
+ throw new GenerationIncompleteError(this._netBody.slice(-300));
1957
+ }
1932
1958
  // Reasoning-mode pause: DeepSeek caps the THINK phase and shows a
1933
1959
  // Continue button; the model does not resume by itself. Click it so the
1934
1960
  // answer keeps flowing instead of waiting for the operator.
package/dist/i18n.js CHANGED
@@ -534,8 +534,8 @@ const CATALOG = {
534
534
  en: '⚠ No answer yet ({attempt}/{max}): {error} — retrying...',
535
535
  },
536
536
  'ds.incomplete_retry': {
537
- ru: '⏳ DeepSeek оборвал ответ (кнопка Continue в чате) — повторяю отправку ({attempt}/{max})...',
538
- en: '⏳ DeepSeek truncated the answer (the Continue button in the chat) — resending ({attempt}/{max})...',
537
+ ru: '⏳ DeepSeek оборвал ответ — жму «Continue», чтобы продолжить (повтор {attempt}/{max})...',
538
+ en: '⏳ DeepSeek truncated the answer — clicking Continue to resume (retry {attempt}/{max})...',
539
539
  },
540
540
  'ds.incomplete_give_up': {
541
541
  ru: '✖ DeepSeek {attempt} раз подряд оборвал ответ, не дойдя до конца. Возможно, включён режим размышления — попробуй выключить его (browser.deepThinking) или повтори позже.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.29.5",
3
+ "version": "2.29.6",
4
4
  "description": "Terminal coding agent over chat.deepseek.com via Playwright",
5
5
  "type": "module",
6
6
  "bin": {