pi-cc-extensions 0.8.46 → 0.8.48

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 CHANGED
@@ -10,7 +10,7 @@
10
10
  </p>
11
11
 
12
12
  <p align="center">
13
- Claude Code-style output, a fixed editor, context inspection, and Agent / Session references.
13
+ Claude Code-style output, context inspection, and Agent / Session references.
14
14
  </p>
15
15
 
16
16
  <p align="center">
@@ -34,7 +34,7 @@ pi install npm:pi-cc-extensions
34
34
  Run `/reload` after installation, then try:
35
35
 
36
36
  ```text
37
- /ccstyle # Configure output and fixed-editor interaction
37
+ /ccstyle # Configure output and rich diffs
38
38
  /context # Inspect context usage
39
39
  @ # Complete Agents, Sessions, and files
40
40
  ```
@@ -42,45 +42,34 @@ Run `/reload` after installation, then try:
42
42
  ## Features
43
43
 
44
44
 
45
- | Feature | Description | Entry point |
46
- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------- |
47
- | Claude Code-style output | Tool summaries, expand/collapse, rich edit/write diffs, and`on` / `off` / `compact` modes | `/ccstyle` |
48
- | Fixed-editor interaction | Powered by`@tifan/pi-fixed-editor`, with runtime toggling, five-row wheel scrolling, tool clicks, and back-to-bottom control | `/ccstyle` |
49
- | Context inspection | Usage breakdown and previews for the system prompt, tools, skills, and messages | `/context` |
50
- | Session references | Search and inject effective context from previous Sessions or existing SubAgents | `@session:` |
51
- | Theme | Bundled GitHub Dark Default and CC Dark themes | `/theme` |
45
+ | Feature | Description | Entry point |
46
+ | ------------------------------ | ------------------------------------------------------------------------------------- | ------------- |
47
+ | Claude Code-style output | Tool summaries, expand/collapse, rich edit/write diffs, and`on` / `off` modes | `/ccstyle` |
48
+ | Fullscreen mouse interaction | Tool card/group click-to-toggle,`[show more]` previews, and a back-to-bottom button | `/ccstyle` |
49
+ | Context inspection | Usage breakdown and previews for the system prompt, tools, skills, and messages | `/context` |
50
+ | Session references | Search and inject effective context from previous Sessions or existing SubAgents | `@session:` |
51
+ | Theme | Bundled CC Dark and CC Light themes | `/theme` |
52
52
 
53
- ### Output modes
53
+ ## Configuration
54
54
 
55
-
56
- | Mode | Behavior |
57
- | ----------- | ----------------------------------------------------------------------- |
58
- | `on` | Claude Code-style tool output with rich diffs for`edit` and `write` |
59
- | `off` | Native Pi renderers |
60
- | `compact` | One-line previews, merged repeated calls, duration, and run summaries |
61
-
62
- ```text
63
- /ccstyle on
64
- /ccstyle off
65
- /ccstyle compact
66
- /ccstyle status
67
- ```
68
-
69
- Configuration is stored in `~/.pi/agent/claude-code-style.json`:
55
+ `/ccstyle` behavior is configured through `~/.pi/agent/claude-code-style.json`:
70
56
 
71
57
  ```json
72
58
  {
73
- "mode": "on",
74
- "excludeRenderers": [],
75
- "fixedEditorFeatures": true
59
+ "mode": "on", // on: Claude Code-style output; off: Pi native rendering
60
+ "excludeRenderers": [], // exact tool names that keep their native renderer; Agent always keeps its dedicated renderer
61
+ "diffViewMode": "auto", // diff layout: auto / split / unified
62
+ "diffIndicatorMode": "bars", // diff change indicators: bars / classic / none
63
+ "diffSplitMinWidth": 120, // min terminal width before auto layout uses side-by-side columns
64
+ "diffCollapsedLines": 24, // diff body lines shown when collapsed; beyond that shows the expand hint (Ctrl+O / click)
65
+ "diffWordWrap": true, // whether long diff lines wrap (otherwise truncated)
66
+ "expandedPreviewMaxLines": 40, // max body lines for expanded output/diff
67
+ "useSummaryTitlesAsThinkingTitle": true, // use the latest provider summary as the active thinking title
68
+ "previewLines": 3, // thinking preview lines; 0 hides the preview body
69
+ "animationIntervalMs": 90 // thinking title animation interval in ms
76
70
  }
77
71
  ```
78
72
 
79
- - `excludeRenderers` uses exact tool names. `Agent` always keeps its dedicated renderer.
80
- - `fixedEditorFeatures: true` enables `@tifan/pi-fixed-editor` plus mouse scrolling, clicks, viewport mapping, and the back-to-bottom indicator.
81
- - Set it to `false`, or toggle **Fixed editor** in `/ccstyle`, to restore Pi's native scrolling editor immediately. `Ctrl+End` remains available.
82
- - Run `/reload` after editing the file manually.
83
-
84
73
  ### `@` references
85
74
 
86
75
  - Enter `@session:` to reference a previous Session.
@@ -110,18 +99,10 @@ Run `/reload` after changing extensions.
110
99
 
111
100
  ## Compatibility
112
101
 
113
- - Node.js `>=22.19.0`
114
- - Pi `^0.84.0` (loaded through `pi.extensions` and `pi.themes` in the root `package.json`)
115
- - For Pi 0.80.x and earlier, use an older release of this package (peerDependencies are now `^0.84.0`)
116
- - If a Pi, TUI, or `@tifan/pi-fixed-editor` update causes display issues, try `/reload` first
117
-
118
- ### Fullscreen mode & sunset features
119
-
120
- - Official `--tui-mode fullscreen` (and runtime switching via `/settings`) is reused as-is: when `tui.mode === "fullscreen"`, the extension stands down and installs no rendering layer (tool styling, compact mode, tool grouping, and the fixed editor are all skipped), leaving fullscreen entirely to the official TUI. Data features (context, session references, autocomplete, etc.) are unaffected.
121
- - Capabilities that overlap with the official fullscreen TUI are sunset (frozen, kept working only): fixed-editor layout, independently scrollable transcript, etc. — no second implementation.
122
- - Known boundary: when switching from regular to fullscreen at runtime, per-TUI rendering patches are automatically abandoned with the old TUI instance, but component-level style patches remain active (they do not affect the official layout); for full isolation, start the session in fullscreen mode.
123
- - Pi 0.84+ wraps the TUI reference in a lazy Proxy (`createInteractiveTuiReference`): capturing `doRender`/`render`/`handleInput` through it resolves to the wrapper itself and recurses infinitely. The extension detects the lazy Proxy and skips line-level rendering patches; `@tifan/pi-fixed-editor`'s compositor is likewise disabled on 0.84+ (Fixed editor interactions are temporarily unavailable; rendering is handled by the official pipeline).
124
- - The `compact-thinking.json` config file is sunset (no longer read or maintained); compact-thinking settings are managed exclusively by `claude-code-style.json`.
102
+ - Node.js `>=22.19.0`, Pi `^0.84.0` (loaded through `pi.extensions` and `pi.themes` in the root `package.json`)
103
+ - Fixed-editor features have been smoothly migrated to the official pipeline: in TUI fullscreen mode, all `/ccstyle` mouse interactions work as usual.
104
+ - Need the removed fixed-editor layout or `compact` one-line summary mode? Use version `0.8.46` or earlier
105
+ - Removed: the fixed-editor layout and the `compact` one-line summary mode (a new compact mode is planned for a future release). Old configs with `"mode": "compact"` automatically fall back to `on`, and the `/ccstyle` panel only offers `on` / `off`.
125
106
 
126
107
  ## Recommended companions
127
108
 
@@ -139,8 +120,6 @@ Run `/reload` after changing extensions.
139
120
 
140
121
  ## Credits
141
122
 
142
- - Compact transcript behavior is based on [`avhagedorn/pi-compact-transcript`](https://github.com/avhagedorn/pi-compact-transcript) v0.6.2 (MIT).
143
- - Fixed-editor behavior is provided by [`@tifan/pi-fixed-editor`](https://github.com/tifandotme/pi-extensions/tree/master/packages/pi-fixed-editor) (MIT).
144
123
  - 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).
145
124
  - Startup header based on [`EnderLiquid/pi-startup-header`](https://github.com/EnderLiquid/pi-startup-header) (MIT).
146
125
  - Command aliases based on [`xRyul/pi-aliases`](https://github.com/xRyul/pi-aliases) (MIT).
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  </p>
11
11
 
12
12
  <p align="center">
13
- 类 Claude Code TUI输出风格、固定编辑器、上下文检查,以及 Agent / Session 引用。
13
+ 类 Claude Code TUI 输出风格、上下文检查,以及 Agent / Session 引用。
14
14
  </p>
15
15
 
16
16
  <p align="center">
@@ -39,13 +39,33 @@ pi install git:github.com/minuque/pi-cc-extensions
39
39
  ## 功能
40
40
 
41
41
 
42
- | 功能 | 说明 | 入口 |
43
- | ---------------------- | --------------------------------------------------------------------------------- | ------------- |
44
- | Claude Code 风格输出 | 工具摘要、折叠展开、rich edit/write diff,以及`on` / `off` / `compact` 三种模式 | `/ccstyle` |
45
- | Fixed editor 交互 | 基于`@tifan/pi-fixed-editor`,支持动态开关、每刻度 5 行滚动、工具点击与回到底部 | `/ccstyle` |
46
- | 上下文检查 | 查看上下文占用,并预览 System prompt、Tools、Skills 和消息内容 | `/context` |
47
- | Session 引用 | 搜索并注入历史 Session 或现有 SubAgent 的有效上下文 | `@session:` |
48
- | 主题 | 随包提供内置 GitHub Dark Default、CC Dark 主题 | `/theme` |
42
+ | 功能 | 说明 | 入口 |
43
+ | ---------------------- | --------------------------------------------------------------------- | ------------- |
44
+ | Claude Code 风格输出 | 工具摘要、折叠展开、rich edit/write diff,以及`on` / `off` 两种模式 | `/ccstyle` |
45
+ | Fullscreen 鼠标交互 | 工具卡/group 点击展开与收起、`[show more]` 预览、回到底部按钮 | `/ccstyle` |
46
+ | 上下文检查 | 查看上下文占用,并预览 System prompt、Tools、Skills 和消息内容 | `/context` |
47
+ | Session 引用 | 搜索并注入历史 Session 或现有 SubAgent 的有效上下文 | `@session:` |
48
+ | 主题 | 随包提供内置 CC Dark、CC Light 主题 | `/theme` |
49
+
50
+ ## 配置
51
+
52
+ `/ccstyle` 的行为由 `~/.pi/agent/claude-code-style.json` 配置:
53
+
54
+ ```json
55
+ {
56
+ "mode": "on", // on:Claude Code 风格输出;off:Pi 原生渲染
57
+ "excludeRenderers": [], // 走原生渲染的工具名列表(精确匹配),Agent 始终保留专用渲染器
58
+ "diffViewMode": "auto", // diff 布局:auto / split / unified
59
+ "diffIndicatorMode": "bars", // diff 变更指示:bars / classic / none
60
+ "diffSplitMinWidth": 120, // 自动布局下使用左右分栏的最小终端宽度
61
+ "diffCollapsedLines": 24, // 折叠时展示的 diff 行数,超出显示展开提示(Ctrl+O / 点击)
62
+ "diffWordWrap": true, // 长 diff 行是否换行(否则截断)
63
+ "expandedPreviewMaxLines": 40, // 展开后输出/diff 正文的最大行数
64
+ "useSummaryTitlesAsThinkingTitle": true, // 用最新 provider 摘要作为思考标题
65
+ "previewLines": 3, // thinking 预览行数,0 隐藏预览正文
66
+ "animationIntervalMs": 90 // thinking 标题动画间隔(毫秒)
67
+ }
68
+ ```
49
69
 
50
70
  ## 本地开发
51
71
 
@@ -59,18 +79,10 @@ pi -e .
59
79
 
60
80
  ## 兼容性
61
81
 
62
- - Node.js `>=22.19.0`
63
- - Pi `^0.84.0`(通过根目录 `package.json` 的 `pi.extensions` 和 `pi.themes` 加载)
64
- - 0.80.x 及更早版本请使用本包的旧版本(peerDependencies 已收紧为 `^0.84.0`)
65
- - `@tifan/pi-fixed-editor`、Pi 或 TUI 内部实现升级后若显示异常,先执行 `/reload`
66
-
67
- ### Fullscreen 模式与日落功能
68
-
69
- - 官方 `--tui-mode fullscreen`(及 `/settings` 运行时切换)复用官方布局:插件在 `tui.mode === "fullscreen"` 时自动让位,不安装任何渲染层(工具样式、紧凑模式、工具分组、固定编辑器均跳过),fullscreen 完全由官方 TUI 提供。数据类功能(context、session 引用、自动补全等)不受影响。
70
- - 与官方 fullscreen 重叠的能力已日落(冻结开发、仅维持可用):固定编辑器布局、独立滚动 transcript 等不再二次实现。
71
- - 已知边界:运行时从 regular 切换到 fullscreen 时,插件行级渲染 patch 随旧 TUI 实例自动失效,但组件级样式 patch 仍生效(不影响官方布局);如需完全隔离,建议以 fullscreen 模式启动会话。
72
- - Pi 0.84+ 的 TUI 引用是惰性 Proxy(`createInteractiveTuiReference`),通过它捕获 `doRender`/`render`/`handleInput` 会解析到包装自身形成无限递归。插件检测到惰性 Proxy 后跳过行级渲染 patch;`@tifan/pi-fixed-editor` 的 compositor 因同样原因在 0.84+ 下停用(Fixed editor 交互功能暂时不可用,渲染由官方管线接管)。
73
- - `compact-thinking.json` 配置文件已日落(不再读取、不再兼容),compact-thinking 的配置统一由 `claude-code-style.json` 管控。
82
+ - Node.js `>=22.19.0`,Pi `^0.84.0`(通过根目录 `package.json` 的 `pi.extensions` 和 `pi.themes` 加载)
83
+ - fixed-editor相关功能已平滑迁移至官方管线:TUI mode=fullscreen 模式下 `/ccstyle` 全部鼠标交互功能类照常可用。
84
+ - 需要已移除的 fixed-editor 布局或 `compact` 单行摘要模式?请使用 `0.8.46` 及更早版本
85
+ - 已移除:固定编辑器布局与 `compact` 单行摘要模式(后续会有新版本 compact mode 发布)。旧配置 `mode: "compact"` 自动回退 `on`,`/ccstyle` 面板仅有 `on` / `off`。
74
86
 
75
87
  ## 推荐搭配
76
88
 
@@ -88,8 +100,6 @@ pi -e .
88
100
 
89
101
  ## 致谢
90
102
 
91
- - Compact transcript 基于 [`avhagedorn/pi-compact-transcript`](https://github.com/avhagedorn/pi-compact-transcript) v0.6.2(MIT)。
92
- - Fixed editor 由 [`@tifan/pi-fixed-editor`](https://github.com/tifandotme/pi-extensions/tree/master/packages/pi-fixed-editor) 提供(MIT)。
93
103
  - Rich diff 改编自 [`MasuRii/pi-tool-display`](https://github.com/MasuRii/pi-tool-display)(MIT);详见 [`extensions/tool-diff/ATTRIBUTION.md`](./extensions/tool-diff/ATTRIBUTION.md)。
94
104
  - 启动头基于 [`EnderLiquid/pi-startup-header`](https://github.com/EnderLiquid/pi-startup-header)(MIT)。
95
105
  - 命令别名基于 [`xRyul/pi-aliases`](https://github.com/xRyul/pi-aliases)(MIT)。