open-agents-ai 0.184.85 → 0.184.86

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 +22 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -65419,6 +65419,7 @@ async function startInteractive(config, repoPath) {
65419
65419
  delete process.env.__OA_RESUMED;
65420
65420
  initOaDirectory(repoRoot);
65421
65421
  const savedSettings = resolveSettings(repoRoot);
65422
+ let restoredSessionContext = null;
65422
65423
  if (process.stdout.isTTY) {
65423
65424
  process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
65424
65425
  process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h\x1B[48;5;233m\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
@@ -65558,6 +65559,12 @@ Review its full output in the [${id}] tab or via full_sub_agent(action='output',
65558
65559
  const taskSummary = hasTaskToResume ? getLastTaskSummary2(repoRoot) : null;
65559
65560
  const resumeMsg = taskSummary ? `v${version} \u2014 picking up: ${taskSummary}` : `Updated to v${version}.`;
65560
65561
  renderInfo(resumeMsg);
65562
+ const resumePrompt = buildContextRestorePrompt(repoRoot);
65563
+ if (resumePrompt) {
65564
+ restoredSessionContext = resumePrompt;
65565
+ const info = loadSessionContext(repoRoot);
65566
+ renderInfo(`Context restored from ${info?.entries.length ?? 0} session(s).`);
65567
+ }
65561
65568
  statusBar.endContentWrite();
65562
65569
  }
65563
65570
  setContentWriteHook({
@@ -65836,7 +65843,6 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
65836
65843
  let _recallText = null;
65837
65844
  let _recallTimer = null;
65838
65845
  const RECALL_WINDOW_MS = 1500;
65839
- let restoredSessionContext = null;
65840
65846
  let sessionSudoPassword = null;
65841
65847
  let sudoPromptPending = false;
65842
65848
  const panelBg = "\x1B[48;5;234m";
@@ -67672,27 +67678,33 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
67672
67678
  renderInfo(`Previous session found (${savedCtx.entries.length} entries, last active ${timeAgo})`);
67673
67679
  renderInfo(`Last task: ${lastTask}${lastEntry.task && lastEntry.task.length > 80 ? "..." : ""}`);
67674
67680
  });
67675
- let autoRestoreTimer = setTimeout(() => {
67676
- autoRestoreTimer = null;
67677
- }, 15e3);
67678
- const result = await tuiSelect({
67681
+ const AUTO_RESTORE_MS = 1e4;
67682
+ const autoRestore = new Promise((r) => setTimeout(() => r({ confirmed: true, key: "restore", index: 0, timedOut: true }), AUTO_RESTORE_MS));
67683
+ const selectPromise = tuiSelect({
67679
67684
  items: [
67680
67685
  { key: "restore", label: "Restore previous context" },
67681
67686
  { key: "fresh", label: "Start fresh" }
67682
67687
  ],
67683
67688
  activeKey: "restore",
67684
- title: "Restore previous session context?",
67689
+ title: `Restore previous session context? (auto-restore in 10s)`,
67685
67690
  rl,
67686
67691
  availableRows: statusBar.isActive ? statusBar.availableContentRows : void 0
67687
67692
  });
67688
- if (autoRestoreTimer)
67689
- clearTimeout(autoRestoreTimer);
67690
- if (result.confirmed && result.key === "restore" || !result.confirmed && !autoRestoreTimer) {
67693
+ const result = await Promise.race([selectPromise, autoRestore]);
67694
+ const timedOut = result.timedOut === true;
67695
+ if (timedOut) {
67696
+ try {
67697
+ rl.write?.("\x1B");
67698
+ } catch {
67699
+ }
67700
+ await new Promise((r) => setTimeout(r, 100));
67701
+ }
67702
+ if (result.confirmed && result.key === "restore") {
67691
67703
  const prompt = buildContextRestorePrompt(repoRoot);
67692
67704
  if (prompt) {
67693
67705
  restoredSessionContext = prompt;
67694
67706
  const info = loadSessionContext(repoRoot);
67695
- writeContent(() => renderInfo(`Context restored from ${info?.entries.length ?? 0} session(s).`));
67707
+ writeContent(() => renderInfo(timedOut ? `Context auto-restored from ${info?.entries.length ?? 0} session(s).` : `Context restored from ${info?.entries.length ?? 0} session(s).`));
67696
67708
  } else {
67697
67709
  writeContent(() => renderInfo("No context to restore. Starting fresh."));
67698
67710
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.184.85",
3
+ "version": "0.184.86",
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",