@tiens.nguyen/gu-cli 1.0.746 → 1.0.747

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/gu-repl.mjs CHANGED
@@ -18,10 +18,10 @@
18
18
  * Conversation history is saved to ~/.gonext/sessions/<hash-of-folder-path>.json after
19
19
  * every turn and reloaded on the next `gu` in the SAME folder — so closing the
20
20
  * terminal and coming back later still has context (e.g. "continue" after an
21
- * interrupted investigation actually resumes it). /reset clears it.
21
+ * interrupted investigation actually resumes it). /new clears it.
22
22
  *
23
23
  * Requires the worker daemon to be running (it claims the job).
24
- * Commands: /exit /model /reset /help Ctrl-C stops following the current run.
24
+ * Commands: /exit /model /new /help Ctrl-C stops following the current run.
25
25
  */
26
26
  import { readFile, mkdir, writeFile, unlink, rename } from "node:fs/promises";
27
27
  import { existsSync, statSync, readFileSync, writeFileSync, readdirSync, openSync, readSync, closeSync } from "node:fs";
@@ -577,11 +577,12 @@ if (cliVerdict.kind === "run") {
577
577
  " -v, --verbose show RAG index-file activity in the bottom bar (each shard written)\n" +
578
578
  " -h, --help this help\n\n" +
579
579
  "Auth comes from ~/.gonext/worker.env; models/budgets/RAG come from your web Settings.\n" +
580
- "Inside the REPL: /exit · /model · /reset · /help — Ctrl-C stops following a turn.\n" +
580
+ "Inside the REPL: /exit · /model · /new · /help — Ctrl-C stops following a turn.\n" +
581
581
  "Questions are enqueued like web questions and executed by the RUNNING\n" +
582
582
  "gu-cli daemon — its terminal shows the full [gu-agent] logs.\n" +
583
583
  "Conversation history is saved per-folder in ~/.gonext/sessions and resumed next time\n" +
584
- "you run `gu` in the same folder; /reset forgets it and starts fresh."
584
+ "you run `gu` in the same folder; /new starts a new conversation and keeps the old one\n" +
585
+ "in ~/.gonext/sessions/archive."
585
586
  );
586
587
  process.exit(0);
587
588
  }
@@ -814,6 +815,9 @@ const COMMANDS = [
814
815
  { name: "/doctor", desc: "check every configured model ANSWERS — especially the embedder, which a turn only reaches after several steps" },
815
816
  { name: "/tokens", desc: "break down the last prompt sent to the coding model — how much of it was RAG" },
816
817
  { name: "/full-log", usage: "/full-log [on|off|status] [account]", desc: "administrators: Enable Full Log for an account — asks for an admin token from the web admin page first" },
818
+ // ONE name, /new (user, #278). /reset and /clear still work (HIDDEN_COMMANDS) for habit and
819
+ // for Claude Code users — not to be confused with `gu clear` in a shell, which wipes gu's state.
820
+ { name: "/new", desc: "start a new conversation in this folder — the old one is kept (archived); the folder's settings stay" },
817
821
  { name: "/hooks", usage: "/hooks [list|approve|unapprove]", desc: "hooks: commands gu runs on onStart, onAsk, onToolDone, onTurnEnd — list them, approve this project's" },
818
822
  { name: "/mcp", usage: "/mcp [list|tools|add|remove|enable|disable|approve|allow|disallow|reconnect]", desc: "MCP servers: see which connect, add one (asks step by step), choose which tools run without asking" },
819
823
  { name: "/help", desc: "list these commands" },
@@ -11162,7 +11166,7 @@ async function main() {
11162
11166
  if (history.length > 0) {
11163
11167
  const turns = history.filter((m) => m.role === "user").length;
11164
11168
  console.log(
11165
- wrapGutter(`Resumed session: ${turns} prior turn(s) from last time in this folder — /reset to start fresh.`, dim) + "\n"
11169
+ wrapGutter(`Resumed session: ${turns} prior turn(s) from last time in this folder — /new starts a new conversation (this one is kept).`, dim) + "\n"
11166
11170
  );
11167
11171
  }
11168
11172
  // Ctrl-C arrives on ONE of two paths depending on the readline mode: with
@@ -11516,7 +11520,7 @@ async function main() {
11516
11520
  );
11517
11521
  continue;
11518
11522
  }
11519
- if (line === "/reset" || line === "/new") {
11523
+ if (line === "/reset" || line === "/new" || line === "/clear") {
11520
11524
  const kept = history.length;
11521
11525
  const where = await startNewConversation(cwd, history);
11522
11526
  history.length = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiens.nguyen/gu-cli",
3
- "version": "1.0.746",
3
+ "version": "1.0.747",
4
4
  "description": "Gu CLI — the gu terminal plus the local worker that runs agent / OCR / PDF / embedding jobs on your Mac (Ollama / MLX / OpenAI-compatible).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -2077,8 +2077,8 @@ export const HIDDEN_COMMANDS = [
2077
2077
  "/rag-cloud", // they say — unlisted so /help offers one way into the setting
2078
2078
  "/thought", // the reasoning display stays ON; only the toggle is unlisted
2079
2079
  "/hover", // in-turn mouse capture — behaviour unchanged, just hidden
2080
- "/reset",
2081
- "/new",
2080
+ "/reset", // the old name of /new (#278) — still works, one name is offered
2081
+ "/clear", // Claude Code's name for it — still works, likewise unlisted
2082
2082
  "/reset-output-token-global", // pending a rename to /reset-global-token that also resets
2083
2083
  // the INPUT total — which does not exist yet as a counter
2084
2084
  ];