open-agents-ai 0.20.1 → 0.20.2

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/index.js +14 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15075,16 +15075,15 @@ async function handleUpdate(subcommand, ctx) {
15075
15075
  process.stdout.write(` ${c2.green("\u2714")} Installed v${info.latestVersion}. Reloading...
15076
15076
 
15077
15077
  `);
15078
- if (ctx.savePendingTaskState) {
15079
- ctx.savePendingTaskState();
15080
- }
15078
+ const hadActiveTask = ctx.savePendingTaskState?.() ?? false;
15079
+ const resumeFlag = hadActiveTask ? "1" : "update-only";
15081
15080
  const { execPath, argv } = process;
15082
15081
  try {
15083
15082
  const { execFileSync } = await import("node:child_process");
15084
- process.env.__OA_RESUMED = "1";
15083
+ process.env.__OA_RESUMED = resumeFlag;
15085
15084
  execFileSync(execPath, argv.slice(1), {
15086
15085
  stdio: "inherit",
15087
- env: { ...process.env, __OA_RESUMED: "1" }
15086
+ env: { ...process.env, __OA_RESUMED: resumeFlag }
15088
15087
  });
15089
15088
  } catch {
15090
15089
  renderWarning("Reload failed. Restart oa manually to use the new version.");
@@ -18904,7 +18903,9 @@ function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce
18904
18903
  }
18905
18904
  async function startInteractive(config, repoPath) {
18906
18905
  const repoRoot = resolve16(repoPath ?? cwd());
18907
- const isResumed = !!process.env.__OA_RESUMED;
18906
+ const resumeFlag = process.env.__OA_RESUMED ?? "";
18907
+ const isResumed = resumeFlag !== "";
18908
+ const hasTaskToResume = resumeFlag === "1";
18908
18909
  if (isResumed) {
18909
18910
  delete process.env.__OA_RESUMED;
18910
18911
  }
@@ -18994,8 +18995,10 @@ async function startInteractive(config, repoPath) {
18994
18995
  let carouselLines = 0;
18995
18996
  const version = getVersion();
18996
18997
  if (isResumed) {
18997
- renderInfo(`Updated to v${version} \u2014 picking up where you left off.
18998
- `);
18998
+ const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.
18999
+ ` : `Updated to v${version}.
19000
+ `;
19001
+ renderInfo(resumeMsg);
18999
19002
  } else {
19000
19003
  process.stdout.write("\x1B[2J\x1B[H");
19001
19004
  carouselLines = carousel.start();
@@ -19214,7 +19217,9 @@ async function startInteractive(config, repoPath) {
19214
19217
  savedAt: (/* @__PURE__ */ new Date()).toISOString(),
19215
19218
  toolCallCount: sessionToolCallCount
19216
19219
  });
19220
+ return true;
19217
19221
  }
19222
+ return false;
19218
19223
  },
19219
19224
  dreamStart(mode) {
19220
19225
  if (activeTask) {
@@ -19307,7 +19312,7 @@ async function startInteractive(config, repoPath) {
19307
19312
  setColors: (enabled) => setColorsEnabled(enabled)
19308
19313
  };
19309
19314
  showPrompt();
19310
- if (isResumed) {
19315
+ if (hasTaskToResume) {
19311
19316
  const pendingTask = loadPendingTask(repoRoot);
19312
19317
  if (pendingTask) {
19313
19318
  setTimeout(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.20.1",
3
+ "version": "0.20.2",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",