From 164036109cf33766bab10079e3d9ca502903bcfb Mon Sep 17 00:00:00 2001 From: joelazar Date: Mon, 23 Mar 2026 01:44:08 +0100 Subject: [PATCH] :wrench: add extension documentation and .gitignore --- .gitignore | 1 + dot_pi/agent/extensions/btw/index.ts | 6 ++++++ dot_pi/agent/extensions/commit/index.ts | 6 ++++++ dot_pi/agent/extensions/cwd-history/index.ts | 11 ++++++----- dot_pi/agent/extensions/prompt-editor/index.ts | 7 +++++++ dot_pi/agent/extensions/sandbox/index.ts | 7 +++++++ dot_pi/agent/extensions/whimsical/index.ts | 6 ++++++ 7 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/dot_pi/agent/extensions/btw/index.ts b/dot_pi/agent/extensions/btw/index.ts index ce2498b5..b7955edf 100644 --- a/dot_pi/agent/extensions/btw/index.ts +++ b/dot_pi/agent/extensions/btw/index.ts @@ -1,3 +1,9 @@ +/** + * BTW - Side-chat popover for quick questions + * + * Opens a lightweight side-chat thread without interrupting the main conversation. + * `/btw ` asks immediately, `/btw` opens an interactive side thread. + */ import { buildSessionContext, codingTools, diff --git a/dot_pi/agent/extensions/commit/index.ts b/dot_pi/agent/extensions/commit/index.ts index 01d5ae03..9ca53cf1 100644 --- a/dot_pi/agent/extensions/commit/index.ts +++ b/dot_pi/agent/extensions/commit/index.ts @@ -1,3 +1,9 @@ +/** + * Commit - AI-powered git commit message generator + * + * Generates commit messages that match the repository's existing style + * and conventions. Examines recent commits for format, emoji usage, and structure. + */ import { completeSimple, type Api, diff --git a/dot_pi/agent/extensions/cwd-history/index.ts b/dot_pi/agent/extensions/cwd-history/index.ts index 3a8f5bb1..d7b4ef4b 100644 --- a/dot_pi/agent/extensions/cwd-history/index.ts +++ b/dot_pi/agent/extensions/cwd-history/index.ts @@ -1,3 +1,9 @@ +/** + * CWD History - Cross-session prompt history by working directory + * + * Seeds the prompt editor history with recent prompts from the current session + * and other sessions started in the same working directory. + */ import type { ExtensionAPI, ExtensionContext, @@ -6,11 +12,6 @@ import { CustomEditor } from "@mariozechner/pi-coding-agent"; import path from "node:path"; import os from "node:os"; import fs from "node:fs/promises"; - -/** - * Extension that seeds the prompt editor history with recent prompts from the - * current session and other sessions started in the same working directory. - */ const MAX_HISTORY_ENTRIES = 100; const MAX_RECENT_PROMPTS = 30; diff --git a/dot_pi/agent/extensions/prompt-editor/index.ts b/dot_pi/agent/extensions/prompt-editor/index.ts index c1dce9dc..fa391122 100644 --- a/dot_pi/agent/extensions/prompt-editor/index.ts +++ b/dot_pi/agent/extensions/prompt-editor/index.ts @@ -1,3 +1,10 @@ +/** + * Prompt Editor - Mode-based model and thinking level switching + * + * Provides a /mode command to switch between named prompt modes, each with + * its own provider, model, and thinking level. Modes are persisted and + * the editor border color reflects the current thinking level. + */ import type { ExtensionAPI, ExtensionContext, ModelSelectEvent, ThinkingLevel } from "@mariozechner/pi-coding-agent"; import { CustomEditor, ModelSelectorComponent, SettingsManager } from "@mariozechner/pi-coding-agent"; import path from "node:path"; diff --git a/dot_pi/agent/extensions/sandbox/index.ts b/dot_pi/agent/extensions/sandbox/index.ts index f4c01281..b013bd50 100644 --- a/dot_pi/agent/extensions/sandbox/index.ts +++ b/dot_pi/agent/extensions/sandbox/index.ts @@ -1,3 +1,10 @@ +/** + * Sandbox - OS-level sandboxing for bash commands + * + * Wraps bash tool execution with SandboxManager to restrict network access + * and filesystem operations. Configurable via sandbox.json with domain + * allowlists and filesystem policies. + */ import { spawn } from "node:child_process"; import { existsSync, readFileSync } from "node:fs"; import { homedir } from "node:os"; diff --git a/dot_pi/agent/extensions/whimsical/index.ts b/dot_pi/agent/extensions/whimsical/index.ts index 6c44860d..fcda40e9 100644 --- a/dot_pi/agent/extensions/whimsical/index.ts +++ b/dot_pi/agent/extensions/whimsical/index.ts @@ -1,3 +1,9 @@ +/** + * Whimsical - Fun loading messages + * + * Replaces the default "Thinking..." status with random whimsical messages + * like "Combobulating...", "Pontificating...", and "Woolgathering...". + */ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; const messages = [ -- 2.51.2