pi-system-prompt-switcher 0.1.0 → 0.1.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
CHANGED
|
@@ -50,6 +50,8 @@ Selection is stored in:
|
|
|
50
50
|
~/.pi/agent/system-prompt-switcher.json
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
On interactive startup, Pi lists the active prompt filename in a `[System Prompt]` section.
|
|
54
|
+
|
|
53
55
|
After a successful switch, the extension calls Pi's reload flow. The selected prompt is appended to Pi's effective system prompt under an `Active system prompt` heading, preserving Pi's generated tool guidance, skills, project context, date, and cwd.
|
|
54
56
|
|
|
55
57
|
## Development
|
|
@@ -187,6 +187,11 @@ export default async function systemPromptSwitcherExtension(
|
|
|
187
187
|
const activePrompt = await loadSelectedPrompt({ configPath, systemsDir });
|
|
188
188
|
let warningShown = false;
|
|
189
189
|
|
|
190
|
+
pi.on("session_start", (_event, ctx) => {
|
|
191
|
+
if (!ctx.hasUI || !activePrompt.ok) return;
|
|
192
|
+
ctx.ui.notify(`[System Prompt]\n ${activePrompt.name}`, "info");
|
|
193
|
+
});
|
|
194
|
+
|
|
190
195
|
pi.on("before_agent_start", async (event, ctx) => {
|
|
191
196
|
if (!activePrompt.ok) {
|
|
192
197
|
if (activePrompt.error !== NO_SELECTION && !warningShown) {
|