junecoder 1.0.16 → 1.0.17
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/package.json +1 -1
- package/session.mjs +0 -1
- package/tui.mjs +2 -3
package/package.json
CHANGED
package/session.mjs
CHANGED
package/tui.mjs
CHANGED
|
@@ -485,8 +485,8 @@ export async function startTUI(agent, opts = {}) {
|
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
case "session": { const slots = listSlots(agent.cwd); pushLine("Sessions:", C.tool); if (slots.length === 0) pushLine(" (none)", C.dim); else for (const s of slots) pushLine(" " + s.label, C.dim); break; }
|
|
488
|
-
case "clear": archiveCurrent(agent.cwd); agent.history = []; state.lines = []; state.streaming = ""; state.reasoning = ""; state.tasks = []; state.scroll = 0; pushLine("Cleared (archived).", C.warn); break;
|
|
489
|
-
case "new": archiveCurrent(agent.cwd); agent.history = []; state.lines = []; state.streaming = ""; state.reasoning = ""; state.toolStreams = {}; state.tasks = []; state.scroll = 0; state.tokens = { prompt: 0, completion: 0 }; pushLine("New session.", C.tool); break;
|
|
488
|
+
case "clear": archiveCurrent(agent.cwd); agent.history = []; state.lines = []; state.streaming = ""; state.reasoning = ""; state.tasks = []; agent.tasks = []; state.scroll = 0; pushLine("Cleared (archived).", C.warn); break;
|
|
489
|
+
case "new": archiveCurrent(agent.cwd); agent.history = []; state.lines = []; state.streaming = ""; state.reasoning = ""; state.toolStreams = {}; state.tasks = []; agent.tasks = []; state.scroll = 0; state.tokens = { prompt: 0, completion: 0 }; pushLine("New session.", C.tool); break;
|
|
490
490
|
case "tasks": if (state.tasks.length === 0) pushLine("No tasks.", C.dim); else for (const t of state.tasks) pushLine(" " + (t.status === "done" ? "\u2713" : t.status === "in_progress" ? "\u25b6" : "\u25cb") + " " + t.title, C.dim); break;
|
|
491
491
|
case "stats": pushLine("Tokens: \u2191" + state.tokens.prompt + " \u2193" + state.tokens.completion + " | History: " + agent.history.length + " msgs (~" + estimateTokens(agent.history) + " t) | Lines: " + state.lines.length, C.dim); break;
|
|
492
492
|
case "quit": case "exit": cleanup(); process.exit(0); return;
|
|
@@ -536,7 +536,6 @@ export async function startTUI(agent, opts = {}) {
|
|
|
536
536
|
else if (raw && typeof raw.text === "string") state.lines.push(raw);
|
|
537
537
|
}
|
|
538
538
|
if (restored.history) agent.history = restored.history;
|
|
539
|
-
if (restored.tasks) { state.tasks = restored.tasks; agent.tasks = restored.tasks; }
|
|
540
539
|
if (restored.goal) agent.goal = restored.goal;
|
|
541
540
|
if (restored.planMode !== undefined) agent.planMode = restored.planMode;
|
|
542
541
|
state.status = "Session restored";
|