pi-cc-ui

agent
Guvenlik Denetimi
Basarisiz
Health Uyari
  • No license — Repository has no license file
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 7 GitHub stars
Code Basarisiz
  • spawnSync — Synchronous process spawning in cache-timer.ts
  • process.env — Environment variable access in spinner.ts
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Claude Code spinner and prompt cache counter extension for Pi

README.md

Claude Code spinner with live token rate, 5-minute prompt cache TTL counter with git status, and compact tool renderers for Pi.
Node.js 22+ TypeScript 7.0+ 187 tests passed MIT License

cc-ui is a terminal UI extension for Pi that replaces the default working indicator with a compact animated spinner and live streaming generation speed (tok/s), adds git status and a prompt cache TTL counter beneath the editor, and renders tool calls in compact Claude style (● Label(detail) / └ summary).

Installation

Pi automatically discovers extensions inside ~/.pi/agent/extensions/. The extension adds no runtime package dependencies; it uses Pi's host APIs:

git clone https://github.com/ArdaYILDIZ-DEV/pi-cc-ui.git ~/.pi/agent/extensions/cc-ui

Alternatively, as a pi package (requires the pi-package keyword, included):

pi install git:github.com/ArdaYILDIZ-DEV/pi-cc-ui

Pi will load and activate the extension on its next start or reload.

Features

  • Compact spinner row: Animated glyph (· ✢ ✳ ✶ ✻ ✽), Turkish action verbs, token counters, live streaming generation speed (tok/s), elapsed turn time, and a simple thinking status.
  • Git status & prompt cache TTL bar: Displays git branch, modified file count, and open pull request on the left (main* · 3 dosya), alongside the right-aligned 36sn / 5dk cache TTL counter immediately below the editor (placement: "belowEditor").
  • Proximity color shifting: The counter smoothly interpolates from fresh green (#4EBA65) through yellow and orange, darkening into deep crimson red (RGB 140, 18, 18) as 5 minutes approaches, with the / 5dk deadline highlighted in red.
  • Audio warning alerts: Plays non-blocking audio notifications as cache TTL milestones pass:
      1. dakika: 3.mp3 (1 kez)
      1. dakika: 4.mp3 (1 kez)
    • 4.30. dakika: 4.mp3 (2 kez)
  • Slash command: /cache displays exact elapsed/remaining time; /cache toggle shows or hides the counter; /cache sound toggles sound alerts; /cache sound test plays a test sound.
  • Git commands: /git shows repository status, branch, and open PR; /git refresh forces an immediate background update.
  • Compact tool renderers & Claude diff: Every tool renders as ● Label(detail) with a one-line └ summary. The edit tool adds Claude Code diff styling with green/red backgrounds, word-level diffs, <lineNum> <sign> <code> gutters, and syntax highlighting. Toggle with /cc-tools.

Commands

Command Action
/cache Shows prompt cache TTL elapsed time, remaining seconds, and status notification
/cache toggle Toggles the sub-editor counter widget on or off
/cache sound Toggles audio warning alerts on or off (sound on / sound off)
/cache sound test Plays the 3-minute warning sound immediately to test audio output
/git Shows current git repository branch, modified file count, and open pull request
/git refresh Forces an immediate background refresh of git and pull request state
/cc-tools Shows compact tool renderer status
/cc-tools on / /cc-tools off / /cc-tools toggle Enables or disables compact tool renderers dynamically

Project structure

.
├── cache-timer.ts          # 5-minute prompt cache TTL widget with git status integration (below editor)
├── claude-diff.ts          # Claude Code diff parser, syntax highlighter, and TUI component
├── git-info.ts             # zero-dependency git repository & pull request tracker
├── index.ts                # extension entry point registering spinner, git info, cache timer, and tool renderers
├── package.json            # package configuration and test script
├── palette.ts              # Claude Code palette colors, truecolor ANSI, and sanitization
├── pi-compat.ts            # Guarded Pi UI notification compatibility helper
├── README.md               # project documentation
├── sounds                  # prompt cache warning audio files (3.mp3, 4.mp3)
├── spinner.ts              # Lightweight spinner, Turkish action verbs, and live tok/s
├── word-diff.ts            # Bounded dependency-free word-level diff
├── tests                   # 187 unit, lifecycle, performance, and security tests
├── tool-renderers.ts       # Claude-style compact renderers for builtin + custom tools (`/cc-tools`)
└── tsconfig.json           # TypeScript configuration

Testing

Run typecheck and the test suite:

npm run typecheck
npm test

License

MIT

Yorumlar (0)

Sonuc bulunamadi