junecoder 1.0.3 → 1.0.5
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/agent.mjs +5 -0
- package/package.json +1 -1
- package/tui.mjs +2 -2
package/agent.mjs
CHANGED
|
@@ -533,6 +533,11 @@ export async function runAgent(agent, input, callbacks = {}, options = {}) {
|
|
|
533
533
|
|
|
534
534
|
// Report result
|
|
535
535
|
try { cb.onToolResult(r.name, r.output, r.error); } catch { /* ignore */ }
|
|
536
|
+
|
|
537
|
+
// Sync task list to TUI after task tool
|
|
538
|
+
if (r.name === 'task' && !r.error && !r.denied) {
|
|
539
|
+
try { cb.onTaskUpdate(agent.tasks); } catch { /* ignore */ }
|
|
540
|
+
}
|
|
536
541
|
}
|
|
537
542
|
|
|
538
543
|
// Step 8: Inject pending reminders
|
package/package.json
CHANGED
package/tui.mjs
CHANGED
|
@@ -359,7 +359,7 @@ export async function startTUI(agent, opts = {}) {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
clearInterval(ticker); state.processing = false; state.controller = null; state.status = "Ready";
|
|
362
|
-
if (state.tasks.length > 0 && state.tasks.every(t => t.status === "done")) state.tasks = [];
|
|
362
|
+
if (state.tasks.length > 0 && state.tasks.every(t => t.status === "done")) { state.tasks = []; agent.tasks = []; }
|
|
363
363
|
try { saveSession(agent, state.lines); } catch {} render();
|
|
364
364
|
}
|
|
365
365
|
function flushStream() { if (state.reasoning) { pushLine(state.reasoning, C.reason); state.reasoning = ""; } if (state.streaming) { pushLine(state.streaming, C.text); state.streaming = ""; } }
|
|
@@ -424,7 +424,7 @@ export async function startTUI(agent, opts = {}) {
|
|
|
424
424
|
if (typeof raw === "string") state.lines.push({ text: raw, color: C.text });
|
|
425
425
|
else if (raw && typeof raw.text === "string") state.lines.push(raw);
|
|
426
426
|
}
|
|
427
|
-
if (restored.tasks) state.tasks = restored.tasks;
|
|
427
|
+
if (restored.tasks) { state.tasks = restored.tasks; agent.tasks = restored.tasks; }
|
|
428
428
|
if (restored.planMode !== undefined) agent.planMode = restored.planMode;
|
|
429
429
|
state.status = "Session restored";
|
|
430
430
|
} else {
|