@maxiaochao/pi-toolkit 0.10.12 → 0.10.14

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 2026-10-09 - v0.10.14
2
+
3
+ - bundle worktree v0.3.2: continue Agent tasks automatically after switching into a worktree
4
+
5
+ ## 2026-10-09 - v0.10.13
6
+
7
+ - bundle worktree v0.3.1: show a persistent in-conversation confirmation after switching worktrees
8
+
1
9
  ## 2026-10-09 - v0.10.12
2
10
 
3
11
  - bundle worktree v0.3.0: automatically move Agent conversations into prepared worktrees without external Harness support
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxiaochao/pi-toolkit",
3
- "version": "0.10.12",
3
+ "version": "0.10.14",
4
4
  "description": "Personal pi coding agent toolkit: scheduler, /btw, /cache_export, apply_patch, browser automation, and bundled theme/skills.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-10-09 - v0.3.2
4
+
5
+ - continue Agent tasks automatically after switching into a worktree
6
+
7
+ ## 2026-10-09 - v0.3.1
8
+
9
+ - show a persistent in-conversation confirmation after switching worktrees
10
+
3
11
  ## 2026-10-09 - v0.3.0
4
12
 
5
13
  - automatically move Agent conversations into prepared worktrees without external Harness support
@@ -163,7 +163,12 @@ export default function worktreeExtension(pi: ExtensionAPI) {
163
163
  switched = await ctx.switchSession(targetSessionFile, {
164
164
  withSession: async (next) => {
165
165
  const dirtyNote = prepared.dirty ? "(已有未提交改动)" : "";
166
- next.ui.notify(`已切换到 ${prepared.branch}:${prepared.path}${dirtyNote}`, "info");
166
+ await next.sendMessage({
167
+ customType: "worktree-switch",
168
+ content: `✓ 已进入 worktree:${prepared.path}\nBranch: ${prepared.branch}${dirtyNote}\n\n在worktree继续任务`,
169
+ display: true,
170
+ details: prepared,
171
+ }, { triggerTurn: true, deliverAs: "followUp" });
167
172
  },
168
173
  });
169
174
  } catch (error) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxiaochao/pi-worktree",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Git worktree CLI, Pi extension, and skill for isolated coding tasks.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -31,6 +31,7 @@ async function fixture({ cancelled = false, switchError, customSessionDir = true
31
31
 
32
32
  const handlers = {};
33
33
  const sent = [];
34
+ const sessionMessages = [];
34
35
  const notifications = [];
35
36
  const execCalls = [];
36
37
  let releaseExec;
@@ -71,13 +72,16 @@ async function fixture({ cancelled = false, switchError, customSessionDir = true
71
72
  switchedTo = path;
72
73
  if (cancelled) return { cancelled: true };
73
74
  if (switchError) throw switchError;
74
- await options.withSession({ ui: ctx.ui });
75
+ await options.withSession({
76
+ ui: ctx.ui,
77
+ async sendMessage(message, options) { sessionMessages.push({ message, options }); },
78
+ });
75
79
  return { cancelled: false };
76
80
  },
77
81
  };
78
82
 
79
83
  return {
80
- root, cwd, worktree, sessions, handlers, sent, notifications, execCalls, ctx,
84
+ root, cwd, worktree, sessions, handlers, sent, sessionMessages, notifications, execCalls, ctx,
81
85
  execStarted,
82
86
  releaseExec: () => releaseExec(),
83
87
  switchedTo: () => switchedTo,
@@ -117,10 +121,15 @@ test("enter_worktree defers, forks the current session, and switches automatical
117
121
  assert.equal(header.cwd, f.worktree);
118
122
  assert.equal(header.parentSession, join(f.sessions, "source.jsonl"));
119
123
  assert.match(readFileSync(target, "utf8"), /"id":"history-1"/);
120
- assert.deepEqual(f.notifications.at(-1), {
121
- message: `已切换到 feature:${f.worktree}`,
122
- type: "info",
123
- });
124
+ assert.deepEqual(f.sessionMessages, [{
125
+ message: {
126
+ customType: "worktree-switch",
127
+ content: `✓ 已进入 worktree:${f.worktree}\nBranch: feature\n\n在worktree继续任务`,
128
+ display: true,
129
+ details: { status: "created", path: f.worktree, branch: "feature", dirty: false },
130
+ },
131
+ options: { triggerTurn: true, deliverAs: "followUp" },
132
+ }]);
124
133
  } finally {
125
134
  f.cleanup();
126
135
  }