repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

pi(ext): remove thinking-label extension

f07dc62f836c548c527e2c602bc3a688e872e8ee

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (2)

pi/agent/extensions/thinking-label/index.ts

Deleted
deleted file mode 100644
1 -/**
2 - * Hidden Thinking Label Extension
3 - *
4 - * Demonstrates `ctx.ui.setHiddenThinkingLabel()` for customizing the label shown
5 - * when thinking blocks are hidden.
6 - *
7 - * Usage:
8 - * pi --extension examples/extensions/hidden-thinking-label.ts
9 - *
10 - * Test:
11 - * 1. Load this extension
12 - * 2. Hide thinking blocks with Ctrl+T
13 - * 3. Ask for something that produces reasoning output
14 - * 4. The collapsed thinking block label will show the custom text
15 - *
16 - * Commands:
17 - * /thinking-label <text> Set a custom hidden thinking label
18 - * /thinking-label Reset to the default label
19 - */
21 -import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
23 -const DEFAULT_LABEL = "Brain hurts...";
25 -export default function (pi: ExtensionAPI) {
26 - let label = DEFAULT_LABEL;
28 - const applyLabel = (ctx: ExtensionContext) => {
29 - ctx.ui.setHiddenThinkingLabel(label);
30 - };
32 - pi.on("session_start", async (_event, ctx) => {
33 - applyLabel(ctx);
34 - });
36 - pi.registerCommand("thinking-label", {
37 - description: "Set the hidden thinking label. Use without args to reset.",
38 - handler: async (args, ctx) => {
39 - const nextLabel = args.trim();
41 - if (!nextLabel) {
42 - label = DEFAULT_LABEL;
43 - ctx.ui.setHiddenThinkingLabel();
44 - ctx.ui.notify(`Hidden thinking label reset to: ${DEFAULT_LABEL}`);
45 - return;
46 - }
48 - label = nextLabel;
49 - ctx.ui.setHiddenThinkingLabel(label);
50 - ctx.ui.notify(`Hidden thinking label set to: ${label}`);
51 - },
52 - });
53 -}

pi/agent/extensions/thinking-label/package.json

Deleted
deleted file mode 100644
1 -{
2 - "name": "@bugabinga/pi-ext-thinking-label",
3 - "version": "0.1.0",
4 - "private": true,
5 - "type": "module",
6 - "main": "index.ts"
7 -}