pi-cc-extensions 0.8.15 → 0.8.17
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.
- package/README.en.md +174 -174
- package/README.md +115 -174
- package/extensions/ask-user-question/state/questionnaire-session.ts +19 -2
- package/extensions/ask-user-question/view/dialog-builder.ts +16 -1
- package/extensions/claude-code-style.ts +73 -26
- package/extensions/closable-dialog.ts +57 -0
- package/extensions/context.ts +24 -3
- package/extensions/pi-aliases.ts +31 -0
- package/extensions/pi-startup-header.ts +288 -0
- package/package.json +69 -67
package/README.en.md
CHANGED
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="./assets/readme/hero.svg" width="100%" alt="pi-cc-extensions: a productivity extension suite for Pi">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<p align="center">
|
|
6
|
-
<a href="https://pi.dev/packages?name=pi-cc-extensions"><img alt="Pi package catalog" src="https://img.shields.io/badge/Pi-package-58B7FF?style=flat-square"></a>
|
|
7
|
-
<a href="https://www.npmjs.com/package/pi-cc-extensions"><img alt="npm version" src="https://img.shields.io/npm/v/pi-cc-extensions?style=flat-square&color=66E3C4"></a>
|
|
8
|
-
<a href="#compatibility"><img alt="Node.js 22.19 or newer" src="https://img.shields.io/badge/Node.js-%E2%89%A522.19-66E3C4?style=flat-square"></a>
|
|
9
|
-
<a href="./extensions"><img alt="TypeScript extensions" src="https://img.shields.io/badge/TypeScript-extensions-3178C6?style=flat-square"></a>
|
|
10
|
-
</p>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
Claude Code-style output, structured questionnaires, context inspection, and Agent / Session references.
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
<p align="center">
|
|
17
|
-
<a href="./README.md">简体中文</a> · <strong>English</strong>
|
|
18
|
-
</p>
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Preview
|
|
23
|
-
|
|
24
|
-
<table>
|
|
25
|
-
<tr>
|
|
26
|
-
<td colspan="2" align="center">
|
|
27
|
-
<img src="./assets/readme/welcome.webp" width="100%" alt="Pi welcome screen">
|
|
28
|
-
<br>
|
|
29
|
-
<sub><b>Welcome screen</b><br><code>npm:pi-startup-header</code> with <code>npm:pi-zentui</code></sub>
|
|
30
|
-
</td>
|
|
31
|
-
</tr>
|
|
32
|
-
<tr>
|
|
33
|
-
<td width="50%" align="center">
|
|
34
|
-
<img src="./assets/readme/fixed-editor-navigation.webp" width="100%" alt="Tool results, back-to-bottom control, and Ctrl+End in the fixed editor">
|
|
35
|
-
<br>
|
|
36
|
-
<sub><b>Fixed-editor workflow</b><br>Tool summaries, expand/collapse, and keyboard navigation</sub>
|
|
37
|
-
</td>
|
|
38
|
-
<td width="50%" align="center">
|
|
39
|
-
<img src="./assets/readme/session-reference.webp" width="100%" alt="Selecting a previous Session through at-sign completion">
|
|
40
|
-
<br>
|
|
41
|
-
<sub><b>Session references</b><br>Find and inject previous context through completion</sub>
|
|
42
|
-
</td>
|
|
43
|
-
</tr>
|
|
44
|
-
<tr>
|
|
45
|
-
<td width="50%" align="center">
|
|
46
|
-
<img src="./assets/readme/context-usage.webp" width="100%" alt="Context window usage breakdown">
|
|
47
|
-
<br>
|
|
48
|
-
<sub><b>Context usage</b><br>Inspect usage by category</sub>
|
|
49
|
-
</td>
|
|
50
|
-
<td width="50%" align="center">
|
|
51
|
-
<img src="./assets/readme/context-preview.webp" width="100%" alt="Previewing injected context">
|
|
52
|
-
<br>
|
|
53
|
-
<sub><b>Context preview</b><br>Inspect the content injected into the model</sub>
|
|
54
|
-
</td>
|
|
55
|
-
</tr>
|
|
56
|
-
</table>
|
|
57
|
-
|
|
58
|
-
## Quick start
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
pi install npm:pi-cc-extensions
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Run `/reload` after installation, then try:
|
|
65
|
-
|
|
66
|
-
```text
|
|
67
|
-
/ccstyle # Configure output and fixed-editor interaction
|
|
68
|
-
/context # Inspect context usage
|
|
69
|
-
@ # Complete Agents, Sessions, and files
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
The `ask_user_question` tool is registered automatically.
|
|
73
|
-
|
|
74
|
-
## Features
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
| Feature | Description | Entry point |
|
|
78
|
-
| --------------------------- | -------------------------------------------------------------------------------------------------- | --------------------- |
|
|
79
|
-
| Claude Code-style output | Tool summaries, expand/collapse, rich edit/write diffs, and`on` / `off` / `compact` modes | `/ccstyle` |
|
|
80
|
-
| Fixed-editor interaction | Five-row wheel scrolling, tool clicks, collapse anchoring, back-to-bottom control, and`Ctrl+End` | `/ccstyle` |
|
|
81
|
-
| Structured questionnaires | Single choice, multiple choice, custom answers, Markdown previews, and RPC / ACP fallback | `ask_user_question` |
|
|
82
|
-
| Context inspection | Usage breakdown and previews for the system prompt, tools, skills, and messages | `/context` |
|
|
83
|
-
| Session references | Search and inject effective context from previous Sessions or existing SubAgents | `@session:` |
|
|
84
|
-
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/ccstyle
|
|
98
|
-
/ccstyle
|
|
99
|
-
/ccstyle
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
- `
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- Enter `@
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
npm
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
| `npm
|
|
163
|
-
| `npm
|
|
164
|
-
| `npm:pi-
|
|
165
|
-
| `npm
|
|
166
|
-
| `npm
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./assets/readme/hero.svg" width="100%" alt="pi-cc-extensions: a productivity extension suite for Pi">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://pi.dev/packages?name=pi-cc-extensions"><img alt="Pi package catalog" src="https://img.shields.io/badge/Pi-package-58B7FF?style=flat-square"></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/pi-cc-extensions"><img alt="npm version" src="https://img.shields.io/npm/v/pi-cc-extensions?style=flat-square&color=66E3C4"></a>
|
|
8
|
+
<a href="#compatibility"><img alt="Node.js 22.19 or newer" src="https://img.shields.io/badge/Node.js-%E2%89%A522.19-66E3C4?style=flat-square"></a>
|
|
9
|
+
<a href="./extensions"><img alt="TypeScript extensions" src="https://img.shields.io/badge/TypeScript-extensions-3178C6?style=flat-square"></a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
Claude Code-style output, structured questionnaires, context inspection, and Agent / Session references.
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="./README.md">简体中文</a> · <strong>English</strong>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Preview
|
|
23
|
+
|
|
24
|
+
<table>
|
|
25
|
+
<tr>
|
|
26
|
+
<td colspan="2" align="center">
|
|
27
|
+
<img src="./assets/readme/welcome.webp" width="100%" alt="Pi welcome screen">
|
|
28
|
+
<br>
|
|
29
|
+
<sub><b>Welcome screen</b><br><code>npm:pi-startup-header</code> with <code>npm:pi-zentui</code></sub>
|
|
30
|
+
</td>
|
|
31
|
+
</tr>
|
|
32
|
+
<tr>
|
|
33
|
+
<td width="50%" align="center">
|
|
34
|
+
<img src="./assets/readme/fixed-editor-navigation.webp" width="100%" alt="Tool results, back-to-bottom control, and Ctrl+End in the fixed editor">
|
|
35
|
+
<br>
|
|
36
|
+
<sub><b>Fixed-editor workflow</b><br>Tool summaries, expand/collapse, and keyboard navigation</sub>
|
|
37
|
+
</td>
|
|
38
|
+
<td width="50%" align="center">
|
|
39
|
+
<img src="./assets/readme/session-reference.webp" width="100%" alt="Selecting a previous Session through at-sign completion">
|
|
40
|
+
<br>
|
|
41
|
+
<sub><b>Session references</b><br>Find and inject previous context through completion</sub>
|
|
42
|
+
</td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr>
|
|
45
|
+
<td width="50%" align="center">
|
|
46
|
+
<img src="./assets/readme/context-usage.webp" width="100%" alt="Context window usage breakdown">
|
|
47
|
+
<br>
|
|
48
|
+
<sub><b>Context usage</b><br>Inspect usage by category</sub>
|
|
49
|
+
</td>
|
|
50
|
+
<td width="50%" align="center">
|
|
51
|
+
<img src="./assets/readme/context-preview.webp" width="100%" alt="Previewing injected context">
|
|
52
|
+
<br>
|
|
53
|
+
<sub><b>Context preview</b><br>Inspect the content injected into the model</sub>
|
|
54
|
+
</td>
|
|
55
|
+
</tr>
|
|
56
|
+
</table>
|
|
57
|
+
|
|
58
|
+
## Quick start
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pi install npm:pi-cc-extensions
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Run `/reload` after installation, then try:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
/ccstyle # Configure output and fixed-editor interaction
|
|
68
|
+
/context # Inspect context usage
|
|
69
|
+
@ # Complete Agents, Sessions, and files
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The `ask_user_question` tool is registered automatically.
|
|
73
|
+
|
|
74
|
+
## Features
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
| Feature | Description | Entry point |
|
|
78
|
+
| --------------------------- | -------------------------------------------------------------------------------------------------- | --------------------- |
|
|
79
|
+
| Claude Code-style output | Tool summaries, expand/collapse, rich edit/write diffs, and`on` / `off` / `compact` modes | `/ccstyle` |
|
|
80
|
+
| Fixed-editor interaction | Five-row wheel scrolling, tool clicks, collapse anchoring, back-to-bottom control, and`Ctrl+End` | `/ccstyle` |
|
|
81
|
+
| Structured questionnaires | Single choice, multiple choice, custom answers, Markdown previews, and RPC / ACP fallback | `ask_user_question` |
|
|
82
|
+
| Context inspection | Usage breakdown and previews for the system prompt, tools, skills, and messages | `/context` |
|
|
83
|
+
| Session references | Search and inject effective context from previous Sessions or existing SubAgents | `@session:` |
|
|
84
|
+
| Theme | Includes the GitHub Dark Default theme | `/theme` |
|
|
85
|
+
|
|
86
|
+
### Output modes
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
| Mode | Behavior |
|
|
90
|
+
| ----------- | ----------------------------------------------------------------------- |
|
|
91
|
+
| `on` | Claude Code-style tool output with rich diffs for`edit` and `write` |
|
|
92
|
+
| `off` | Native Pi renderers |
|
|
93
|
+
| `compact` | One-line previews, merged repeated calls, duration, and run summaries |
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
/ccstyle on
|
|
97
|
+
/ccstyle off
|
|
98
|
+
/ccstyle compact
|
|
99
|
+
/ccstyle status
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Configuration is stored in `~/.pi/agent/claude-code-style.json`:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"mode": "on",
|
|
107
|
+
"excludeRenderers": [],
|
|
108
|
+
"fixedEditorFeatures": true
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- `excludeRenderers` uses exact tool names. `Agent` always keeps its dedicated renderer.
|
|
113
|
+
- `fixedEditorFeatures: true` enables fixed-editor mouse scrolling, clicks, viewport mapping, and the back-to-bottom indicator.
|
|
114
|
+
- Set it to `false` to disable terminal mouse reporting and restore native terminal wheel scrolling. `Ctrl+End` remains available.
|
|
115
|
+
- Run `/reload` after editing the file manually.
|
|
116
|
+
|
|
117
|
+
### Structured questionnaires
|
|
118
|
+
|
|
119
|
+
Supports 1–4 questions, 2–4 options per question, single and multiple selection, custom answers, and optional Markdown previews. The TUI preserves transcript space; RPC / ACP environments fall back to native dialogs.
|
|
120
|
+
|
|
121
|
+
Questionnaire configuration is stored at `~/.config/rpiv-ask-user-question/config.json`. See [`extensions/ask-user-question/README.md`](./extensions/ask-user-question/README.md) for shortcuts and detailed behavior.
|
|
122
|
+
|
|
123
|
+
### `@` references
|
|
124
|
+
|
|
125
|
+
- Enter `@session:` to reference a previous Session.
|
|
126
|
+
- Enter `@agent-name` to delegate to a custom Agent.
|
|
127
|
+
- Compatible with `@bacnh85/pi-fff` and `@tintinweb/pi-subagents`.
|
|
128
|
+
- Session context is deduplicated and size-limited before injection.
|
|
129
|
+
|
|
130
|
+
## Other installation methods
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# GitHub
|
|
134
|
+
pi install git:github.com/minuque/pi-cc-extensions
|
|
135
|
+
|
|
136
|
+
# Local repository
|
|
137
|
+
pi install /absolute/path/to/pi-cc-extensions
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Local development
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npm test
|
|
144
|
+
npm run typecheck
|
|
145
|
+
pi -e .
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Run `/reload` after changing extensions. Changes under `extensions/ask-user-question/`, or reinstalling its dependencies, require a full Pi restart.
|
|
149
|
+
|
|
150
|
+
## Compatibility
|
|
151
|
+
|
|
152
|
+
- Node.js `>=22.19.0`
|
|
153
|
+
- Loaded through `pi.extensions` and `pi.themes` in the root `package.json`
|
|
154
|
+
- If a Pi, TUI, or `pi-zentui` update causes display issues, try `/reload` first
|
|
155
|
+
|
|
156
|
+
## Recommended companions
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
| Extension | Purpose |
|
|
160
|
+
| ------------------------------- | -------------------------------------------------------------- |
|
|
161
|
+
| `npm:pi-zentui` | Fixed editor, status line, and Git status |
|
|
162
|
+
| `npm:@tintinweb/pi-subagents` | Parallel SubAgents, background tasks, and worktree isolation |
|
|
163
|
+
| `npm:pi-mcp-adapter` | On-demand MCP tool discovery with lower context usage |
|
|
164
|
+
| `npm:pi-theme-picker` | Theme search and live preview |
|
|
165
|
+
| `npm:@ayulab/pi-rewind` | Checkpoint-based code or conversation rollback |
|
|
166
|
+
| `npm:pi-compact-thinking` | Compact rendering for hidden thinking blocks |
|
|
167
|
+
|
|
168
|
+
## Credits
|
|
169
|
+
|
|
170
|
+
- Compact transcript behavior is based on [`avhagedorn/pi-compact-transcript`](https://github.com/avhagedorn/pi-compact-transcript) v0.6.2 (MIT).
|
|
171
|
+
- Structured questionnaires are based on [`@juicesharp/rpiv-ask-user-question`](https://github.com/juicesharp/rpiv-mono/tree/main/packages/rpiv-ask-user-question) v2.1.0 (MIT).
|
|
172
|
+
- Rich diffs are adapted from [`MasuRii/pi-tool-display`](https://github.com/MasuRii/pi-tool-display) (MIT). See [`extensions/tool-diff/ATTRIBUTION.md`](./extensions/tool-diff/ATTRIBUTION.md).
|
|
173
|
+
- Startup header based on [`EnderLiquid/pi-startup-header`](https://github.com/EnderLiquid/pi-startup-header) (MIT).
|
|
174
|
+
- Command aliases based on [`xRyul/pi-aliases`](https://github.com/xRyul/pi-aliases) (MIT).
|