@zhushanwen/pi-plan 0.3.10 → 0.3.12
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 +5 -2
- package/src/index.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/pi-plan",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "Lightweight plan mode for Pi coding agent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@earendil-works/pi-coding-agent": ">=0.73.0",
|
|
22
22
|
"typebox": "*",
|
|
23
23
|
"@earendil-works/pi-ai": "^0.84.1",
|
|
24
|
-
"@zhushanwen/pi-goal": "0.9.
|
|
24
|
+
"@zhushanwen/pi-goal": "0.9.4"
|
|
25
25
|
},
|
|
26
26
|
"peerDependenciesMeta": {
|
|
27
27
|
"@earendil-works/pi-ai": {
|
|
@@ -37,6 +37,9 @@
|
|
|
37
37
|
"src/",
|
|
38
38
|
"templates/"
|
|
39
39
|
],
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@zhushanwen/pi-extension-logger": "0.3.0"
|
|
42
|
+
},
|
|
40
43
|
"scripts": {
|
|
41
44
|
"typecheck": "npx tsc --noEmit",
|
|
42
45
|
"test": "vitest run"
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { getLogger } from "@zhushanwen/pi-extension-logger";
|
|
2
3
|
|
|
3
4
|
import { registerPlanCommand, startPlanMode } from "./command.js";
|
|
4
5
|
import { type PlanSessionMap, reconstructPlanState } from "./state.js";
|
|
5
6
|
import { registerPlanTool } from "./tool.js";
|
|
6
7
|
import { updatePlanWidget } from "./widget.js";
|
|
7
8
|
|
|
9
|
+
const logger = getLogger("pi-plan");
|
|
10
|
+
|
|
8
11
|
export default function planExtension(pi: ExtensionAPI) {
|
|
9
12
|
// Per-session state cache — keyed by sessionId
|
|
10
13
|
const sessions: PlanSessionMap = new Map();
|
|
@@ -24,7 +27,7 @@ export default function planExtension(pi: ExtensionAPI) {
|
|
|
24
27
|
import("./compact.js").then(({ registerPlanEventHandlers }) => {
|
|
25
28
|
registerPlanEventHandlers(pi, sessions);
|
|
26
29
|
}).catch((_e: unknown) => {
|
|
27
|
-
|
|
30
|
+
logger.warn('compact handlers load failed', { error: String(_e) });
|
|
28
31
|
});
|
|
29
32
|
|
|
30
33
|
// Reconstruct state on session start
|