pi-cc-extensions 0.8.31 → 0.8.33
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 +164 -174
- package/README.md +113 -115
- package/extensions/claude-code-style.ts +585 -442
- package/extensions/compact-thinking.ts +184 -0
- package/extensions/fixed-editor.ts +355 -0
- package/extensions/index.ts +10 -4
- package/extensions/tool-grouping.ts +4 -0
- package/node_modules/@tifan/pi-fixed-editor/README.md +36 -0
- package/node_modules/@tifan/pi-fixed-editor/package.json +46 -0
- package/node_modules/@tifan/pi-fixed-editor/src/cluster.ts +113 -0
- package/node_modules/@tifan/pi-fixed-editor/src/index.ts +259 -0
- package/node_modules/@tifan/pi-fixed-editor/src/terminal-split.ts +1337 -0
- package/package.json +9 -5
- package/extensions/ask-user-question/LICENSE +0 -21
- package/extensions/ask-user-question/README.md +0 -63
- package/extensions/ask-user-question/ask-user-question.ts +0 -266
- package/extensions/ask-user-question/config.ts +0 -79
- package/extensions/ask-user-question/events.ts +0 -55
- package/extensions/ask-user-question/index.ts +0 -17
- package/extensions/ask-user-question/reconcile.ts +0 -47
- package/extensions/ask-user-question/rpc-fallback.ts +0 -172
- package/extensions/ask-user-question/state/build-questionnaire.ts +0 -314
- package/extensions/ask-user-question/state/dialog-height.ts +0 -16
- package/extensions/ask-user-question/state/key-router.ts +0 -291
- package/extensions/ask-user-question/state/questionnaire-session.ts +0 -193
- package/extensions/ask-user-question/state/row-intent.ts +0 -143
- package/extensions/ask-user-question/state/selectors/contract.ts +0 -24
- package/extensions/ask-user-question/state/selectors/derivations.ts +0 -40
- package/extensions/ask-user-question/state/selectors/focus.ts +0 -17
- package/extensions/ask-user-question/state/selectors/projections.ts +0 -102
- package/extensions/ask-user-question/state/state-reducer.ts +0 -299
- package/extensions/ask-user-question/state/state.ts +0 -49
- package/extensions/ask-user-question/tool/format-answer.ts +0 -29
- package/extensions/ask-user-question/tool/response-envelope.ts +0 -50
- package/extensions/ask-user-question/tool/types.ts +0 -149
- package/extensions/ask-user-question/tool/validate-questionnaire.ts +0 -64
- package/extensions/ask-user-question/view/component-binding.ts +0 -45
- package/extensions/ask-user-question/view/components/inline-input.ts +0 -109
- package/extensions/ask-user-question/view/components/multi-select-view.ts +0 -198
- package/extensions/ask-user-question/view/components/option-list-view.ts +0 -77
- package/extensions/ask-user-question/view/components/preview/markdown-content-cache.ts +0 -76
- package/extensions/ask-user-question/view/components/preview/preview-block-renderer.ts +0 -114
- package/extensions/ask-user-question/view/components/preview/preview-box-renderer.ts +0 -86
- package/extensions/ask-user-question/view/components/preview/preview-layout-decider.ts +0 -219
- package/extensions/ask-user-question/view/components/preview/preview-pane.ts +0 -230
- package/extensions/ask-user-question/view/components/submit-picker.ts +0 -66
- package/extensions/ask-user-question/view/components/tab-bar.ts +0 -57
- package/extensions/ask-user-question/view/components/wrapping-select.ts +0 -307
- package/extensions/ask-user-question/view/dialog-builder.ts +0 -225
- package/extensions/ask-user-question/view/props-adapter.ts +0 -123
- package/extensions/ask-user-question/view/stateful-view.ts +0 -24
- package/extensions/ask-user-question/view/tab-components.ts +0 -16
- package/extensions/ask-user-question/view/tab-content-strategy.ts +0 -264
package/README.en.md
CHANGED
|
@@ -1,174 +1,164 @@
|
|
|
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,
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/ccstyle
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
pi
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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).
|
|
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, a fixed editor, 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
|
+
## Features
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
| Feature | Description | Entry point |
|
|
76
|
+
| --------------------------- | -------------------------------------------------------------------------------------------------- | --------------------- |
|
|
77
|
+
| Claude Code-style output | Tool summaries, expand/collapse, rich edit/write diffs, and `on` / `off` / `compact` modes | `/ccstyle` |
|
|
78
|
+
| Fixed-editor interaction | Powered by `@tifan/pi-fixed-editor`, with runtime toggling, five-row wheel scrolling, tool clicks, and back-to-bottom control | `/ccstyle` |
|
|
79
|
+
| Context inspection | Usage breakdown and previews for the system prompt, tools, skills, and messages | `/context` |
|
|
80
|
+
| Session references | Search and inject effective context from previous Sessions or existing SubAgents | `@session:` |
|
|
81
|
+
| Theme | Includes the GitHub Dark Default theme | `/theme` |
|
|
82
|
+
|
|
83
|
+
### Output modes
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
| Mode | Behavior |
|
|
87
|
+
| ----------- | ----------------------------------------------------------------------- |
|
|
88
|
+
| `on` | Claude Code-style tool output with rich diffs for`edit` and `write` |
|
|
89
|
+
| `off` | Native Pi renderers |
|
|
90
|
+
| `compact` | One-line previews, merged repeated calls, duration, and run summaries |
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
/ccstyle on
|
|
94
|
+
/ccstyle off
|
|
95
|
+
/ccstyle compact
|
|
96
|
+
/ccstyle status
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Configuration is stored in `~/.pi/agent/claude-code-style.json`:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mode": "on",
|
|
104
|
+
"excludeRenderers": [],
|
|
105
|
+
"fixedEditorFeatures": true
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- `excludeRenderers` uses exact tool names. `Agent` always keeps its dedicated renderer.
|
|
110
|
+
- `fixedEditorFeatures: true` enables `@tifan/pi-fixed-editor` plus mouse scrolling, clicks, viewport mapping, and the back-to-bottom indicator.
|
|
111
|
+
- Set it to `false`, or toggle **Fixed editor** in `/ccstyle`, to restore Pi's native scrolling editor immediately. `Ctrl+End` remains available.
|
|
112
|
+
- Run `/reload` after editing the file manually.
|
|
113
|
+
|
|
114
|
+
### `@` references
|
|
115
|
+
|
|
116
|
+
- Enter `@session:` to reference a previous Session.
|
|
117
|
+
- Enter `@agent-name` to delegate to a custom Agent.
|
|
118
|
+
- Compatible with `@bacnh85/pi-fff` and `@tintinweb/pi-subagents`.
|
|
119
|
+
- Session context is deduplicated and size-limited before injection.
|
|
120
|
+
|
|
121
|
+
## Other installation methods
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# GitHub
|
|
125
|
+
pi install git:github.com/minuque/pi-cc-extensions
|
|
126
|
+
|
|
127
|
+
# Local repository
|
|
128
|
+
pi install /absolute/path/to/pi-cc-extensions
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Local development
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npm test
|
|
135
|
+
npm run typecheck
|
|
136
|
+
pi -e .
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Run `/reload` after changing extensions.
|
|
140
|
+
|
|
141
|
+
## Compatibility
|
|
142
|
+
|
|
143
|
+
- Node.js `>=22.19.0`
|
|
144
|
+
- Loaded through `pi.extensions` and `pi.themes` in the root `package.json`
|
|
145
|
+
- If a Pi, TUI, or `@tifan/pi-fixed-editor` update causes display issues, try `/reload` first
|
|
146
|
+
|
|
147
|
+
## Recommended companions
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
| Extension | Purpose |
|
|
151
|
+
| ------------------------------- | -------------------------------------------------------------- |
|
|
152
|
+
| `npm:@tintinweb/pi-subagents` | Parallel SubAgents, background tasks, and worktree isolation |
|
|
153
|
+
| `npm:pi-mcp-adapter` | On-demand MCP tool discovery with lower context usage |
|
|
154
|
+
| `npm:pi-theme-picker` | Theme search and live preview |
|
|
155
|
+
| `npm:@ayulab/pi-rewind` | Checkpoint-based code or conversation rollback |
|
|
156
|
+
| `npm:pi-compact-thinking` | Compact rendering for hidden thinking blocks |
|
|
157
|
+
|
|
158
|
+
## Credits
|
|
159
|
+
|
|
160
|
+
- Compact transcript behavior is based on [`avhagedorn/pi-compact-transcript`](https://github.com/avhagedorn/pi-compact-transcript) v0.6.2 (MIT).
|
|
161
|
+
- Fixed-editor behavior is provided by [`@tifan/pi-fixed-editor`](https://github.com/tifandotme/pi-extensions/tree/master/packages/pi-fixed-editor) (MIT).
|
|
162
|
+
- 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).
|
|
163
|
+
- Startup header based on [`EnderLiquid/pi-startup-header`](https://github.com/EnderLiquid/pi-startup-header) (MIT).
|
|
164
|
+
- Command aliases based on [`xRyul/pi-aliases`](https://github.com/xRyul/pi-aliases) (MIT).
|
package/README.md
CHANGED
|
@@ -1,115 +1,113 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="./assets/readme/hero.svg" width="100%" alt="pi-cc-extensions: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="#兼容性"><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
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
<p align="center">
|
|
17
|
-
<strong>简体中文</strong> · <a href="./README.en.md">English</a>
|
|
18
|
-
</p>
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## 界面预览
|
|
23
|
-
|
|
24
|
-
<table>
|
|
25
|
-
<tr>
|
|
26
|
-
<td colspan="2" align="center">
|
|
27
|
-
<img src="./assets/readme/welcome.webp" width="100%" alt="Pi 启动后的欢迎界面">
|
|
28
|
-
<br>
|
|
29
|
-
<sub><b>欢迎界面</b><br> @ <code>npm:pi-startup-header</code> 与 <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="Pi fixed-editor 中的工具结果、回到底部按钮与 Ctrl+End 快捷键">
|
|
35
|
-
<br>
|
|
36
|
-
<sub><b>固定编辑器工作流</b><br>工具结果摘要、折叠展开与键盘导航</sub>
|
|
37
|
-
</td>
|
|
38
|
-
<td width="50%" align="center">
|
|
39
|
-
<img src="./assets/readme/session-reference.webp" width="100%" alt="在 Pi 中通过 @ 补全选择历史 Session">
|
|
40
|
-
<br>
|
|
41
|
-
<sub><b>历史 Session 引用</b><br>通过 @ 补全快速找到并引用历史会话</sub>
|
|
42
|
-
</td>
|
|
43
|
-
</tr>
|
|
44
|
-
<tr>
|
|
45
|
-
<td width="50%" align="center">
|
|
46
|
-
<img src="./assets/readme/context-usage.webp" width="100%" alt="Pi 上下文窗口用量查看器">
|
|
47
|
-
<br>
|
|
48
|
-
<sub><b>上下文用量</b><br>查看 System prompt、Tools、Skills 等占用分布</sub>
|
|
49
|
-
</td>
|
|
50
|
-
<td width="50%" align="center">
|
|
51
|
-
<img src="./assets/readme/context-preview.webp" width="100%" alt="Pi 中展开查看 System Prompt 内容">
|
|
52
|
-
<br>
|
|
53
|
-
<sub><b>上下文预览</b><br>按类别展开查看实际注入的上下文内容</sub>
|
|
54
|
-
</td>
|
|
55
|
-
</tr>
|
|
56
|
-
</table>
|
|
57
|
-
|
|
58
|
-
## 快速开始
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
pi install npm:pi-cc-extensions
|
|
62
|
-
|
|
63
|
-
# GitHub
|
|
64
|
-
pi install git:github.com/minuque/pi-cc-extensions
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
安装后执行 `/reload`
|
|
68
|
-
|
|
69
|
-
## 功能
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
| 功能 | 说明 | 入口 |
|
|
73
|
-
| ------------------------------ | --------------------------------------------------------------------------------- | --------------------- |
|
|
74
|
-
| Claude Code 风格输出
|
|
75
|
-
| Fixed editor 交互
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
npm
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
| `npm:pi-
|
|
103
|
-
| `npm
|
|
104
|
-
| `npm
|
|
105
|
-
| `npm:pi-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
- 启动头基于 [`EnderLiquid/pi-startup-header`](https://github.com/EnderLiquid/pi-startup-header)(MIT)。
|
|
115
|
-
- 命令别名基于 [`xRyul/pi-aliases`](https://github.com/xRyul/pi-aliases)(MIT)。
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./assets/readme/hero.svg" width="100%" alt="pi-cc-extensions: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="#兼容性"><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 风格界面、固定编辑器、上下文检查,以及 Agent / Session 引用。
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<strong>简体中文</strong> · <a href="./README.en.md">English</a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 界面预览
|
|
23
|
+
|
|
24
|
+
<table>
|
|
25
|
+
<tr>
|
|
26
|
+
<td colspan="2" align="center">
|
|
27
|
+
<img src="./assets/readme/welcome.webp" width="100%" alt="Pi 启动后的欢迎界面">
|
|
28
|
+
<br>
|
|
29
|
+
<sub><b>欢迎界面</b><br> @ <code>npm:pi-startup-header</code> 与 <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="Pi fixed-editor 中的工具结果、回到底部按钮与 Ctrl+End 快捷键">
|
|
35
|
+
<br>
|
|
36
|
+
<sub><b>固定编辑器工作流</b><br>工具结果摘要、折叠展开与键盘导航</sub>
|
|
37
|
+
</td>
|
|
38
|
+
<td width="50%" align="center">
|
|
39
|
+
<img src="./assets/readme/session-reference.webp" width="100%" alt="在 Pi 中通过 @ 补全选择历史 Session">
|
|
40
|
+
<br>
|
|
41
|
+
<sub><b>历史 Session 引用</b><br>通过 @ 补全快速找到并引用历史会话</sub>
|
|
42
|
+
</td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr>
|
|
45
|
+
<td width="50%" align="center">
|
|
46
|
+
<img src="./assets/readme/context-usage.webp" width="100%" alt="Pi 上下文窗口用量查看器">
|
|
47
|
+
<br>
|
|
48
|
+
<sub><b>上下文用量</b><br>查看 System prompt、Tools、Skills 等占用分布</sub>
|
|
49
|
+
</td>
|
|
50
|
+
<td width="50%" align="center">
|
|
51
|
+
<img src="./assets/readme/context-preview.webp" width="100%" alt="Pi 中展开查看 System Prompt 内容">
|
|
52
|
+
<br>
|
|
53
|
+
<sub><b>上下文预览</b><br>按类别展开查看实际注入的上下文内容</sub>
|
|
54
|
+
</td>
|
|
55
|
+
</tr>
|
|
56
|
+
</table>
|
|
57
|
+
|
|
58
|
+
## 快速开始
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pi install npm:pi-cc-extensions
|
|
62
|
+
|
|
63
|
+
# GitHub
|
|
64
|
+
pi install git:github.com/minuque/pi-cc-extensions
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
安装后执行 `/reload`
|
|
68
|
+
|
|
69
|
+
## 功能
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
| 功能 | 说明 | 入口 |
|
|
73
|
+
| ------------------------------ | --------------------------------------------------------------------------------- | --------------------- |
|
|
74
|
+
| Claude Code 风格输出 | 工具摘要、折叠展开、rich edit/write diff,以及`on` / `off` / `compact` 三种模式 | `/ccstyle` |
|
|
75
|
+
| Fixed editor 交互 | 基于 `@tifan/pi-fixed-editor`,支持动态开关、每刻度 5 行滚动、工具点击与回到底部 | `/ccstyle` |
|
|
76
|
+
| 上下文检查 | 查看上下文占用,并预览 System prompt、Tools、Skills 和消息内容 | `/context` |
|
|
77
|
+
| Session 引用 | 搜索并注入历史 Session 或现有 SubAgent 的有效上下文 | `@session:` |
|
|
78
|
+
| 主题 | 随包提供内置 GitHub Dark Default 主题 | `/theme` |
|
|
79
|
+
|
|
80
|
+
## 本地开发
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm test
|
|
84
|
+
npm run typecheck
|
|
85
|
+
pi -e .
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
修改扩展后执行 `/reload`。
|
|
89
|
+
|
|
90
|
+
## 兼容性
|
|
91
|
+
|
|
92
|
+
- Node.js `>=22.19.0`
|
|
93
|
+
- 通过根目录 `package.json` 的 `pi.extensions` 和 `pi.themes` 加载
|
|
94
|
+
- `@tifan/pi-fixed-editor`、Pi 或 TUI 内部实现升级后若显示异常,先执行 `/reload`
|
|
95
|
+
|
|
96
|
+
## 推荐搭配
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
| 扩展 | 用途 |
|
|
100
|
+
| ------------------------------- | ------------------------------------- |
|
|
101
|
+
| `npm:@tintinweb/pi-subagents` | 并行 SubAgent、后台任务与工作树隔离 |
|
|
102
|
+
| `npm:pi-mcp-adapter` | 按需发现 MCP 工具,减少上下文占用 |
|
|
103
|
+
| `npm:pi-theme-picker` | 主题搜索和实时预览 |
|
|
104
|
+
| `npm:@ayulab/pi-rewind` | 基于 checkpoint 回退代码或对话 |
|
|
105
|
+
| `npm:pi-compact-thinking` | 紧凑显示隐藏的 thinking 块 |
|
|
106
|
+
|
|
107
|
+
## 致谢
|
|
108
|
+
|
|
109
|
+
- Compact transcript 基于 [`avhagedorn/pi-compact-transcript`](https://github.com/avhagedorn/pi-compact-transcript) v0.6.2(MIT)。
|
|
110
|
+
- Fixed editor 由 [`@tifan/pi-fixed-editor`](https://github.com/tifandotme/pi-extensions/tree/master/packages/pi-fixed-editor) 提供(MIT)。
|
|
111
|
+
- Rich diff 改编自 [`MasuRii/pi-tool-display`](https://github.com/MasuRii/pi-tool-display)(MIT);详见 [`extensions/tool-diff/ATTRIBUTION.md`](./extensions/tool-diff/ATTRIBUTION.md)。
|
|
112
|
+
- 启动头基于 [`EnderLiquid/pi-startup-header`](https://github.com/EnderLiquid/pi-startup-header)(MIT)。
|
|
113
|
+
- 命令别名基于 [`xRyul/pi-aliases`](https://github.com/xRyul/pi-aliases)(MIT)。
|