pi-prompt-template-model 0.3.0 → 0.3.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/CHANGELOG.md +8 -2
- package/README.md +4 -4
- package/index.ts +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.3.1] - 2026-02-08
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Prompts map now initialized at extension load instead of waiting for `session_start`. Commands invoked before the first session event no longer fail with stale empty state.
|
|
10
|
+
|
|
5
11
|
## [0.3.0] - 2026-02-08
|
|
6
12
|
|
|
7
13
|
### Added
|
|
8
14
|
|
|
9
|
-
- **Chain command**: `/chain` orchestrates multiple prompt templates sequentially, each with its own model, skill, and thinking level. Conversation context flows between steps naturally.
|
|
10
|
-
- Per-step args override shared args: `/chain analyze "error handling" -> fix-plan "focus on perf" -> summarize -- src/main.ts`
|
|
15
|
+
- **Chain command**: `/chain-prompts` orchestrates multiple prompt templates sequentially, each with its own model, skill, and thinking level. Conversation context flows between steps naturally.
|
|
16
|
+
- Per-step args override shared args: `/chain-prompts analyze "error handling" -> fix-plan "focus on perf" -> summarize -- src/main.ts`
|
|
11
17
|
- Mid-chain failure rolls back to the original model and thinking level
|
|
12
18
|
- Step progress notifications show which step is running
|
|
13
19
|
- State isolation: chain uses local variables, never interferes with single-command restore behavior
|
package/README.md
CHANGED
|
@@ -240,10 +240,10 @@ Switched to Haiku. How can I help?
|
|
|
240
240
|
|
|
241
241
|
## Chaining Templates
|
|
242
242
|
|
|
243
|
-
The `/chain` command runs multiple templates sequentially. Each step switches to its own model, injects its own skill, and the conversation context carries forward between steps.
|
|
243
|
+
The `/chain-prompts` command runs multiple templates sequentially. Each step switches to its own model, injects its own skill, and the conversation context carries forward between steps.
|
|
244
244
|
|
|
245
245
|
```
|
|
246
|
-
/chain analyze-code -> fix-plan -> summarize -- src/main.ts
|
|
246
|
+
/chain-prompts analyze-code -> fix-plan -> summarize -- src/main.ts
|
|
247
247
|
```
|
|
248
248
|
|
|
249
249
|
This runs `analyze-code` first, then `fix-plan` (which sees the analysis in conversation context), then `summarize`. The `-- src/main.ts` provides shared args substituted into every template's `$@`.
|
|
@@ -251,7 +251,7 @@ This runs `analyze-code` first, then `fix-plan` (which sees the analysis in conv
|
|
|
251
251
|
Each step can also receive its own args, overriding the shared args for that step:
|
|
252
252
|
|
|
253
253
|
```
|
|
254
|
-
/chain analyze-code "look at error handling" -> fix-plan "focus on perf" -> summarize
|
|
254
|
+
/chain-prompts analyze-code "look at error handling" -> fix-plan "focus on perf" -> summarize
|
|
255
255
|
```
|
|
256
256
|
|
|
257
257
|
Here `analyze-code` gets `$@ = "look at error handling"`, `fix-plan` gets `$@ = "focus on perf"`, and `summarize` has no per-step args so it falls back to the shared args (empty in this case, but conversation context from prior steps is usually enough).
|
|
@@ -259,7 +259,7 @@ Here `analyze-code` gets `$@ = "look at error handling"`, `fix-plan` gets `$@ =
|
|
|
259
259
|
You can mix both:
|
|
260
260
|
|
|
261
261
|
```
|
|
262
|
-
/chain analyze-code "error handling" -> fix-plan -> summarize -- src/main.ts
|
|
262
|
+
/chain-prompts analyze-code "error handling" -> fix-plan -> summarize -- src/main.ts
|
|
263
263
|
```
|
|
264
264
|
|
|
265
265
|
Step 1 uses its per-step args (`"error handling"`), steps 2 and 3 fall back to the shared args (`"src/main.ts"`).
|
package/index.ts
CHANGED
|
@@ -516,9 +516,9 @@ export default function promptModelExtension(pi: ExtensionAPI) {
|
|
|
516
516
|
|
|
517
517
|
// Initialize: register commands for prompts with model frontmatter
|
|
518
518
|
const initialCwd = process.cwd();
|
|
519
|
-
|
|
519
|
+
prompts = loadPromptsWithModel(initialCwd);
|
|
520
520
|
|
|
521
|
-
for (const [name, prompt] of
|
|
521
|
+
for (const [name, prompt] of prompts) {
|
|
522
522
|
// Build source label with subdir namespace
|
|
523
523
|
let sourceLabel: string;
|
|
524
524
|
if (prompt.subdir) {
|
|
@@ -594,7 +594,7 @@ export default function promptModelExtension(pi: ExtensionAPI) {
|
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
596
|
|
|
597
|
-
pi.registerCommand("chain", {
|
|
597
|
+
pi.registerCommand("chain-prompts", {
|
|
598
598
|
description: "Chain prompt templates sequentially [template -> template -> ...]",
|
|
599
599
|
handler: async (args, ctx) => {
|
|
600
600
|
let templatesPart = args;
|