@co0ontty/wand 4.0.1 → 4.0.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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "commit": "eeacc22778c2e9a1a8359870378e1351d79adab6",
3
- "builtAt": "2026-07-15T01:23:59.877Z",
4
- "version": "4.0.1",
2
+ "commit": "4abd25dd1b6c5c83288666bbad3519dc779ded52",
3
+ "builtAt": "2026-07-15T03:10:39.930Z",
4
+ "version": "4.0.2",
5
5
  "channel": "stable"
6
6
  }
@@ -512,7 +512,10 @@ function runCliText(command, args, prompt, opts) {
512
512
  });
513
513
  }
514
514
  async function callCodexText(prompt, cwd, opts) {
515
- const args = ["exec", "--json", "--color", "never", "--skip-git-repo-check", "--sandbox", "read-only"];
515
+ // Quick commit is an internal one-shot request, not a user conversation. Keep
516
+ // Codex from persisting it into ~/.codex/sessions, where Wand would otherwise
517
+ // surface the generated prompt as a recoverable session.
518
+ const args = ["exec", "--ephemeral", "--json", "--color", "never", "--skip-git-repo-check", "--sandbox", "read-only"];
516
519
  const model = opts.model?.trim();
517
520
  if (model && model !== "default")
518
521
  args.push("--model", model);
@@ -1132,7 +1135,7 @@ async function runQuickCommitFallbackCli(opts, priorError) {
1132
1135
  const prompt = buildFallbackPrompt(opts, priorError);
1133
1136
  const provider = normalizeProvider(opts.provider);
1134
1137
  if (provider === "codex") {
1135
- const args = ["exec", "--json", "--color", "never", "--skip-git-repo-check", "--dangerously-bypass-approvals-and-sandbox"];
1138
+ const args = ["exec", "--ephemeral", "--json", "--color", "never", "--skip-git-repo-check", "--dangerously-bypass-approvals-and-sandbox"];
1136
1139
  const model = opts.model?.trim();
1137
1140
  if (model && model !== "default")
1138
1141
  args.push("--model", model);
@@ -102,6 +102,22 @@ function isCodexSystemInjectedText(text) {
102
102
  const trimmed = text.trimStart();
103
103
  return trimmed.startsWith("#") || trimmed.startsWith("<");
104
104
  }
105
+ /**
106
+ * Codex versions used before quick commit enabled `--ephemeral` persisted these
107
+ * internal one-shot prompts as ordinary sessions. Hide those legacy artifacts
108
+ * without deleting their files; newly generated quick-commit calls never land
109
+ * in the history directory in the first place.
110
+ */
111
+ function isWandQuickCommitPrompt(text) {
112
+ const trimmed = text.trimStart();
113
+ return (trimmed.startsWith("阅读以下 git diff,用")
114
+ && trimmed.includes("写一条简洁的 commit message。要求:祈使句,不超过 50 字,描述「做了什么」。只输出 message 本身"))
115
+ || (trimmed.startsWith("阅读以下 git diff,完成两件事:")
116
+ && trimmed.includes("请严格输出**单行 JSON 对象**"))
117
+ || (trimmed.startsWith("根据以下 commit message 和 git diff 推荐一个语义化版本 tag")
118
+ && trimmed.includes("严格输出**单行 JSON 对象**"))
119
+ || trimmed.startsWith("你正在作为 Wand 的快捷提交兜底执行器运行。");
120
+ }
105
121
  function parseCodexSummary(head) {
106
122
  let id = "";
107
123
  let cwd = "";
@@ -153,6 +169,8 @@ function parseCodexSummary(head) {
153
169
  }
154
170
  if (!id)
155
171
  return null;
172
+ if (isWandQuickCommitPrompt(firstUserMessage))
173
+ return null;
156
174
  return {
157
175
  claudeSessionId: id,
158
176
  cwd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@co0ontty/wand",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "A web console for Claude Code, Codex, OpenCode, and other local CLI tools.",
5
5
  "type": "module",
6
6
  "bin": {