@herbertgao/pi-extensions 2026.11.14 → 2026.11.16
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/CHANGELOG.md +23 -0
- package/README.md +7 -7
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +5 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +9 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/index.ts +32 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/markdown-enhance.ts +26 -21
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/table-copy.ts +753 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/fullscreen-detect.ts +11 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
- package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +5 -5
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.md +8 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.native.md +8 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/craft-floor.md +3 -3
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique.md +8 -6
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/finish-reviewer.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/doctor.md +5 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/init.md +2 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work.md +8 -9
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/polish.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +55 -32
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +18 -16
- package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +1 -1
- package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +18 -5
- package/node_modules/@herbertgao/pi-subagents/src/agent-types.ts +88 -0
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +16 -92
- package/node_modules/@herbertgao/pi-subagents/src/mention-clone.ts +6 -2
- package/node_modules/@herbertgao/pi-subagents/src/nested-tools.ts +18 -2
- package/node_modules/@herbertgao/pi-subagents/src/prompts.ts +25 -3
- package/node_modules/pi-commandcode-provider/CHANGELOG.md +20 -0
- package/node_modules/pi-commandcode-provider/README.md +1 -1
- package/node_modules/pi-commandcode-provider/index.ts +2 -1
- package/node_modules/pi-commandcode-provider/package.json +1 -1
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +9 -2
- package/node_modules/pi-commandcode-provider/src/pricing.ts +5 -1
- package/node_modules/pi-commandcode-provider/src/responses-compat.ts +24 -1
- package/node_modules/pi-commandcode-provider/src/responses-stream.ts +99 -6
- package/node_modules/pi-provider-qoder/dist/index.js +50 -10
- package/node_modules/pi-provider-qoder/package.json +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @herbertgao/pi-extensions
|
|
2
2
|
|
|
3
|
+
## 2026.11.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#395](https://github.com/HerbertGao/pi-extensions/pull/395) [`43a108a`](https://github.com/HerbertGao/pi-extensions/commit/43a108ac173ed4d6fc137433a958ef43c1a64812) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Pin pi-provider-qoder 0.6.13. A plan-disabled catalog model stays listed so a configured model still resolves, and auto stays hidden unless the server enables it. After login the provider refreshes that catalog, waiting at most 15 seconds, instead of keeping the static fallback until restart.
|
|
8
|
+
|
|
9
|
+
- [#395](https://github.com/HerbertGao/pi-extensions/pull/395) [`43a108a`](https://github.com/HerbertGao/pi-extensions/commit/43a108ac173ed4d6fc137433a958ef43c1a64812) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Resolve @narumitw/pi-tui-kit 0.70.1 under the existing ^0.70.0 range. A questionnaire summary names the selected option.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`43a108a`](https://github.com/HerbertGao/pi-extensions/commit/43a108ac173ed4d6fc137433a958ef43c1a64812)]:
|
|
12
|
+
- @herbertgao/pi-impeccable@0.6.0
|
|
13
|
+
|
|
14
|
+
## 2026.11.15
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#392](https://github.com/HerbertGao/pi-extensions/pull/392) [`e233ef6`](https://github.com/HerbertGao/pi-extensions/commit/e233ef6cee8184ff322521eae67bfa2b57bf483d) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Pin pi-commandcode-provider 0.8.6. The capability snapshot is command-code@1.89.2, with reviewed prices for Qwen4 Max, Hy4 Flash, and Flint. GLM-5.3 thinking that arrives only as plaintext encrypted_content is shown; other models keep that field hidden.
|
|
19
|
+
|
|
20
|
+
- [#392](https://github.com/HerbertGao/pi-extensions/pull/392) [`e233ef6`](https://github.com/HerbertGao/pi-extensions/commit/e233ef6cee8184ff322521eae67bfa2b57bf483d) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Pin graphifyy 0.9.112. The CLI stays outside the npm aggregate. Warm AST caches rebuild. Python stays on >=3.11,<3.15. The Pi skill path is unchanged.
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`e233ef6`](https://github.com/HerbertGao/pi-extensions/commit/e233ef6cee8184ff322521eae67bfa2b57bf483d), [`e233ef6`](https://github.com/HerbertGao/pi-extensions/commit/e233ef6cee8184ff322521eae67bfa2b57bf483d)]:
|
|
23
|
+
- @herbertgao/pi-cc-extensions@1.0.20
|
|
24
|
+
- @herbertgao/pi-subagents@0.26.0
|
|
25
|
+
|
|
3
26
|
## 2026.11.14
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ The package bundles 7 active `@herbertgao/*` child packages—`pi-agency`, `pi-b
|
|
|
22
22
|
|
|
23
23
|
- `pi-antigravity@0.14.0`
|
|
24
24
|
- `pi-commandcode-provider@0.8.4`
|
|
25
|
-
- `pi-provider-qoder@0.6.
|
|
25
|
+
- `pi-provider-qoder@0.6.13`
|
|
26
26
|
- `@dietrichgebert/ponytail@5.3.3`
|
|
27
27
|
- `@juicesharp/rpiv-ask-user-question@2.15.0`
|
|
28
28
|
- `@narumitw/pi-btw@0.63.8`
|
|
@@ -41,13 +41,13 @@ The package bundles 7 active `@herbertgao/*` child packages—`pi-agency`, `pi-b
|
|
|
41
41
|
|
|
42
42
|
Pi loads their extensions and skills through `node_modules/` paths inside one package root. The upstream companions are pinned and bundled, not forked or renamed.
|
|
43
43
|
|
|
44
|
-
The locally customized CC package follows upstream `pi-cc-extensions@1.0.
|
|
44
|
+
The locally customized CC package follows upstream `pi-cc-extensions@1.0.21`; SoL-Pi follows its complete main baseline `e1a586af` with Pi 1.x/codemode compatibility updates through `21956803`. Local behavior not already covered upstream is retained. SoL-Pi's `update_plan` now follows upstream's model-only contract: invoke it directly, not inside codemode scripts. Action Fusion and ccstyle write rich diffs coexist without disabling either feature. All four SoL-Pi features remain opt-in; its new non-persistent-session evidence archives remain on disk for consumers and require host or caller cleanup.
|
|
45
45
|
|
|
46
46
|
Antigravity `0.14.0` enriches search citations by visiting source sites by default (`ANTIGRAVITY_NO_SOURCE_ENRICH=1` disables enrichment). `ANTIGRAVITY_DEFER_TOOLS=1` registers `google_search`, `read_url_content`, and `generate_image` as deferred tools; the default stays direct. A refreshed catalog does not restore a model the current catalog omitted, and an image save rejects a symlink destination. A private or credentialed fetch URL is rejected before a request, and `ANTIGRAVITY_NO_FETCH_TOOL=1` skips `read_url_content`. The User-Agent is `antigravity/cli/1.5.5`. It refreshes a curated model catalog and upgrades the existing model cache; previously listed model IDs may disappear. Ask `2.15.0` lets other extensions in the same process answer or cancel TUI questionnaires through its event channel, without sender authentication. Its notes shortcut defaults to `n` and can be a single non-Latin character; reserved navigation keys stay on `n`. Web Access `0.45.0` keeps direct tool exposure and `toolActivation: auto` by default. Linkup, DeepSeek search and fetch, provider gateways, `toolActivation: "none"`, deferred exposure, GCE ADC, field extraction, 9router, and plain HTTP gateway URLs require explicit configuration. Web Access `0.48.0` adds SpecStream, Autom, and cloro as explicit-only search providers. A search timeout is a network failure, so a route that falls back on network continues. DuckDuckGo searches in one process start at least 10 seconds apart, at most 10 in any 10 minutes, and a slot more than 20 seconds away fails at once. Web Access `0.47.0` adds Sofya and Outcrawl as explicit-only search providers. `lockProxy: true` rejects a tool-call proxy that differs from the configured proxy, including a direct connection. A GitHub repository README is returned up to 100K characters, and a clone with no `githubClone.clonePath` goes under the OS temp directory.
|
|
47
47
|
|
|
48
48
|
Ponytail `5.3.2` updates the Pi skill guidance, including how to turn it off. Its Pi extension entry is unchanged; the new Claude Code band/board hooks are not registered by this aggregate.
|
|
49
49
|
|
|
50
|
-
Impeccable `4.
|
|
50
|
+
Impeccable `4.10.0` is vendored as `@herbertgao/pi-impeccable` and loaded with `/skill:impeccable`. Its native engine downloads to `~/.impeccable` on first use after SHA-256 verification; set `IMPECCABLE_BIN` for offline or preinstalled setups. The launcher pins engine 0.1.27 and skips a sibling engine binary that reports a different version. A GitHub HTTP 5xx during that download says the outage is on GitHub's side. Context loads a long DESIGN.md as a map, and the first launcher failure is not retried. `/impeccable foundations` walks a product-foundations checklist. A critique's design-review rubric is `reference/critique-rubric.md`, and a new surface reads `reference/new-work-world.md` or `reference/new-work-comp.md` when that part applies. Go leaves a staged removal in the page so Undo and Discard can restore it. A user exit stays down for a minute and clears the live init flag, so a later inject on the same page can start Live. The missing-PRODUCT.md notice shows once, and hovering the live bar no longer widens it. The package does not install automatic post-edit hooks, and upstream `pin`/`unpin` do not discover npm-loaded skills.
|
|
51
51
|
|
|
52
52
|
### Agency Agents
|
|
53
53
|
|
|
@@ -59,13 +59,13 @@ Impeccable `4.9.2` is vendored as `@herbertgao/pi-impeccable` and loaded with `/
|
|
|
59
59
|
|
|
60
60
|
`@herbertgao/pi-inline-skill-commands` completes and expands Pi's native `/skill:<name>` commands inside a larger prompt. At token boundaries the dropdown lists only skills and completion keeps the surrounding text. Submission renders the same collapsed skill block a start-of-prompt command produces and keeps your sentence, command included, beneath it. Commands at the start of the prompt stay native, ordinary commands such as `/model` remain start-only, and no `/<name>` aliases are added, so skill entries are not duplicated. It uses `CustomEditor`'s private autocomplete trigger to fire on `/`; see the [package README](../pi-inline-skill-commands/README.md).
|
|
61
61
|
|
|
62
|
-
`@narumitw/pi-caffeinate@0.49.15` uses the host platform's sleep inhibitor during each Pi agent run. On macOS, `/caffeinate sleep` keeps the system awake while allowing the display to sleep; `/caffeinate display` also keeps the display awake. It releases the inhibitor when the run or session ends. Its D-Bus dependency remains on the normal socket transport under Node; Bun on Linux/macOS can use FFI and an in-process reader thread for Unix file-descriptor transport, and that thread can be unreferenced so the connection need not keep the process alive. It falls back when FFI is unavailable. No daemon or build step is added. The published extension source is unchanged from 0.49.13 aside from the manifest. It declares `@narumitw/pi-tui-kit@^0.70.0` and `dbus-native@^0.16.3`. BTW `0.63.8` requires the same kit range, so the aggregate resolves one `0.70.
|
|
62
|
+
`@narumitw/pi-caffeinate@0.49.15` uses the host platform's sleep inhibitor during each Pi agent run. On macOS, `/caffeinate sleep` keeps the system awake while allowing the display to sleep; `/caffeinate display` also keeps the display awake. It releases the inhibitor when the run or session ends. Its D-Bus dependency remains on the normal socket transport under Node; Bun on Linux/macOS can use FFI and an in-process reader thread for Unix file-descriptor transport, and that thread can be unreferenced so the connection need not keep the process alive. It falls back when FFI is unavailable. No daemon or build step is added. The published extension source is unchanged from 0.49.13 aside from the manifest. It declares `@narumitw/pi-tui-kit@^0.70.0` and `dbus-native@^0.16.3`. BTW `0.63.8` requires the same kit range, so the aggregate resolves one `0.70.1` install for both. A questionnaire summary names the selected option.
|
|
63
63
|
|
|
64
64
|
`@narumitw/pi-btw@0.63.8` opens its side workspace through the `@narumitw/pi-tui-kit@^0.70.0` fullscreen handoff. Published `src` and `dist` are unchanged from 0.63.7 aside from the manifest and changelog. Fullscreen, menu, and transcript modules load on first use. An already ended session does not open that UI. The loaded flow still stops when the dedicated UI is disposed or the parent terminal cannot be restored. Only one BTW flow can be open per session; a second `/btw` warns and stays closed. In split layout, mounting the first split releases Pi's idle wait so the main input stays usable. Importing new main-thread context stays manual. The main-thread tree picker walks an arbitrarily deep session on the heap, keeps raw copy text as fragments until a copy, and stores a saved label only when the entry has one. Settings rows keep a clipped label or value in full under the list, and a searchable model choice shows how many results match. A searchable choice keeps page scrolling; the host still owns search activation. The promoted kit can name an editor-status widget and collapse it to that divider; BTW does not mount that widget.
|
|
65
65
|
|
|
66
66
|
`clef` asks Cloudflare Clef-flash an on-demand yes/no, choice, or score and prints the questions and answers in the transcript, plus a one-line notice. It is not a permission gate. `pi-typesafe@0.14.0` provides `/typesafe` and `typesafe_evaluate` for explicit structured decisions; `/typesafe enable` or `PI_TYPESAFE_ENABLED=1` is still required for agent tool calls. The default backend remains `https://api.typesafe.ai`. `PI_TYPESAFE_BACKEND` and `PI_TYPESAFE_MODEL` select the session backend and model, and `/typesafe login` stores a key for the named backend. Only HTTP 401 refuses that key, and only for 15 minutes; a 403 refuses one request and leaves the key usable. Nace.AI (`https://console.nace.ai`, `NACE_API_KEY`, default model `drex-v2.0`) is a judgment backend. Daily request, token, and USD caps are opt-in. OpenRouter, Command Code, Liquid, SubQ, Nace.AI, and a named endpoint stay explicit and use that backend's own key. The promoted SDK is `@typesafe-ai/sdk@0.7.0`. Under Bun, the judge transport reads each response body once and replays it, so the SDK can still read the result after Bun marks the original body used.
|
|
67
67
|
|
|
68
|
-
`@herbertgao/sol-pi` adds opt-in Action Fusion, ObservationPack, Evidence-Preserving Reducer, and Online Context Compact; see its [configuration guide](../sol-pi/docs/configuration.md). `pi-lens@4.5.1` publishes a public LSP config schema, reads user-level custom rule directories (project before user before built-in), normalizes argv-style server entries, downgrades `throw-new-error` to a warning, and counts Docker, JSON, and Jedi servers in idle eviction; language routing and the retained multi-root diagnostic facts are unchanged. `.mts` and `.cts` use the TypeScript rules. Groovy files still classify as Groovy, and the vendored Groovy grammar lists classes and methods. `--no-read-expansion` turns off read widening without disabling the read-before-edit guard. It promotes `@ast-grep/cli` to `0.51.1` and `@ast-grep/napi` to `^0.51.0`. A blank `PI_LENS_*` number falls back to the default, and an explicit `0` is a value. An edit that raises a named function past the high-complexity threshold and past the default branch names that function on one line; a function the edit improved, or that is still no worse than the default branch, is not named. `ast_grep_replace` no longer requests strict JSON-schema sampling; `lens_diagnostic_mark` still does. A language server for a project outside the session folder starts only when Pi would trust that project. Four MCP tools advertise only `path`. A session rooted at `/` keeps `lsp.disabledServers`. Concatenated SQL passed to `.execute()` is an advisory full-analysis finding; a parameterized `execute(sql, values)` call stays quiet. Keeping injected findings in later requests is opt-in. A workspace edit through a dangling symlink is refused, and a symlink that resolves outside the workspace is refused; the fallback Biome config no longer names a nursery rule. An identity `filter(x => x).map(...)` stays a warning, and a non-identity `filter(fn).map(...)` is no longer flagged. An async array callback with a block body is not flagged for a missing return. A sync block callback that does not return still is. `--lens-issues-status` can show diagnostic counts in the footer and stays off unless set. Esc cancels a hung language-server request instead of leaving that server busy. A reduce that copies its accumulator with `Object.assign` is a warning. A directory whose name starts with `..` stays inside its project. `.groovy`, `.gvy`, `.gy`, `.gsh`, `Jenkinsfile`, `build.gradle`, and `settings.gradle` classify as Groovy; `build.gradle.kts` does not. `minimatch` is `^11.0.4` and `vscode-jsonrpc` is `^10.0.0`. `pi-web-access@0.48.0` provides configurable web search and fetch tools; its `toolActivation` defaults to `auto`, choosing eager or dynamic tool activation per model. `toolActivation: "none"` stays opt-in and still requires deferred exposure. Field extraction, 9router, empty or off-topic search fallback, and plain HTTP gateway URLs stay off unless configured. An unknown tool-call provider name fails instead of selecting a provider automatically, and DuckDuckGo searches stay spaced apart after a bot check. It adds structured search/fetch data for codemode and an optional, manually started `pi-web-access-mcp` stdio CLI; installing the aggregate does not start that server. Degoog, Keenable, Ceramic, Linkup, DeepSeek fetch, Cloudflare search, SearchApi, Outcrawl, Sofya, cloro, Autom, SpecStream, and Tabstack are explicit-only, excluded from automatic and `all` selection. DuckDuckGo searches in one process start at least 10 seconds apart and at most 10 in any 10 minutes. `lockProxy: true` rejects a tool-call proxy other than the configured one. A GitHub repository README is returned up to 100K characters, and a clone with no `githubClone.clonePath` goes under the OS temp directory. Optional `fetchContent.curl` and Exa/Tabstack fetch routing stay off unless configured. Provider gateway base URLs are opt-in and are not configured by the aggregate. OpenAI search now defaults to `gpt-6-luna`, results and clone cleanup are scoped per extension instance, and the promoted `@modelcontextprotocol/sdk@^1.32.1` moves the bundle off GHSA-6qxp-vccf-f47h. Perplexity search now uses the Search API's ranked pages and snippets rather than a Sonar-generated answer; requests requiring prose still use Sonar. `pi-antigravity@0.14.0` reads Pi 0.86+ transcript system messages, so Antigravity requests carry Pi's system prompt and tools; it also registers `google_search`, `read_url_content`, and `generate_image` tools that use the signed-in Antigravity account. Those tools stay direct unless `ANTIGRAVITY_DEFER_TOOLS=1`. `ANTIGRAVITY_NO_FETCH_TOOL=1` skips `read_url_content`. A private or credentialed fetch URL is rejected before a request. The User-Agent is `antigravity/cli/1.5.5`. A model removed by catalog refresh is not filled back in from the bootstrap list. Image saves reject symlink destinations. The aggregate keeps host `typebox` and `undici@^8.11.2`. `pi-provider-qoder@0.6.
|
|
68
|
+
`@herbertgao/sol-pi` adds opt-in Action Fusion, ObservationPack, Evidence-Preserving Reducer, and Online Context Compact; see its [configuration guide](../sol-pi/docs/configuration.md). `pi-lens@4.5.1` publishes a public LSP config schema, reads user-level custom rule directories (project before user before built-in), normalizes argv-style server entries, downgrades `throw-new-error` to a warning, and counts Docker, JSON, and Jedi servers in idle eviction; language routing and the retained multi-root diagnostic facts are unchanged. `.mts` and `.cts` use the TypeScript rules. Groovy files still classify as Groovy, and the vendored Groovy grammar lists classes and methods. `--no-read-expansion` turns off read widening without disabling the read-before-edit guard. It promotes `@ast-grep/cli` to `0.51.1` and `@ast-grep/napi` to `^0.51.0`. A blank `PI_LENS_*` number falls back to the default, and an explicit `0` is a value. An edit that raises a named function past the high-complexity threshold and past the default branch names that function on one line; a function the edit improved, or that is still no worse than the default branch, is not named. `ast_grep_replace` no longer requests strict JSON-schema sampling; `lens_diagnostic_mark` still does. A language server for a project outside the session folder starts only when Pi would trust that project. Four MCP tools advertise only `path`. A session rooted at `/` keeps `lsp.disabledServers`. Concatenated SQL passed to `.execute()` is an advisory full-analysis finding; a parameterized `execute(sql, values)` call stays quiet. Keeping injected findings in later requests is opt-in. A workspace edit through a dangling symlink is refused, and a symlink that resolves outside the workspace is refused; the fallback Biome config no longer names a nursery rule. An identity `filter(x => x).map(...)` stays a warning, and a non-identity `filter(fn).map(...)` is no longer flagged. An async array callback with a block body is not flagged for a missing return. A sync block callback that does not return still is. `--lens-issues-status` can show diagnostic counts in the footer and stays off unless set. Esc cancels a hung language-server request instead of leaving that server busy. A reduce that copies its accumulator with `Object.assign` is a warning. A directory whose name starts with `..` stays inside its project. `.groovy`, `.gvy`, `.gy`, `.gsh`, `Jenkinsfile`, `build.gradle`, and `settings.gradle` classify as Groovy; `build.gradle.kts` does not. `minimatch` is `^11.0.4` and `vscode-jsonrpc` is `^10.0.0`. `pi-web-access@0.48.0` provides configurable web search and fetch tools; its `toolActivation` defaults to `auto`, choosing eager or dynamic tool activation per model. `toolActivation: "none"` stays opt-in and still requires deferred exposure. Field extraction, 9router, empty or off-topic search fallback, and plain HTTP gateway URLs stay off unless configured. An unknown tool-call provider name fails instead of selecting a provider automatically, and DuckDuckGo searches stay spaced apart after a bot check. It adds structured search/fetch data for codemode and an optional, manually started `pi-web-access-mcp` stdio CLI; installing the aggregate does not start that server. Degoog, Keenable, Ceramic, Linkup, DeepSeek fetch, Cloudflare search, SearchApi, Outcrawl, Sofya, cloro, Autom, SpecStream, and Tabstack are explicit-only, excluded from automatic and `all` selection. DuckDuckGo searches in one process start at least 10 seconds apart and at most 10 in any 10 minutes. `lockProxy: true` rejects a tool-call proxy other than the configured one. A GitHub repository README is returned up to 100K characters, and a clone with no `githubClone.clonePath` goes under the OS temp directory. Optional `fetchContent.curl` and Exa/Tabstack fetch routing stay off unless configured. Provider gateway base URLs are opt-in and are not configured by the aggregate. OpenAI search now defaults to `gpt-6-luna`, results and clone cleanup are scoped per extension instance, and the promoted `@modelcontextprotocol/sdk@^1.32.1` moves the bundle off GHSA-6qxp-vccf-f47h. Perplexity search now uses the Search API's ranked pages and snippets rather than a Sonar-generated answer; requests requiring prose still use Sonar. `pi-antigravity@0.14.0` reads Pi 0.86+ transcript system messages, so Antigravity requests carry Pi's system prompt and tools; it also registers `google_search`, `read_url_content`, and `generate_image` tools that use the signed-in Antigravity account. Those tools stay direct unless `ANTIGRAVITY_DEFER_TOOLS=1`. `ANTIGRAVITY_NO_FETCH_TOOL=1` skips `read_url_content`. A private or credentialed fetch URL is rejected before a request. The User-Agent is `antigravity/cli/1.5.5`. A model removed by catalog refresh is not filled back in from the bootstrap list. Image saves reject symlink destinations. The aggregate keeps host `typebox` and `undici@^8.11.2`. `pi-provider-qoder@0.6.13` registers the `qoder` and `qoder-cn` model providers. A plan-disabled catalog model stays listed so a configured model still resolves, and auto stays hidden unless the server enables it. After login the provider refreshes that catalog, waiting at most 15 seconds, instead of keeping the static fallback until restart. A tool-call argument stream that is cut off before a usable call is reported as a retryable server error. Startup logs one line when the npm registry has a newer release; `PI_PROVIDER_QODER_SKIP_UPDATE_CHECK=1` skips that lookup. A queued model-busy response reports its wait instead of being ignored; a ready busy response stays retryable. A queued wait that does not fit in a safe millisecond count uses `retryAfterSeconds` instead. Agent chat prefers the account's remote-agent node and, on daily chat limit code 110, tries the next node. The chosen node is cached for one hour. Sign in with `/login qoder` (browser or a personal access token from [qoder.com/account/integrations](https://qoder.com/account/integrations)) or `/login qoder-cn` (token from [qoder.com.cn/account/integrations](https://qoder.com.cn/account/integrations)). `QODER_PERSONAL_ACCESS_TOKEN` and `QODERCN_PERSONAL_ACCESS_TOKEN` log those providers in at startup. `/qoder-usage footer on` replaces the status-bar footer for that session, so leave it off while the pi-cc footer is in use. `pi-commandcode-provider@0.8.6` registers `commandcode` beside `qoder`, `qoder-cn`, and `antigravity`. Inference uses the Provider API only. `/login` lists those subscription providers and runs only the one you select. `@tifan/pi-preferred-thinking` is no longer bundled. Per-model thinking levels come from Pi. Deprecated `@tifan/pi-titlebar-spinner` is no longer bundled; Rename remains the single owner of Herdr tab naming. `@tifan/pi-handoff` imports `@tifan/pi-rename/naming` when it generates a session name, so Rename stays installed and its `/rename` command stays registered.
|
|
69
69
|
|
|
70
70
|
`pi-stash` is no longer bundled: `/btw` already preserves the main editor draft while handling side questions outside the main conversation. Prior `@herbertgao/pi-stash` releases remain available but are no longer maintained here.
|
|
71
71
|
|
|
@@ -83,9 +83,9 @@ Pi stacks widgets by key. While tasks are visible, three other above-editor widg
|
|
|
83
83
|
|
|
84
84
|
### Command Code
|
|
85
85
|
|
|
86
|
-
`pi-commandcode-provider@0.8.
|
|
86
|
+
`pi-commandcode-provider@0.8.6` adds the `commandcode` model provider. It does not register its own `/login` command. Pi's `/login` lists it with the other subscription providers (`antigravity`, `qoder`, and `qoder-cn`). Choose **Use a subscription**, then **Command Code**. Press Enter for browser login, type `key` to paste an API key, or paste the key directly. `COMMAND_CODE_API_KEY` signs the provider in at startup. Existing keys in `~/.commandcode/auth.json` are also read. Credentials Pi stores for this provider live under the `commandcode` entry in the host auth file. The reader does not take `qoder` or `antigravity` credentials.
|
|
87
87
|
|
|
88
|
-
`/commandcode-quota` shows account usage. `/commandcode-refresh` reloads the model catalog, and `/commandcode-status` shows redacted discovery diagnostics: URL userinfo, query strings, and fragments are removed before the shared credential redactor runs. `/commandcode-endpoint` stores a per-model Provider API route, and `/commandcode-diagnostics` prints a content-free report. Inference stays on the Provider API. A `403 upgrade_required` response stops with that requirement and does not retry the retired `/alpha/generate` transport. `COMMANDCODE_TASTE_LEARNING` is no longer read. During a DeepSeek V4 peak window, context-tier rates are doubled together with the base rates, and the host receives its own mutable copy. `/commandcode-refresh` resets the transport probe. On first start without a cache, model discovery waits for `https://api.commandcode.ai/provider/v1/models` and still loads if that request fails. The static capability snapshot is `command-code@1.89.
|
|
88
|
+
`/commandcode-quota` shows account usage. `/commandcode-refresh` reloads the model catalog, and `/commandcode-status` shows redacted discovery diagnostics: URL userinfo, query strings, and fragments are removed before the shared credential redactor runs. `/commandcode-endpoint` stores a per-model Provider API route, and `/commandcode-diagnostics` prints a content-free report. Inference stays on the Provider API. A `403 upgrade_required` response stops with that requirement and does not retry the retired `/alpha/generate` transport. `COMMANDCODE_TASTE_LEARNING` is no longer read. During a DeepSeek V4 peak window, context-tier rates are doubled together with the base rates, and the host receives its own mutable copy. `/commandcode-refresh` resets the transport probe. On first start without a cache, model discovery waits for `https://api.commandcode.ai/provider/v1/models` and still loads if that request fails. The static capability snapshot is `command-code@1.89.2`. Reviewed per-million display prices stay `claude-fable-5-2` at $8.00 input / $40.00 output / $0.20 cache read / $10.00 cache write, `google/gemini-4-carbon` at $2.00 / $10.00 / $0.10 with no cache-write charge, and `meta/muse-ember` at $0.10 / $0.50 / $0.004 with no cache-write charge. `Qwen/Qwen4-Max` is $1.50 / $4.50 / $0.075 / $1.875, and `tencent/hy4-flash` is $0.07 / $0.281 / $0.003 with no cache-write charge. `recursive/flint-v1.0:free` is zero while that free tier lasts. Fable, Carbon, Muse, Inkling 2 Small Free, Qwen4 Max, and Hy4 Flash accept image input and a selectable reasoning effort. Flint is text-only reasoning with no selectable effort. Inkling 2 Small's output limit is 131,072 tokens. Refresh checks the stored key with `whoami` before returning it. A 401 fails that refresh with `401 invalid_token` and does not hand the key back. A network error or HTTP 5xx fails the refresh without that message. Responses requests for `zai-org/GLM-5.3` tag untyped system, developer, and user items as `type: "message"` and drop a reasoning block that is only `effort: "none"`. When that model returns its chain of thought only as plaintext `encrypted_content` on a completed reasoning item, the stream shows that text. A canonical summary or an earlier reasoning delta is left alone. Other models keep `encrypted_content` invisible. `mistral/mistral-large-4` drops that same inert block and leaves item types unchanged. Every other model keeps the host body. A reasoning effort other than `none` is left in place. The retired `stealth/crouton-alpha` and `reflection/beam:free` prices and capability flags are gone, so a listing without a price is unknown. TypeSafe's Command Code judge backend stays opt-in and uses that backend's own key. This aggregate does not also bundle `pi-login-manager` or `@iaziz786/pi-cmd-login`.
|
|
89
89
|
|
|
90
90
|
### Footer
|
|
91
91
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -187,7 +187,7 @@ THE SOFTWARE.
|
|
|
187
187
|
|
|
188
188
|
## `pi-commandcode-provider`
|
|
189
189
|
|
|
190
|
-
The aggregate bundles [`pi-commandcode-provider`](https://github.com/patlux/pi-commandcode-provider) version 0.8.
|
|
190
|
+
The aggregate bundles [`pi-commandcode-provider`](https://github.com/patlux/pi-commandcode-provider) version 0.8.6 under its original MIT license. The imported npm package corresponds to upstream tag `v0.8.6` at commit [`c8c12bdc0984ca8b46f45cc02969560da46e00fe`](https://github.com/patlux/pi-commandcode-provider/commit/c8c12bdc0984ca8b46f45cc02969560da46e00fe). npm publishes no gitHead; the published tarball matches that tag.
|
|
191
191
|
|
|
192
192
|
MIT License
|
|
193
193
|
|
|
@@ -213,8 +213,8 @@ THE SOFTWARE.
|
|
|
213
213
|
|
|
214
214
|
## `pi-provider-qoder`
|
|
215
215
|
|
|
216
|
-
The aggregate bundles [`pi-provider-qoder`](https://github.com/simonsmh/pi-provider-qoder) version 0.6.
|
|
216
|
+
The aggregate bundles [`pi-provider-qoder`](https://github.com/simonsmh/pi-provider-qoder) version 0.6.13 under its original package name. npm metadata and the repository README declare the MIT license. The published tarball does not include a LICENSE file. The published package corresponds to git commit [`63abcb4ca319bd37cb015a7bf5eee168eef7b306`](https://github.com/simonsmh/pi-provider-qoder/commit/63abcb4ca319bd37cb015a7bf5eee168eef7b306).
|
|
217
217
|
|
|
218
218
|
## `@herbertgao/pi-impeccable`
|
|
219
219
|
|
|
220
|
-
The aggregate bundles [`@herbertgao/pi-impeccable`](https://github.com/HerbertGao/pi-extensions/tree/master/packages/pi-impeccable), vendored from [`pbakaus/impeccable`](https://github.com/pbakaus/impeccable) release `4.
|
|
220
|
+
The aggregate bundles [`@herbertgao/pi-impeccable`](https://github.com/HerbertGao/pi-extensions/tree/master/packages/pi-impeccable), vendored from [`pbakaus/impeccable`](https://github.com/pbakaus/impeccable) release `4.10.0` at commit `ab3617920fcdb5009163a725ba8ff59927a63474`, under the Apache License 2.0. `scripts/live-browser.js` includes two local fixes: a staged removal stays in the live DOM, and a one-minute exit clears the live init flag so a later inject can start. The bundled child package includes the complete upstream `LICENSE` and `NOTICE.md`, including its third-party attributions.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @herbertgao/pi-cc-extensions
|
|
2
2
|
|
|
3
|
+
## 1.0.21-local.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#392](https://github.com/HerbertGao/pi-extensions/pull/392) [`e233ef6`](https://github.com/HerbertGao/pi-extensions/commit/e233ef6cee8184ff322521eae67bfa2b57bf483d) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Replay upstream pi-cc-extensions 1.0.21. Whole-table copy stays off until /ccstyle Features turns it on, and then copies a fullscreen assistant table as TSV, CSV, or Markdown. Markdown enhancement shares that transformer slot. Regular mode still does not enable terminal mouse reporting.
|
|
8
|
+
|
|
3
9
|
## 1.0.20-local.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -57,6 +57,7 @@ Renderer snapshots for `on` / `compact` modes: [default](./docs/tool-render-exam
|
|
|
57
57
|
"enableWorkingMessage": true, // Working... bottom token/elapsed
|
|
58
58
|
"enableAliases": true, // /clear, /exit aliases
|
|
59
59
|
"enableMarkdownEnhance": true, // markdown pass: Mermaid dialects and circled-number conversion; false hands it to other extensions
|
|
60
|
+
"enableTableCopy": false, // TSV / CSV / Markdown table copy (Fullscreen assistant bodies); enable in /ccstyle Features, restart required
|
|
60
61
|
"enableEditorPrefix": true, // editor ❯ prefix
|
|
61
62
|
|
|
62
63
|
// ui
|
|
@@ -118,7 +119,7 @@ pi -e . # one run, does not edit settings.json
|
|
|
118
119
|
|
|
119
120
|
## Compatibility
|
|
120
121
|
|
|
121
|
-
- Node.js `>=22.19.0`; the monorepo typechecks against Pi `1.5.0`, and published Pi peer versions stay `*`. 1.0.20 shows the date with a round summary's completion time, seals that summary when an outer tool appears, and reuses unchanged expanded-card rows. 1.0.19 appends the completion time to a round summary and counts a write together with a later edit of the same file. After `/new` or `/reload` resets the editor, the old editor is not written back. 1.0.18 drops the blank rail between Input and Output on an expanded card. Inline images in an expanded group line up with the output text, and in fullscreen they keep the card background. 1.0.17 still passes injected keybinding hints, `messageTypes`, and the waiting-for-input state through to Pi 1.5.x hosts that provide them.
|
|
122
|
+
- Node.js `>=22.19.0`; the monorepo typechecks against Pi `1.5.0`, and published Pi peer versions stay `*`. 1.0.21 leaves whole-table copy off until `/ccstyle` Features turns it on. It applies to fullscreen assistant bodies and shares one transformer slot with Markdown enhancement. 1.0.20 shows the date with a round summary's completion time, seals that summary when an outer tool appears, and reuses unchanged expanded-card rows. 1.0.19 appends the completion time to a round summary and counts a write together with a later edit of the same file. After `/new` or `/reload` resets the editor, the old editor is not written back. 1.0.18 drops the blank rail between Input and Output on an expanded card. Inline images in an expanded group line up with the output text, and in fullscreen they keep the card background. 1.0.17 still passes injected keybinding hints, `messageTypes`, and the waiting-for-input state through to Pi 1.5.x hosts that provide them.
|
|
122
123
|
|
|
123
124
|
## Recommended companions
|
|
124
125
|
|
|
@@ -130,7 +131,7 @@ pi -e . # one run, does not edit settings.json
|
|
|
130
131
|
|
|
131
132
|
## Credits
|
|
132
133
|
|
|
133
|
-
- Based on [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.
|
|
134
|
+
- Based on [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.21 (MIT), upstream baseline [`9a0ecdd`](https://github.com/minuque/pi-cc-extensions/commit/9a0ecdd29f9cecca9c34ae591b0de85896f2c07e), with this repository's configuration migration and compatibility patches retained.
|
|
134
135
|
- Rich diffs are adapted from [`MasuRii/pi-tool-display`](https://github.com/MasuRii/pi-tool-display) (MIT). See [`extensions/renderer/tool/diff/ATTRIBUTION.md`](./extensions/renderer/tool/diff/ATTRIBUTION.md).
|
|
135
136
|
|
|
136
137
|
## License
|
|
@@ -57,6 +57,7 @@ pi install git:github.com/HerbertGao/pi-extensions
|
|
|
57
57
|
"enableWorkingMessage": true, // Working... 底部 token/耗时
|
|
58
58
|
"enableAliases": true, // /clear、/exit 别名
|
|
59
59
|
"enableMarkdownEnhance": true, // markdown 转换:Mermaid 方言渲染、圈数字转半角括号;false 让位给其他扩展
|
|
60
|
+
"enableTableCopy": false, // TSV / CSV / Markdown 整表复制(Fullscreen 助手正文);/ccstyle Features 开启,重启生效
|
|
60
61
|
"enableEditorPrefix": true, // 输入框 ❯ 前缀
|
|
61
62
|
|
|
62
63
|
// ui
|
|
@@ -118,7 +119,7 @@ pi -e . # 只跑一次,不改 settings.json
|
|
|
118
119
|
|
|
119
120
|
## 兼容性
|
|
120
121
|
|
|
121
|
-
- Node.js `>=22.19.0`;monorepo 的类型检查使用 Pi `1.5.0`,发布包的 Pi peer 版本保持 `*`。1.0.20 的回合摘要完成时刻带上日期,外层工具一出现就封口,展开卡底色在内容没变时复用上一帧。1.0.19 在回合摘要末尾追加完成时刻,并把同一文件的 write 与后续 edit 计为一次。`/new` 或 `/reload` 重置输入框后不再写回旧编辑器。1.0.18 去掉展开卡里 Input 与 Output 之间的空 rail 行。分组展开卡里的内联图片与 Output 正文对齐,全屏时图片行保留卡片底色。1.0.17 仍会把注入式按键提示、`messageTypes` 和等待输入状态交给支持它们的 Pi 1.5.x。
|
|
122
|
+
- Node.js `>=22.19.0`;monorepo 的类型检查使用 Pi `1.5.0`,发布包的 Pi peer 版本保持 `*`。1.0.21 默认关闭整表复制,可在 `/ccstyle` Features 里打开,只作用于全屏助手正文,并和 Markdown 增强共用同一个 transformer 槽位。1.0.20 的回合摘要完成时刻带上日期,外层工具一出现就封口,展开卡底色在内容没变时复用上一帧。1.0.19 在回合摘要末尾追加完成时刻,并把同一文件的 write 与后续 edit 计为一次。`/new` 或 `/reload` 重置输入框后不再写回旧编辑器。1.0.18 去掉展开卡里 Input 与 Output 之间的空 rail 行。分组展开卡里的内联图片与 Output 正文对齐,全屏时图片行保留卡片底色。1.0.17 仍会把注入式按键提示、`messageTypes` 和等待输入状态交给支持它们的 Pi 1.5.x。
|
|
122
123
|
|
|
123
124
|
## 推荐搭配
|
|
124
125
|
|
|
@@ -130,7 +131,7 @@ pi -e . # 只跑一次,不改 settings.json
|
|
|
130
131
|
|
|
131
132
|
## 致谢
|
|
132
133
|
|
|
133
|
-
- 基于 [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.
|
|
134
|
+
- 基于 [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.21(MIT),上游基线 [`9a0ecdd`](https://github.com/minuque/pi-cc-extensions/commit/9a0ecdd29f9cecca9c34ae591b0de85896f2c07e);保留本仓库的配置迁移与兼容性补丁。
|
|
134
135
|
- Rich diff 改编自 [`MasuRii/pi-tool-display`](https://github.com/MasuRii/pi-tool-display)(MIT);详见 [`extensions/renderer/tool/diff/ATTRIBUTION.md`](./extensions/renderer/tool/diff/ATTRIBUTION.md)。
|
|
135
136
|
|
|
136
137
|
## 许可证
|
|
@@ -80,6 +80,8 @@ export type Config = {
|
|
|
80
80
|
enableAliases: boolean;
|
|
81
81
|
/** markdown 转换:Mermaid 方言渲染、圈数字转半角括号。关掉让位给其他扩展。 */
|
|
82
82
|
enableMarkdownEnhance: boolean;
|
|
83
|
+
/** Fullscreen 助手正文表格的整表复制按钮;默认关。 */
|
|
84
|
+
enableTableCopy: boolean;
|
|
83
85
|
/** 输入框 `❯ ` 前缀(占左侧 2 列,颜色随 thinking/bash mode 联动)。 */
|
|
84
86
|
enableEditorPrefix: boolean;
|
|
85
87
|
enableCustomFooter: boolean;
|
|
@@ -173,6 +175,7 @@ export const DEFAULT_CONFIG: Config = {
|
|
|
173
175
|
enableWorkingMessage: true,
|
|
174
176
|
enableAliases: true,
|
|
175
177
|
enableMarkdownEnhance: true,
|
|
178
|
+
enableTableCopy: false,
|
|
176
179
|
enableEditorPrefix: true,
|
|
177
180
|
enableCustomFooter: true,
|
|
178
181
|
footerTokenRate: true,
|
|
@@ -317,6 +320,7 @@ export function normalizeConfig(input: unknown): Config {
|
|
|
317
320
|
enableWorkingMessage: source.enableWorkingMessage !== false,
|
|
318
321
|
enableAliases: source.enableAliases !== false,
|
|
319
322
|
enableMarkdownEnhance: source.enableMarkdownEnhance !== false,
|
|
323
|
+
enableTableCopy: source.enableTableCopy === true,
|
|
320
324
|
enableEditorPrefix: (source.enableEditorPrefix ?? source.enableInputPrompt) !== false, // 兼容旧配置键
|
|
321
325
|
enableCustomFooter: source.enableCustomFooter !== false,
|
|
322
326
|
footerTokenRate: source.footerTokenRate !== false,
|
|
@@ -434,6 +438,7 @@ export function formatConfigStatus(source: Config = config): string {
|
|
|
434
438
|
`workingMsg=${source.enableWorkingMessage ? "on" : "off"}`,
|
|
435
439
|
`aliases=${source.enableAliases ? "on" : "off"}`,
|
|
436
440
|
`markdownEnhance=${source.enableMarkdownEnhance ? "on" : "off"}`,
|
|
441
|
+
`tableCopy=${source.enableTableCopy ? "on" : "off"}`,
|
|
437
442
|
`editorPrefix=${source.enableEditorPrefix ? "on" : "off"}`,
|
|
438
443
|
`footer=${source.enableCustomFooter ? "on" : "off"}`,
|
|
439
444
|
`footerTokenRate=${source.footerTokenRate ? "on" : "off"}`,
|
|
@@ -706,6 +706,13 @@ export async function showCcstylePanel(
|
|
|
706
706
|
"Markdown enhancements off; another extension can own the markdown pass.",
|
|
707
707
|
config.enableMarkdownEnhance,
|
|
708
708
|
);
|
|
709
|
+
const tableCopyToggle = featureToggleSetting(
|
|
710
|
+
"enableTableCopy",
|
|
711
|
+
"Copy table",
|
|
712
|
+
"Copy assistant-body tables as TSV / CSV / Markdown in Fullscreen main chat. Next restart applies.",
|
|
713
|
+
"Table copy actions off; another extension can own table interactions.",
|
|
714
|
+
config.enableTableCopy,
|
|
715
|
+
);
|
|
709
716
|
const footerCurrencySetting = {
|
|
710
717
|
id: "footerCurrency",
|
|
711
718
|
label: "Cost currency",
|
|
@@ -863,6 +870,7 @@ export async function showCcstylePanel(
|
|
|
863
870
|
enableWorkingMessage: workingMessageToggle,
|
|
864
871
|
enableAliases: aliasesToggle,
|
|
865
872
|
enableMarkdownEnhance: markdownEnhanceToggle,
|
|
873
|
+
enableTableCopy: tableCopyToggle,
|
|
866
874
|
};
|
|
867
875
|
|
|
868
876
|
const onSettingChange = (id: string, value: string) => {
|
|
@@ -1140,6 +1148,7 @@ export async function showCcstylePanel(
|
|
|
1140
1148
|
workingMessageToggle.setting,
|
|
1141
1149
|
aliasesToggle.setting,
|
|
1142
1150
|
markdownEnhanceToggle.setting,
|
|
1151
|
+
tableCopyToggle.setting,
|
|
1143
1152
|
],
|
|
1144
1153
|
},
|
|
1145
1154
|
{
|
|
@@ -21,13 +21,42 @@ import {
|
|
|
21
21
|
|
|
22
22
|
// renderer
|
|
23
23
|
import claudeCodeStyle, { getCompactThinkingConfig } from "./renderer/index.ts";
|
|
24
|
-
import
|
|
24
|
+
import { MARKDOWN_ENHANCE_MESSAGE_TYPES, transformMarkdown } from "./renderer/markdown-enhance.ts";
|
|
25
|
+
import tableCopy from "./renderer/table-copy.ts";
|
|
25
26
|
import {
|
|
26
27
|
COMPACT_MODE_PATCH_KEY,
|
|
27
28
|
COMPACT_THINKING_OWNER,
|
|
28
29
|
patchRegistry,
|
|
29
30
|
} from "./utils/patch-keys.ts";
|
|
30
31
|
|
|
32
|
+
/**
|
|
33
|
+
* One registration per extension: table provenance must not replace enhancement.
|
|
34
|
+
* Pi 1.5.1 is the first release whose types accept the message-type option.
|
|
35
|
+
* This workspace still typechecks against Pi 1.5.0, so the call is cast.
|
|
36
|
+
* 1.5.1+ hosts honor the option; 1.5.0 ignores it.
|
|
37
|
+
*/
|
|
38
|
+
export function configureMarkdownRendering(
|
|
39
|
+
pi: ExtensionAPI,
|
|
40
|
+
{
|
|
41
|
+
enableMarkdownEnhance,
|
|
42
|
+
enableTableCopy,
|
|
43
|
+
}: { enableMarkdownEnhance: boolean; enableTableCopy: boolean },
|
|
44
|
+
): void {
|
|
45
|
+
const copy = enableTableCopy ? tableCopy(pi) : undefined;
|
|
46
|
+
if (!enableMarkdownEnhance && !copy) return;
|
|
47
|
+
const registerMarkdownTransformer = pi.registerMarkdownTransformer as (
|
|
48
|
+
transformer: Parameters<ExtensionAPI["registerMarkdownTransformer"]>[0],
|
|
49
|
+
options?: { messageTypes?: readonly string[] },
|
|
50
|
+
) => void;
|
|
51
|
+
registerMarkdownTransformer(
|
|
52
|
+
(markdown, context) => {
|
|
53
|
+
copy?.noteSource(context);
|
|
54
|
+
return enableMarkdownEnhance ? transformMarkdown(markdown, context) : markdown;
|
|
55
|
+
},
|
|
56
|
+
{ messageTypes: enableMarkdownEnhance ? MARKDOWN_ENHANCE_MESSAGE_TYPES : ["assistant"] },
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
31
60
|
export default function (pi: ExtensionAPI): void {
|
|
32
61
|
// /reload 或会话切换接手:先释放旧一代 compact 外层,再停旧 thinking
|
|
33
62
|
// owner(顺序不可反,否则新一代会把旧 wrapper 误采样为 native 原型,
|
|
@@ -50,6 +79,7 @@ export default function (pi: ExtensionAPI): void {
|
|
|
50
79
|
|
|
51
80
|
// Renderer 必须先注册 lifecycle handler,shutdown 时才能先解开外层 compact
|
|
52
81
|
// patch,thinking 随后才能恢复原生原型;bridge 转发给稍后安装的 controller。
|
|
82
|
+
// 两个 markdown 功能独立开关,但共享同一个 transformer 注册槽位。
|
|
53
83
|
let compactThinking: CompactThinkingController | undefined;
|
|
54
84
|
const compactThinkingQuery: CompactThinkingController = {
|
|
55
85
|
updateConfig: (next) => compactThinking?.updateConfig(next),
|
|
@@ -60,7 +90,7 @@ export default function (pi: ExtensionAPI): void {
|
|
|
60
90
|
getThinkingAnimationFrame: () => compactThinking?.getThinkingAnimationFrame?.() ?? 0,
|
|
61
91
|
setCompactSummaryActive: (active) => compactThinking?.setCompactSummaryActive?.(active),
|
|
62
92
|
};
|
|
63
|
-
|
|
93
|
+
configureMarkdownRendering(pi, config);
|
|
64
94
|
claudeCodeStyle(pi, undefined, compactThinkingQuery);
|
|
65
95
|
compactThinking = installCompactThinking(pi, getCompactThinkingConfig());
|
|
66
96
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
1
|
+
import type { ExtensionAPI, MarkdownTransformContext } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { diagramKind, render as renderMermaid, sourceBox } from "grok-mermaid";
|
|
3
3
|
|
|
4
4
|
// ============================================================================
|
|
@@ -140,13 +140,29 @@ function normalizeMultilineLinks(markdown: string): string {
|
|
|
140
140
|
// 注册
|
|
141
141
|
// ============================================================================
|
|
142
142
|
|
|
143
|
+
export const MARKDOWN_ENHANCE_MESSAGE_TYPES = [
|
|
144
|
+
"user",
|
|
145
|
+
"assistant",
|
|
146
|
+
"assistant-thinking",
|
|
147
|
+
"custom",
|
|
148
|
+
"summary",
|
|
149
|
+
] as const;
|
|
150
|
+
|
|
151
|
+
/** Pure conversion so the package entry point can share Pi's single transformer slot. */
|
|
152
|
+
export function transformMarkdown(
|
|
153
|
+
markdown: string,
|
|
154
|
+
context?: Partial<MarkdownTransformContext>,
|
|
155
|
+
): string {
|
|
156
|
+
const { messageType, isStreaming = false } = context ?? {};
|
|
157
|
+
// thinking 保持原文;普通回复即使流式中也先关闭跨行链接的空白点击区。
|
|
158
|
+
if (messageType === "assistant-thinking") return markdown;
|
|
159
|
+
markdown = normalizeMultilineLinks(markdown);
|
|
160
|
+
if (isStreaming) return markdown;
|
|
161
|
+
markdown = deCircled(markdown);
|
|
162
|
+
return renderDiagrams(markdown, context);
|
|
163
|
+
}
|
|
164
|
+
|
|
143
165
|
export default function (pi: ExtensionAPI): void {
|
|
144
|
-
// 注意:pi 每个扩展只有一个 markdownTransformer 槽位,多次注册会互相覆盖,
|
|
145
|
-
// 所以剩下的转换合并为一次注册,内部按序链式执行。
|
|
146
|
-
// 提示框和裸 URL 不接管:pi 的 marked 已自带裸 URL 链接化(带尾标点回退,
|
|
147
|
-
// 且在链接文本内不再嵌套),提示框交给默认引用块风格。
|
|
148
|
-
// messageTypes:除默认的 user/assistant/thinking,再跟上自定义消息与展开的 summary,
|
|
149
|
-
// 免得圈数字、方言图在那两处变回原样。
|
|
150
166
|
// Pi 1.5.1 起第二个参数才进类型。工作区仍对照 1.5.0 做类型检查:1.5.2 的
|
|
151
167
|
// 信任锁在 Vitest 假时钟下会空转,所以不把锁文件抬到 1.5.2。运行时照样把
|
|
152
168
|
// options 传下去,1.5.1+ 的宿主会用,1.5.0 会忽略。
|
|
@@ -154,20 +170,9 @@ export default function (pi: ExtensionAPI): void {
|
|
|
154
170
|
transformer: Parameters<ExtensionAPI["registerMarkdownTransformer"]>[0],
|
|
155
171
|
options?: { messageTypes?: readonly string[] },
|
|
156
172
|
) => void;
|
|
157
|
-
registerMarkdownTransformer(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
// thinking 保持原文;普通回复即使流式中也先关闭跨行链接的空白点击区。
|
|
161
|
-
if (messageType === "assistant-thinking") return markdown;
|
|
162
|
-
markdown = normalizeMultilineLinks(markdown);
|
|
163
|
-
if (isStreaming) return markdown;
|
|
164
|
-
// 0. 圈数字转半角括号(Nerd Font 补丁字形缺陷规避)
|
|
165
|
-
markdown = deCircled(markdown);
|
|
166
|
-
// 1. Mermaid 方言渲染
|
|
167
|
-
return renderDiagrams(markdown, context);
|
|
168
|
-
},
|
|
169
|
-
{ messageTypes: ["user", "assistant", "assistant-thinking", "custom", "summary"] },
|
|
170
|
-
);
|
|
173
|
+
registerMarkdownTransformer(transformMarkdown, {
|
|
174
|
+
messageTypes: MARKDOWN_ENHANCE_MESSAGE_TYPES,
|
|
175
|
+
});
|
|
171
176
|
}
|
|
172
177
|
|
|
173
178
|
// grok-mermaid 渲染结果缓存:resize/restored 重绘会重复转换,按源码缓存 art。
|