pi-cc-extensions 0.8.38 → 0.8.41
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/LICENSE +21 -0
- package/README.en.md +3 -32
- package/README.md +13 -44
- package/extensions/claude-code-style.ts +1 -1
- package/extensions/compact-style.ts +10 -1
- package/extensions/compact-thinking.ts +1 -12
- package/package.json +2 -1
- package/assets/readme/context-preview.webp +0 -0
- package/assets/readme/context-usage.webp +0 -0
- package/assets/readme/fixed-editor-navigation.webp +0 -0
- package/assets/readme/session-reference.webp +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 minuque
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
CHANGED
|
@@ -22,39 +22,11 @@
|
|
|
22
22
|
## Preview
|
|
23
23
|
|
|
24
24
|
<table>
|
|
25
|
-
<
|
|
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>
|
|
25
|
+
<img src="./assets/readme/welcome.webp" width="100%" alt="Pi welcome screen">
|
|
56
26
|
</table>
|
|
57
27
|
|
|
28
|
+
https://github.com/user-attachments/assets/4ae094d2-7480-484b-a0c8-6e782495ce9f
|
|
29
|
+
|
|
58
30
|
## Quick start
|
|
59
31
|
|
|
60
32
|
```bash
|
|
@@ -153,7 +125,6 @@ Run `/reload` after changing extensions.
|
|
|
153
125
|
| `npm:pi-mcp-adapter` | On-demand MCP tool discovery with lower context usage |
|
|
154
126
|
| `npm:pi-theme-picker` | Theme search and live preview |
|
|
155
127
|
| `npm:@ayulab/pi-rewind` | Checkpoint-based code or conversation rollback |
|
|
156
|
-
| `npm:pi-compact-thinking` | Compact rendering for hidden thinking blocks |
|
|
157
128
|
|
|
158
129
|
## Credits
|
|
159
130
|
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
|
-
Claude Code 风格界面、固定编辑器、上下文检查,以及 Agent / Session 引用。
|
|
13
|
+
类 Claude Code 风格界面、固定编辑器、上下文检查,以及 Agent / Session 引用。
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
@@ -22,39 +22,11 @@
|
|
|
22
22
|
## 界面预览
|
|
23
23
|
|
|
24
24
|
<table>
|
|
25
|
-
|
|
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>
|
|
25
|
+
<img src="./assets/readme/welcome.webp" width="100%" alt="Pi 启动后的欢迎界面">
|
|
56
26
|
</table>
|
|
57
27
|
|
|
28
|
+
https://github.com/user-attachments/assets/4ae094d2-7480-484b-a0c8-6e782495ce9f
|
|
29
|
+
|
|
58
30
|
## 快速开始
|
|
59
31
|
|
|
60
32
|
```bash
|
|
@@ -68,14 +40,13 @@ pi install git:github.com/minuque/pi-cc-extensions
|
|
|
68
40
|
|
|
69
41
|
## 功能
|
|
70
42
|
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| 主题 | 随包提供内置 GitHub Dark Default 主题 | `/theme` |
|
|
43
|
+
| 功能 | 说明 | 入口 |
|
|
44
|
+
| -------------------- | ------------------------------------------------------------------------------------- | ------------- |
|
|
45
|
+
| Claude Code 风格输出 | 工具摘要、折叠展开、rich edit/write diff,以及`on` / `off` / `compact` 三种模式 | `/ccstyle` |
|
|
46
|
+
| Fixed editor 交互 | 基于`@tifan/pi-fixed-editor`,支持动态开关、每刻度 5 行滚动、工具点击与回到底部 | `/ccstyle` |
|
|
47
|
+
| 上下文检查 | 查看上下文占用,并预览 System prompt、Tools、Skills 和消息内容 | `/context` |
|
|
48
|
+
| Session 引用 | 搜索并注入历史 Session 或现有 SubAgent 的有效上下文 | `@session:` |
|
|
49
|
+
| 主题 | 随包提供内置 GitHub Dark Default 主题 | `/theme` |
|
|
79
50
|
|
|
80
51
|
## 本地开发
|
|
81
52
|
|
|
@@ -95,14 +66,12 @@ pi -e .
|
|
|
95
66
|
|
|
96
67
|
## 推荐搭配
|
|
97
68
|
|
|
98
|
-
|
|
99
|
-
|
|
|
100
|
-
| ------------------------------- | ------------------------------------- |
|
|
69
|
+
| 扩展 | 用途 |
|
|
70
|
+
| ------------------------------- | ----------------------------------- |
|
|
101
71
|
| `npm:@tintinweb/pi-subagents` | 并行 SubAgent、后台任务与工作树隔离 |
|
|
102
72
|
| `npm:pi-mcp-adapter` | 按需发现 MCP 工具,减少上下文占用 |
|
|
103
73
|
| `npm:pi-theme-picker` | 主题搜索和实时预览 |
|
|
104
74
|
| `npm:@ayulab/pi-rewind` | 基于 checkpoint 回退代码或对话 |
|
|
105
|
-
| `npm:pi-compact-thinking` | 紧凑显示隐藏的 thinking 块 |
|
|
106
75
|
|
|
107
76
|
## 致谢
|
|
108
77
|
|
|
@@ -75,7 +75,7 @@ const DIFF_COLLAPSED_LINES_VALUES = ["12", "24", "36", "48", "80", "120"];
|
|
|
75
75
|
/** Presets for expanded body height — keep low options first so cycling stays TUI-friendly. */
|
|
76
76
|
const EXPANDED_PREVIEW_MAX_LINES_VALUES = ["40", "60", "80", "120", "200", "500", "2000"];
|
|
77
77
|
const THINKING_PREVIEW_LINES_VALUES = ["0", "1", "3", "5", "10"];
|
|
78
|
-
const THINKING_ANIMATION_INTERVAL_VALUES = ["
|
|
78
|
+
const THINKING_ANIMATION_INTERVAL_VALUES = ["40", "60", "90", "120", "180"];
|
|
79
79
|
/** Tools commonly toggled in excludeRenderers via the settings panel. */
|
|
80
80
|
const EXCLUDE_RENDERER_CANDIDATES = [
|
|
81
81
|
"bash",
|
|
@@ -917,7 +917,16 @@ function patchAssistantMessageComponent(
|
|
|
917
917
|
return patch.nativeUpdateContent.call(this, message);
|
|
918
918
|
}
|
|
919
919
|
if (!patch.active || !installation.active || state.activeInstallation !== installation) {
|
|
920
|
-
|
|
920
|
+
// A downstream renderer may have captured this wrapper, then been
|
|
921
|
+
// restored after compact teardown. Mark the pass-through re-entry so
|
|
922
|
+
// that downstream -> stale compact -> downstream cycles bottom out at
|
|
923
|
+
// Pi's native renderer instead of overflowing the stack.
|
|
924
|
+
this[ASSISTANT_REENTRY_KEY] = patch;
|
|
925
|
+
try {
|
|
926
|
+
return patch.originalUpdateContent.call(this, message);
|
|
927
|
+
} finally {
|
|
928
|
+
delete this[ASSISTANT_REENTRY_KEY];
|
|
929
|
+
}
|
|
921
930
|
}
|
|
922
931
|
|
|
923
932
|
state.assistantComponents.add(this);
|
|
@@ -2,10 +2,8 @@ import * as piAi from "@earendil-works/pi-ai";
|
|
|
2
2
|
import * as piCodingAgent from "@earendil-works/pi-coding-agent";
|
|
3
3
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
4
4
|
import * as piTui from "@earendil-works/pi-tui";
|
|
5
|
-
import {
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
|
-
import { homedir } from "node:os";
|
|
8
|
-
import { join } from "node:path";
|
|
9
7
|
import { createJiti } from "jiti";
|
|
10
8
|
|
|
11
9
|
export type CompactThinkingConfig = {
|
|
@@ -141,15 +139,6 @@ export function installCompactThinking(
|
|
|
141
139
|
[COMPACT_THINKING_OWNER]?: CompactThinkingOwner;
|
|
142
140
|
};
|
|
143
141
|
|
|
144
|
-
const agentDir = process.env.PI_CODING_AGENT_DIR ?? join(homedir(), ".pi", "agent");
|
|
145
|
-
// Upstream requires this file while loading; mirror ccstyle into it and never read it back.
|
|
146
|
-
mkdirSync(agentDir, { recursive: true });
|
|
147
|
-
writeFileSync(
|
|
148
|
-
join(agentDir, "compact-thinking.json"),
|
|
149
|
-
`${JSON.stringify(initialConfig, null, 2)}\n`,
|
|
150
|
-
"utf8",
|
|
151
|
-
);
|
|
152
|
-
|
|
153
142
|
let upstreamConfig: CompactThinkingConfig | undefined;
|
|
154
143
|
let session: { event: any; ctx: any } | undefined;
|
|
155
144
|
let active = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-cc-extensions",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.41",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"description": "A Pi productivity suite with Claude Code-style UI, fixed editor, context inspection, and agent/session references",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"keywords": [
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|