@ryan_nookpi/pi-extension-claude-spinner 0.1.0

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.
Files changed (3) hide show
  1. package/README.md +17 -0
  2. package/index.ts +22 -0
  3. package/package.json +34 -0
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @ryan_nookpi/pi-extension-claude-spinner
2
+
3
+ This extension applies a Claude-style spinner to Pi sessions.
4
+
5
+ It only changes the working indicator frames. It does not add custom working text or elapsed-time status messages.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pi install npm:@ryan_nookpi/pi-extension-claude-spinner
11
+ ```
12
+
13
+ ## What it does
14
+
15
+ - sets the working indicator on session start
16
+ - uses the following frame cycle: `· ✻ ✽ ✶ ✳ ✢`
17
+ - keeps the rest of Pi's default working text behavior untouched
package/index.ts ADDED
@@ -0,0 +1,22 @@
1
+ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
2
+
3
+ export const SPINNER_FRAMES = ["·", "✻", "✽", "✶", "✳", "✢"] as const;
4
+ const SPINNER_INTERVAL_MS = 120;
5
+
6
+ type SpinnerUI = {
7
+ setWorkingIndicator: (options: { frames: string[]; intervalMs: number }) => void;
8
+ theme: {
9
+ fg: (color: string, text: string) => string;
10
+ };
11
+ };
12
+
13
+ export default function claudeSpinner(pi: ExtensionAPI): void {
14
+ pi.on("session_start", async (_event, ctx) => {
15
+ if (!ctx.hasUI) return;
16
+ const ui = ctx.ui as typeof ctx.ui & SpinnerUI;
17
+ ui.setWorkingIndicator({
18
+ frames: SPINNER_FRAMES.map((frame) => ui.theme.fg("accent", frame)),
19
+ intervalMs: SPINNER_INTERVAL_MS,
20
+ });
21
+ });
22
+ }
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@ryan_nookpi/pi-extension-claude-spinner",
3
+ "version": "0.1.0",
4
+ "description": "Standalone Pi extension package for Claude-style spinner frames.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Jonghakseo/pi-extension.git",
9
+ "directory": "packages/claude-spinner"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/Jonghakseo/pi-extension/issues"
13
+ },
14
+ "homepage": "https://github.com/Jonghakseo/pi-extension/tree/main/packages/claude-spinner#readme",
15
+ "type": "module",
16
+ "keywords": [
17
+ "pi-package"
18
+ ],
19
+ "files": [
20
+ "index.ts",
21
+ "README.md"
22
+ ],
23
+ "pi": {
24
+ "extensions": [
25
+ "./index.ts"
26
+ ]
27
+ },
28
+ "peerDependencies": {
29
+ "@mariozechner/pi-coding-agent": "*"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ }
34
+ }