zames_pro 2.23.0 → 2.24.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.
@@ -561,6 +561,15 @@ export async function runAgentLoop({ browser, tools, task, workdir, maxIteration
561
561
  result: String(result),
562
562
  });
563
563
  results.push({ tool: call.tool, result });
564
+ // The operator pressed Esc/Ctrl+C while the tool was running. The tool
565
+ // itself has finished (we cannot kill an arbitrary child process from
566
+ // here), but we must NOT feed its result back to the model and must NOT
567
+ // run the remaining calls in this batch — that would keep the agent
568
+ // going after an explicit stop.
569
+ if (browser._abort || browser._stopped) {
570
+ transcript?.log('user_aborted');
571
+ return '(прервано пользователем)';
572
+ }
564
573
  }
565
574
  // A tool just ran — the next answer is expected to be a fresh tool call.
566
575
  // Reset the watchdog so the next empty/repeated answer is nudged.
package/dist/index.js CHANGED
@@ -871,6 +871,12 @@ async function runTask(browser, tools, taskText, workdir, opts, attachments = []
871
871
  browser._stopped = false;
872
872
  browser._abort = false;
873
873
  const ui = editor || mod.createSpinner(currentLocale);
874
+ // Mark the editor busy for the WHOLE task, not only for /init and /self-fix.
875
+ // Esc / Ctrl+C abort the current generation only while busy; without this a
876
+ // long-running tool (Bash, npm, MCP) could not be interrupted — Esc did
877
+ // nothing. Cleared in the finally below.
878
+ if (editor)
879
+ editor.busy = true;
874
880
  const stopWatching = editor
875
881
  ? () => { }
876
882
  : watchInput({
@@ -971,6 +977,8 @@ async function runTask(browser, tools, taskText, workdir, opts, attachments = []
971
977
  finally {
972
978
  stopWatching();
973
979
  ui.stop();
980
+ if (editor)
981
+ editor.busy = false;
974
982
  // Detach the send hooks so a later browser.ask() outside this task cannot
975
983
  // start a stale spinner.
976
984
  browser.onSendStart = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.23.0",
3
+ "version": "2.24.0",
4
4
  "description": "Terminal coding agent over chat.deepseek.com via Playwright",
5
5
  "type": "module",
6
6
  "bin": {