@narumitw/pi-plan-mode 0.49.3 → 0.50.1
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/README.md +27 -6
- package/dist/chunks/chunk-6SDTCIHD.ts +1490 -0
- package/dist/chunks/chunk-6SDTCIHD.ts.map +7 -0
- package/dist/chunks/interactive-ui-JBSBPK6S.ts +715 -0
- package/dist/chunks/interactive-ui-JBSBPK6S.ts.map +7 -0
- package/dist/index.ts +1497 -0
- package/dist/index.ts.map +7 -0
- package/package.json +15 -8
- package/src/plan-mode.ts +129 -15
- package/src/settings-menu.ts +47 -2
- package/src/settings.ts +91 -0
package/README.md
CHANGED
|
@@ -39,9 +39,13 @@ pi -e npm:@narumitw/pi-plan-mode
|
|
|
39
39
|
Try this package locally from the repository root:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
pi -e ./
|
|
42
|
+
pi -e ./packages/pi-plan-mode
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
The package declares `dist/index.ts`, so an unbuilt local checkout must run `npm --workspace @narumitw/pi-plan-mode run build` before Pi loads the package directory.
|
|
46
|
+
|
|
47
|
+
`just try plan-mode` runs that build automatically.
|
|
48
|
+
|
|
45
49
|
## 🚀 Usage
|
|
46
50
|
|
|
47
51
|
```text
|
|
@@ -164,8 +168,12 @@ You can also exit directly. Before implementation, direct exit discards the late
|
|
|
164
168
|
|
|
165
169
|
## ⚙️ Settings
|
|
166
170
|
|
|
167
|
-
Open **Settings** from an inactive `/plan` menu to edit one flat group of
|
|
168
|
-
|
|
171
|
+
Open **Settings** from an inactive `/plan` menu to edit one flat group of five workflow choices: **Plan thinking**, **Plan tools**, **After Implement**, **Export destination**, and **Plan mode shortcut**.
|
|
172
|
+
You can also edit `$PI_CODING_AGENT_DIR/pi-plan-mode.json` (normally `~/.pi/agent/pi-plan-mode.json`) manually.
|
|
173
|
+
`safeSubcommands` remains JSON-only.
|
|
174
|
+
You can change the Plan-mode shortcut with `toggleShortcut` as long as the file remains JSON-only and uses a valid key string.
|
|
175
|
+
The file is optional, is read at session start and reloaded automatically when changed, and is created only after an explicit Settings save or manual edit.
|
|
176
|
+
When omitted, the shortcut is disabled by default.
|
|
169
177
|
```json
|
|
170
178
|
{
|
|
171
179
|
"thinkingLevel": "inherit",
|
|
@@ -175,7 +183,8 @@ Open **Settings** from an inactive `/plan` menu to edit one flat group of four w
|
|
|
175
183
|
"safeSubcommands": {
|
|
176
184
|
"git": ["status", "log", "rev-parse", "blame"],
|
|
177
185
|
"gh": ["pr view", "pr list", "issue view", "issue list"]
|
|
178
|
-
}
|
|
186
|
+
},
|
|
187
|
+
"toggleShortcut": "<your_key>"
|
|
179
188
|
}
|
|
180
189
|
```
|
|
181
190
|
|
|
@@ -199,6 +208,13 @@ Changing this setting applies to the next Implement action only. Each active imp
|
|
|
199
208
|
|
|
200
209
|
The existing no-overwrite, cancellation, and atomic Plan-state behavior is unchanged. A failed save rolls the row back to its previous value; a failed or cancelled export preserves the plan and target. Long previews wrap or truncate to the available terminal width without changing the raw path used by the action.
|
|
201
210
|
|
|
211
|
+
### Toggle shortcut
|
|
212
|
+
|
|
213
|
+
`toggleShortcut` controls the global Plan-mode keybinding used by the TUI shortcut.
|
|
214
|
+
Omit this setting to keep the shortcut disabled.
|
|
215
|
+
Set `toggleShortcut` to the key string you want.
|
|
216
|
+
Avoid values that conflict with editor shortcuts.
|
|
217
|
+
|
|
202
218
|
### Safe shell subcommands
|
|
203
219
|
|
|
204
220
|
`safeSubcommands` adds reviewed command validators to limited `bash`; it is not a raw shell allowlist. Only the following exact values are accepted:
|
|
@@ -264,7 +280,10 @@ This extension maps Codex's `ModeKind::Plan` behavior onto Pi's extension API:
|
|
|
264
280
|
## 🗂️ Package layout
|
|
265
281
|
|
|
266
282
|
```txt
|
|
267
|
-
|
|
283
|
+
packages/pi-plan-mode/
|
|
284
|
+
├── dist/ # Generated TypeScript runtime loaded by Jiti
|
|
285
|
+
├── scripts/
|
|
286
|
+
│ └── build-runtime.mjs # Deterministic runtime builder and boundary validator
|
|
268
287
|
├── src/
|
|
269
288
|
│ ├── index.ts # Pi package entrypoint
|
|
270
289
|
│ ├── plan-mode.ts # Extension registration, mode state, and UI loading boundary
|
|
@@ -281,11 +300,13 @@ extensions/pi-plan-mode/
|
|
|
281
300
|
```json
|
|
282
301
|
{
|
|
283
302
|
"pi": {
|
|
284
|
-
"extensions": ["./
|
|
303
|
+
"extensions": ["./dist/index.ts"]
|
|
285
304
|
}
|
|
286
305
|
}
|
|
287
306
|
```
|
|
288
307
|
|
|
308
|
+
The generated runtime is built from the authoritative `src/index.ts` graph and does not import back into `src`.
|
|
309
|
+
|
|
289
310
|
## 🔎 Keywords
|
|
290
311
|
|
|
291
312
|
Pi extension, Pi coding agent, plan mode, Codex-like plan mode, AI coding workflow, read-only planning, implementation plan.
|