diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-22 21:28:48 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-22 21:28:48 +0200 |
| commit | 5e817371a43ba468e5f216230d504b6124c85e95 (patch) | |
| tree | 1062a05bb733ef5c04405a619deb52b72c6084a6 /pi/agent/extensions/reload-runtime | |
| parent | fc8a5aefff7c8421c579df1ba8391fdde411d731 (diff) | |
fix
Diffstat (limited to 'pi/agent/extensions/reload-runtime')
| -rw-r--r-- | pi/agent/extensions/reload-runtime/README.md | 46 | ||||
| -rw-r--r-- | pi/agent/extensions/reload-runtime/index.ts | 26 |
2 files changed, 0 insertions, 72 deletions
diff --git a/pi/agent/extensions/reload-runtime/README.md b/pi/agent/extensions/reload-runtime/README.md deleted file mode 100644 index 1c209d5..0000000 --- a/pi/agent/extensions/reload-runtime/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Reload Runtime - -Runtime reload support for Pi. - -This is the upstream `reload-runtime.ts` example installed as a local extension -in your dotfiles-backed Pi tree. Pi does not ship a `reload-runtime.sh` -extension in the bundled examples; the actual upstream example is TypeScript and -registers both a slash command and a tool. - -## What It Does - -- adds `/reload-runtime` -- adds the `reload_runtime` tool -- reloads extensions, skills, prompts, and themes in the current Pi session - -## Usage Flows - -### Flow 1: Reload after editing dotfiles - -1. Edit an extension, skill, prompt, or theme on disk. -2. In the same Pi session, run: - -```text -/reload-runtime -``` - -3. Pi reloads the runtime without restarting the process. - -### Flow 2: Let the agent request a reload - -Because this also exposes a tool, the agent can ask to reload the runtime when -that makes sense: - -```text -Use the reload_runtime tool after updating the extension files so the new command set is active. -``` - -The tool queues `/reload-runtime` as a follow-up command. - -## Notes And Limits - -- Reload affects the current Pi session only. -- It is most useful in an interactive session that stays open while you are - editing your Pi configuration. -- In one-shot `pi -p` usage, reload is usually not very interesting because the - process exits immediately after handling the prompt. diff --git a/pi/agent/extensions/reload-runtime/index.ts b/pi/agent/extensions/reload-runtime/index.ts deleted file mode 100644 index ebe6b7f..0000000 --- a/pi/agent/extensions/reload-runtime/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; -import { Type } from "@sinclair/typebox"; - -export default function (pi: ExtensionAPI) { - pi.registerCommand("reload-runtime", { - description: "Reload extensions, skills, prompts, and themes", - handler: async (_args, ctx) => { - await ctx.reload(); - return; - }, - }); - - pi.registerTool({ - name: "reload_runtime", - label: "Reload Runtime", - description: "Reload extensions, skills, prompts, and themes", - parameters: Type.Object({}), - async execute() { - pi.sendUserMessage("/reload-runtime", { deliverAs: "followUp" }); - return { - content: [{ type: "text", text: "Queued /reload-runtime as a follow-up command." }], - details: {}, - }; - }, - }); -} |
