15 lines
508 B
TypeScript
15 lines
508 B
TypeScript
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
|
|
const TARGET = "about pi itself, its SDK, extensions, themes, skills, or TUI";
|
|
const REPLACEMENT = "about pi, its SDK, extensions, themes, skills, or TUI";
|
|
|
|
export default function(pi: ExtensionAPI) {
|
|
pi.on("before_agent_start", (event, ctx) => {
|
|
if (ctx.model?.provider !== "anthropic") return;
|
|
if (!event.systemPrompt.includes(TARGET)) return;
|
|
return {
|
|
systemPrompt: event.systemPrompt.replace(TARGET, REPLACEMENT),
|
|
};
|
|
});
|
|
}
|