@herbertgao/pi-extensions 2026.11.9 → 2026.11.11

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +6 -6
  3. package/THIRD_PARTY_NOTICES.md +2 -2
  4. package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +12 -0
  5. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +8 -6
  6. package/node_modules/@herbertgao/pi-cc-extensions/README.md +8 -6
  7. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +12 -0
  8. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +36 -13
  9. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +4 -8
  10. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +7 -2
  11. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer.ts +115 -6
  12. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +47 -15
  13. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/startup-header.ts +3 -18
  14. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +34 -10
  15. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +6 -1
  16. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/markdown-enhance.ts +30 -17
  17. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/scroll.ts +4 -21
  18. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +63 -7
  19. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +3 -13
  20. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-io.ts +0 -5
  21. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/transcript-mode.ts +34 -7
  22. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/ansi-text.ts +43 -4
  23. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/keybindings.ts +75 -0
  24. package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
  25. package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +6 -0
  26. package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
  27. package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
  28. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +3 -1
  29. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/adapt.md +1 -1
  30. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.md +12 -1
  31. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.native.md +4 -0
  32. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique.md +5 -5
  33. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/documenter.md +1 -1
  34. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/finish-reviewer.md +1 -1
  35. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/distill.md +1 -1
  36. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/document.md +3 -1
  37. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/foundations.md +44 -0
  38. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live-setup.md +1 -1
  39. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live.md +26 -12
  40. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work.md +10 -9
  41. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/onboard.md +7 -6
  42. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/overdrive.md +2 -2
  43. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/quieter.md +1 -1
  44. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/visualize.md +1 -1
  45. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
  46. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
  47. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable +69 -16
  48. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable.cmd +55 -7
  49. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +34 -4
  50. package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +12 -0
  51. package/node_modules/@herbertgao/pi-subagents/README.md +53 -26
  52. package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +12 -12
  53. package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
  54. package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +84 -8
  55. package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +51 -32
  56. package/node_modules/@herbertgao/pi-subagents/src/default-agents.ts +7 -0
  57. package/node_modules/@herbertgao/pi-subagents/src/index.ts +369 -879
  58. package/node_modules/@herbertgao/pi-subagents/src/nested-tools.ts +4 -1
  59. package/node_modules/@herbertgao/pi-subagents/src/prompts.ts +13 -0
  60. package/node_modules/@herbertgao/pi-subagents/src/schedule-store.ts +18 -13
  61. package/node_modules/@herbertgao/pi-subagents/src/schedule.ts +25 -5
  62. package/node_modules/@herbertgao/pi-subagents/src/settings.ts +225 -61
  63. package/node_modules/@herbertgao/pi-subagents/src/types.ts +27 -0
  64. package/node_modules/@herbertgao/pi-subagents/src/ui/agent-tree.ts +47 -0
  65. package/node_modules/@herbertgao/pi-subagents/src/ui/agent-widget.ts +16 -5
  66. package/node_modules/@herbertgao/pi-subagents/src/ui/agents-menu.ts +705 -0
  67. package/node_modules/@herbertgao/pi-subagents/src/ui/fleet-list.ts +211 -47
  68. package/node_modules/@herbertgao/pi-subagents/src/ui/settings-menu.ts +361 -0
  69. package/node_modules/@herbertgao/pi-subagents/src/ui/viewer-keys.ts +1 -1
  70. package/node_modules/pi-commandcode-provider/CHANGELOG.md +11 -1
  71. package/node_modules/pi-commandcode-provider/index.ts +2 -1
  72. package/node_modules/pi-commandcode-provider/package.json +5 -4
  73. package/node_modules/pi-commandcode-provider/src/pricing.ts +8 -1
  74. package/node_modules/pi-commandcode-provider/src/responses-compat.ts +137 -0
  75. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @herbertgao/pi-extensions
2
2
 
3
+ ## 2026.11.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#377](https://github.com/HerbertGao/pi-extensions/pull/377) [`b02be94`](https://github.com/HerbertGao/pi-extensions/commit/b02be9410f637abc110fd2ee02def0f9d75fd419) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Pin pi-commandcode-provider 0.8.3. GLM-5.3 Responses requests tag untyped messages and drop an inert reasoning effort of none. Mistral Large 4 drops that same effort. Inkling 2 Small Free is priced at zero and stays text-only.
8
+
9
+ - Updated dependencies [[`b02be94`](https://github.com/HerbertGao/pi-extensions/commit/b02be9410f637abc110fd2ee02def0f9d75fd419), [`b02be94`](https://github.com/HerbertGao/pi-extensions/commit/b02be9410f637abc110fd2ee02def0f9d75fd419), [`b02be94`](https://github.com/HerbertGao/pi-extensions/commit/b02be9410f637abc110fd2ee02def0f9d75fd419)]:
10
+ - @herbertgao/pi-impeccable@0.4.0
11
+ - @herbertgao/pi-cc-extensions@1.0.17
12
+ - @herbertgao/pi-subagents@0.24.0
13
+
14
+ ## 2026.11.10
15
+
16
+ ### Patch Changes
17
+
18
+ - [#374](https://github.com/HerbertGao/pi-extensions/pull/374) [`4d323bd`](https://github.com/HerbertGao/pi-extensions/commit/4d323bdfd68139885b475e721ad150d9ee4958ea) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Pin graphifyy 0.9.108. The CLI stays outside the npm aggregate. Warm AST caches rebuild, a query filter that matches nothing says so, and Python stays on >=3.10,<3.15.
19
+
20
+ - Updated dependencies [[`4d323bd`](https://github.com/HerbertGao/pi-extensions/commit/4d323bdfd68139885b475e721ad150d9ee4958ea), [`4d323bd`](https://github.com/HerbertGao/pi-extensions/commit/4d323bdfd68139885b475e721ad150d9ee4958ea)]:
21
+ - @herbertgao/pi-cc-extensions@1.1.0
22
+ - @herbertgao/pi-subagents@0.24.0
23
+
3
24
  ## 2026.11.9
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -21,7 +21,7 @@ When migrating from `pi-mcp-adapter`, remove any standalone adapter install as w
21
21
  The package bundles 6 active `@herbertgao/*` child packages—`pi-agency`, `pi-bark`, `pi-cc-extensions`, `pi-impeccable`, `pi-subagents`, and `sol-pi`—plus the following upstream packages under their original names:
22
22
 
23
23
  - `pi-antigravity@0.12.0`
24
- - `pi-commandcode-provider@0.8.2`
24
+ - `pi-commandcode-provider@0.8.3`
25
25
  - `pi-provider-qoder@0.6.12`
26
26
  - `@dietrichgebert/ponytail@5.3.3`
27
27
  - `@juicesharp/rpiv-ask-user-question@2.15.0`
@@ -41,13 +41,13 @@ The package bundles 6 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.16`; 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.
44
+ The locally customized CC package follows upstream `pi-cc-extensions@1.0.18`; 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.12.0` enriches search citations by visiting source sites by default (`ANTIGRAVITY_NO_SOURCE_ENRICH=1` disables enrichment). `ANTIGRAVITY_DEFER_TOOLS=1` registers `google_search` 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. 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.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.8.2` 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.21 and skips a sibling engine binary that reports a different version. Go leaves a staged removal in the page so Undo and Discard can restore it. The package does not install automatic post-edit hooks, and upstream `pin`/`unpin` do not discover npm-loaded skills.
50
+ Impeccable `4.9.1` 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.24 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. `/impeccable foundations` walks a product-foundations checklist. Go leaves a staged removal in the page so Undo and Discard can restore 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
 
@@ -63,7 +63,7 @@ Impeccable `4.8.2` is vendored as `@herbertgao/pi-impeccable` and loaded with `/
63
63
 
64
64
  `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.
65
65
 
66
- `@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.4.12` 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. 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.47.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, and Tabstack are explicit-only, excluded from automatic and `all` selection. `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.12.0` reads Pi 0.86+ transcript system messages, so Antigravity requests carry Pi's system prompt and tools; it also registers `google_search` and `generate_image` tools that use the signed-in Antigravity account. Those tools stay direct unless `ANTIGRAVITY_DEFER_TOOLS=1`. 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.12` registers the `qoder` and `qoder-cn` model providers. 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.2` 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.
66
+ `@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.4.12` 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. 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.47.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, and Tabstack are explicit-only, excluded from automatic and `all` selection. `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.12.0` reads Pi 0.86+ transcript system messages, so Antigravity requests carry Pi's system prompt and tools; it also registers `google_search` and `generate_image` tools that use the signed-in Antigravity account. Those tools stay direct unless `ANTIGRAVITY_DEFER_TOOLS=1`. 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.12` registers the `qoder` and `qoder-cn` model providers. 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.3` 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.
67
67
 
68
68
  `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.
69
69
 
@@ -81,9 +81,9 @@ Pi stacks widgets by key. While tasks are visible, three other above-editor widg
81
81
 
82
82
  ### Command Code
83
83
 
84
- `pi-commandcode-provider@0.8.2` 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.
84
+ `pi-commandcode-provider@0.8.3` 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.
85
85
 
86
- `/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 stays `command-code@1.88.5`. Reviewed per-million display prices added on 2026-11-11 are `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. Those models stay text-only, without reasoning or effort flags, until the capability snapshot includes them. The retired `stealth/crouton-alpha` and `reflection/beam:free` zero prices are removed; their capability flags remain, 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`.
86
+ `/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 stays `command-code@1.88.5`. Reviewed per-million display prices added on 2026-11-11 are `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. Those models stay text-only, without reasoning or effort flags, until the capability snapshot includes them. `thinkingmachines/inkling-2-small:free` is priced at zero while that free tier lasts and is also absent from the capability snapshot, so it stays text-only. 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"`. `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` zero prices are removed; their capability flags remain, 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`.
87
87
 
88
88
  ### Footer
89
89
 
@@ -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.2 under its original MIT license. The imported npm package corresponds to upstream tag `v0.8.2` at commit [`7616ecd7a5100242411242b506623d025ae0181e`](https://github.com/patlux/pi-commandcode-provider/commit/7616ecd7a5100242411242b506623d025ae0181e). npm publishes no gitHead; the published tarball matches that tag.
190
+ The aggregate bundles [`pi-commandcode-provider`](https://github.com/patlux/pi-commandcode-provider) version 0.8.3 under its original MIT license. The imported npm package corresponds to upstream tag `v0.8.3` at commit [`2a5c55d8b2b74f01573cbf5735dca78b67f5efd1`](https://github.com/patlux/pi-commandcode-provider/commit/2a5c55d8b2b74f01573cbf5735dca78b67f5efd1). npm publishes no gitHead; the published tarball matches that tag.
191
191
 
192
192
  MIT License
193
193
 
@@ -217,4 +217,4 @@ The aggregate bundles [`pi-provider-qoder`](https://github.com/simonsmh/pi-provi
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.8.2` at commit `035c8f319edd019936525a062fe99e83ca8d12c6`, under the Apache License 2.0. `scripts/live-browser.js` includes one local fix that keeps a staged removal in the live DOM. The bundled child package includes the complete upstream `LICENSE` and `NOTICE.md`, including its third-party attributions.
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.9.1` at commit `acb4cfe14470b1fdf51e855431af618d936b7db8`, under the Apache License 2.0. `scripts/live-browser.js` includes one local fix that keeps a staged removal in the live DOM. The bundled child package includes the complete upstream `LICENSE` and `NOTICE.md`, including its third-party attributions.
@@ -1,5 +1,17 @@
1
1
  # @herbertgao/pi-cc-extensions
2
2
 
3
+ ## 1.0.18-local.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#377](https://github.com/HerbertGao/pi-extensions/pull/377) [`b02be94`](https://github.com/HerbertGao/pi-extensions/commit/b02be9410f637abc110fd2ee02def0f9d75fd419) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Replay upstream pi-cc-extensions 1.0.18. Expanded cards drop the blank row between Input and Output. Inline images in an expanded group line up with the output text, and in fullscreen they keep the card background. Regular mode still does not enable terminal mouse reporting.
8
+
9
+ ## 1.0.17-local.1
10
+
11
+ ### Minor Changes
12
+
13
+ - [#374](https://github.com/HerbertGao/pi-extensions/pull/374) [`4d323bd`](https://github.com/HerbertGao/pi-extensions/commit/4d323bdfd68139885b475e721ad150d9ee4958ea) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Replay upstream pi-cc-extensions 1.0.17. Ctrl+O leaves a long finished bang-command output to Pi and still opens the fullscreen transcript otherwise. The context chip can use Pi's auto-compaction point as its limit. Plain mermaid fences use Pi's renderer, and dialect fences stay here. Turning the editor prefix off and back on in one /ccstyle panel keeps the last choice. Regular mode still does not enable terminal mouse reporting.
14
+
3
15
  ## 1.0.16-local.1
4
16
 
5
17
  ### Minor Changes
@@ -28,11 +28,11 @@ Run `/reload` after installation.
28
28
  | Feature | Description | Entry point |
29
29
  | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
30
30
  | Claude Code UI | Tool summaries, expand/collapse, rich edit/write diffs, and `on` / `compact` / `off` modes | `/ccstyle` |
31
- | Markdown enhancements | Mermaid dialects and circled-number conversion | Automatic; turn off with `enableMarkdownEnhance: false` |
32
- | Fullscreen mode | Tool card/group expand and collapse on click, previews, hover highlight, and a back-to-bottom button | `TUIMODE=fullscreen` or `--tui-mode fullscreen` |
31
+ | Markdown enhancements | Mermaid dialects in non-standard fences (`statediagram`, `classdiagram`…) and circled-number conversion; plain mermaid goes to pi | Automatic; turn off with `enableMarkdownEnhance: false` |
32
+ | Fullscreen mode | Tool card/group expand and collapse on click, previews, hover highlight, and a back-to-bottom button | `--tui-mode fullscreen` (default since pi 1.5) |
33
33
  | Settings panel | `Style / Features / UI / Diff / Thinking / Footer` tabs | `/ccstyle` |
34
34
  | Context inspection | Usage breakdown and previews for the system prompt, memory, skills, tools definition, and messages | `/context` |
35
- | Transcript browsing | Full-screen transcript browsing with every tool output expanded | `Ctrl+O` |
35
+ | Transcript browsing | Full-screen transcript browsing with every tool output expanded; the key goes to pi while a long `!` output can be expanded | `Ctrl+O` |
36
36
  | Session/Subagent references | Search and inject effective context from previous Sessions or existing SubAgents | `@` |
37
37
  | Status bar | Shows model, context, cache, cost, the conversation token total, and git; also works with `@narumitw/pi-usage` for live quota. Git/cache/token Nerd Font icons can be turned off | `/ccstyle` |
38
38
  | Theme | Bundled themes: CC Dark, CC Light, CC Dark HC, CC Light HC | `/settings` → Theme |
@@ -92,6 +92,8 @@ Renderer snapshots for `on` / `compact` modes: [default](./docs/tool-render-exam
92
92
  "footerCurrencyRate": null, // display units per 1 cost unit; null changes the symbol only
93
93
  "footerNerdIcons": true, // Nerd Font glyphs for git/cache/tokens; false = plain text
94
94
  "footerGitStatsMode": "working", // working (default): uncommitted; branch: cumulative net changes
95
+ "footerContextLimit": "window", // context chip limit: window (default); compaction: auto-compaction point (window − compaction.reserveTokens); both: compaction point, window in brackets
96
+ // Pi compacts only after crossing that point, so the text can briefly exceed 100% (e.g. 104%/184k); the bar clamps at 100%
95
97
  "footerHiddenKeys": [], // hidden chip keys
96
98
  "footerLine1Keys": ["model", "context", "cache", "rate", "cost", "tokens", "pi-usage"], // chip order per line; builtins and plugins share one layout
97
99
  "footerLine2Keys": ["cwd", "git"], // cwd: directory and session; git: branch and changes. Either can move to any line
@@ -103,7 +105,7 @@ Renderer snapshots for `on` / `compact` modes: [default](./docs/tool-render-exam
103
105
  > **Fullscreen**: expanded diffs always show every line. When expanded Input/Output exceeds the line cap, the footer shows `… +N more lines`; click for the full preview, click again to collapse.
104
106
 
105
107
  > [!NOTE]
106
- > **Mermaid rendering**: set `markdown.mermaid` to `final` via `~/.pi/agent/settings.json` or `/settings`. Default `streaming` redraws every frame; `final` renders once.
108
+ > **Mermaid rendering**: set `markdown.mermaid` to `final` (`/settings`) so it renders once instead of every frame.
107
109
 
108
110
  ## Local development
109
111
 
@@ -117,7 +119,7 @@ pi -e . # one run, does not edit settings.json
117
119
 
118
120
  ## Compatibility
119
121
 
120
- - Node.js `>=22.19.0`; the monorepo uses Pi `1.5.0`, with published Pi peer versions kept at `*`.
122
+ - Node.js `>=22.19.0`; the monorepo typechecks against Pi `1.5.0`, and published Pi peer versions stay `*`. 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.
121
123
 
122
124
  ## Recommended companions
123
125
 
@@ -129,7 +131,7 @@ pi -e . # one run, does not edit settings.json
129
131
 
130
132
  ## Credits
131
133
 
132
- - Based on [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.16 (MIT), upstream baseline [`5e3ef6b`](https://github.com/minuque/pi-cc-extensions/commit/5e3ef6b9f96d198f93ec242eac81ff21bebdb4e1), with this repository's configuration migration and compatibility patches retained.
134
+ - Based on [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.18 (MIT), upstream baseline [`a251f65`](https://github.com/minuque/pi-cc-extensions/commit/a251f652e8cdbb8d395b3df81ca714ed8711df5d), with this repository's configuration migration and compatibility patches retained.
133
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).
134
136
 
135
137
  ## License
@@ -28,11 +28,11 @@ pi install git:github.com/HerbertGao/pi-extensions
28
28
  | 功能 | 说明 | 入口 |
29
29
  | --------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------- |
30
30
  | Claude Code UI | 工具摘要、折叠展开、rich edit/write diff,以及`on` / `compact` / `off` 三种模式 | `/ccstyle` |
31
- | Markdown 增强 | Mermaid 方言渲染、圈数字转半角括号 | 自动生效;`enableMarkdownEnhance: false` 关闭 |
32
- | Fullscreen mode | 工具卡/group 单击展开与收起、预览、hover 高亮、回到底部按钮 | `TUIMODE=fullscreen` 或 `--tui-mode fullscreen` |
31
+ | Markdown 增强 | 方言 fence 的 Mermaid 渲染(`statediagram`、`classdiagram` 等)、圈数字转半角括号;标准 mermaid 交给 pi | 自动生效;`enableMarkdownEnhance: false` 关闭 |
32
+ | Fullscreen mode | 工具卡/group 单击展开与收起、预览、hover 高亮、回到底部按钮 | `--tui-mode fullscreen`(pi 1.5 起默认) |
33
33
  | 配置面板 | `Style / Features / UI / Diff / Thinking / Footer` 六页签 | `/ccstyle` |
34
34
  | 上下文检查 | 查看上下文占用,并预览 System prompt、Memory、Skills、Tools definition 和消息内容 | `/context` |
35
- | 会话记录浏览 | 全屏浏览完整会话记录,工具输出全展开 | `Ctrl+O` |
35
+ | 会话记录浏览 | 全屏浏览完整会话记录,工具输出全展开;对话区有可展开的 `!` 输出时把键让给 pi | `Ctrl+O` |
36
36
  | Session/Subagent 引用 | 搜索并注入历史 Session 或现有 SubAgent 的有效上下文 | `@` |
37
37
  | 状态栏 | 显示:模型、上下文、缓存、费用、本次对话累计 token、git并适配 @narumitw/pi-usage 实时显示额度;git/缓存/token 图标可关 Nerd Font | `/ccstyle` |
38
38
  | 主题 | 随包提供 4 个主题:CC Dark、CC Light、CC Dark HC、CC Light HC | `/settings` → Theme |
@@ -92,6 +92,8 @@ pi install git:github.com/HerbertGao/pi-extensions
92
92
  "footerCurrencyRate": null, // 1 单位费用换成多少显示币种;null 只换符号、不乘倍率
93
93
  "footerNerdIcons": true, // git/缓存/token 用 Nerd Font 图标;false 为纯文本
94
94
  "footerGitStatsMode": "working", // working(默认):未提交改动;branch:分支累计净改动
95
+ "footerContextLimit": "window", // 上下文芯片分母:window(默认):完整上下文窗口;compaction:自动压缩触发点(窗口 − compaction.reserveTokens);both:压缩点并在括号中显示完整窗口
96
+ // Pi 越过压缩点后才压缩,所以文字可能短暂超过 100%(如 104%/184k);条形图封顶 100%
95
97
  "footerHiddenKeys": [], // 隐藏的芯片 key
96
98
  "footerLine1Keys": ["model", "context", "cache", "rate", "cost", "tokens", "pi-usage"], // 每行芯片顺序;内置项与插件同一套排布
97
99
  "footerLine2Keys": ["cwd", "git"], // cwd:目录和会话名;git:分支和改动。可换到任意行
@@ -103,7 +105,7 @@ pi install git:github.com/HerbertGao/pi-extensions
103
105
  > **全屏模式**:展开态 diff 全量显示。Input/Output 超行时末行给 `… +N more lines`,单击看全量,再击收起。
104
106
 
105
107
  > [!NOTE]
106
- > **Mermaid 渲染**:`markdown.mermaid` 建议设为 `final`(`~/.pi/agent/settings.json` 或 `/settings`)。默认 `streaming` 逐帧重绘,`final` 只渲染最终版。
108
+ > **Mermaid 渲染**:`markdown.mermaid` 建议设 `final`(`/settings`),避免流式逐帧重绘。
107
109
 
108
110
  ## 本地开发
109
111
 
@@ -117,7 +119,7 @@ pi -e . # 只跑一次,不改 settings.json
117
119
 
118
120
  ## 兼容性
119
121
 
120
- - Node.js `>=22.19.0`;monorepo 使用 Pi `1.5.0`,发布包的 Pi peer 版本保持 `*`。
122
+ - Node.js `>=22.19.0`;monorepo 的类型检查使用 Pi `1.5.0`,发布包的 Pi peer 版本保持 `*`。1.0.18 去掉展开卡里 Input 与 Output 之间的空 rail 行。分组展开卡里的内联图片与 Output 正文对齐,全屏时图片行保留卡片底色。1.0.17 仍会把注入式按键提示、`messageTypes` 和等待输入状态交给支持它们的 Pi 1.5.x。
121
123
 
122
124
  ## 推荐搭配
123
125
 
@@ -129,7 +131,7 @@ pi -e . # 只跑一次,不改 settings.json
129
131
 
130
132
  ## 致谢
131
133
 
132
- - 基于 [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.16(MIT),上游基线 [`5e3ef6b`](https://github.com/minuque/pi-cc-extensions/commit/5e3ef6b9f96d198f93ec242eac81ff21bebdb4e1);保留本仓库的配置迁移与兼容性补丁。
134
+ - 基于 [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.18(MIT),上游基线 [`a251f65`](https://github.com/minuque/pi-cc-extensions/commit/a251f652e8cdbb8d395b3df81ca714ed8711df5d);保留本仓库的配置迁移与兼容性补丁。
133
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)。
134
136
 
135
137
  ## 许可证
@@ -13,6 +13,8 @@ export type CompactStyleMode = "on" | "compact" | "off";
13
13
  export type DiffViewMode = "auto" | "split" | "unified";
14
14
  export type DiffIndicatorMode = "bars" | "classic" | "none";
15
15
  export type FooterGitStatsMode = "working" | "branch";
16
+ /** window: total context window; compaction: Pi's auto-compaction point; both: compaction point, window in brackets. */
17
+ export type FooterContextLimit = "window" | "compaction" | "both";
16
18
  export type FooterTokenRateMode = "average" | "live";
17
19
  export type ScrollButtonMode = "dock" | "native";
18
20
 
@@ -95,6 +97,8 @@ export type Config = {
95
97
  footerCurrencyRate: number | null;
96
98
  footerNerdIcons: boolean;
97
99
  footerGitStatsMode: FooterGitStatsMode;
100
+ /** Denominator of the context chip; compaction = contextWindow − compaction.reserveTokens. */
101
+ footerContextLimit: FooterContextLimit;
98
102
  footerHiddenKeys: string[];
99
103
  footerLine1Keys: string[];
100
104
  footerLine2Keys: string[];
@@ -108,6 +112,7 @@ const LEGACY_CONFIG_PATH = join(AGENT_DIR, "claude-code-style.json");
108
112
  export const DIFF_VIEW_MODES: DiffViewMode[] = ["auto", "split", "unified"];
109
113
  export const DIFF_INDICATOR_MODES: DiffIndicatorMode[] = ["bars", "classic", "none"];
110
114
  export const FOOTER_GIT_STATS_MODES: FooterGitStatsMode[] = ["working", "branch"];
115
+ export const FOOTER_CONTEXT_LIMITS: FooterContextLimit[] = ["window", "compaction", "both"];
111
116
  export const FOOTER_TOKEN_RATE_MODES: FooterTokenRateMode[] = ["average", "live"];
112
117
  export const SCROLL_BUTTON_MODES: ScrollButtonMode[] = ["dock", "native"];
113
118
  export const DIFF_SPLIT_MIN_WIDTH_VALUES = ["80", "100", "120", "140", "160", "180"];
@@ -178,6 +183,7 @@ export const DEFAULT_CONFIG: Config = {
178
183
  footerCurrencyRate: null,
179
184
  footerNerdIcons: true,
180
185
  footerGitStatsMode: "working",
186
+ footerContextLimit: "window",
181
187
  ...DEFAULT_FOOTER_CHIP_LAYOUT,
182
188
  };
183
189
 
@@ -329,6 +335,11 @@ export function normalizeConfig(input: unknown): Config {
329
335
  FOOTER_GIT_STATS_MODES,
330
336
  DEFAULT_CONFIG.footerGitStatsMode,
331
337
  ),
338
+ footerContextLimit: pickEnum(
339
+ source.footerContextLimit,
340
+ FOOTER_CONTEXT_LIMITS,
341
+ DEFAULT_CONFIG.footerContextLimit,
342
+ ),
332
343
  ...normalizeFooterChipLayout(source),
333
344
  };
334
345
  }
@@ -433,6 +444,7 @@ export function formatConfigStatus(source: Config = config): string {
433
444
  `footerRate=${source.footerCurrencyRate ?? "-"}`,
434
445
  `footerIcons=${source.footerNerdIcons ? "nerd" : "plain"}`,
435
446
  `footerGitStats=${source.footerGitStatsMode}`,
447
+ `footerContextLimit=${source.footerContextLimit}`,
436
448
  formatFooterChipSummary(source),
437
449
  ].join(" · ");
438
450
  }
@@ -30,6 +30,7 @@ import {
30
30
  } from "../feature/shell/footer-layout.ts";
31
31
  import { applyPromptEditor, clearPromptEditor } from "../feature/shell/prompt-editor.ts";
32
32
  import { applyStartupHeader, clearStartupHeader } from "../feature/shell/startup-header.ts";
33
+ import { setInjectedKeybindings } from "../utils/keybindings.ts";
33
34
  import type { ToolGroupingHooks } from "../renderer/tool/grouping.ts";
34
35
  import {
35
36
  config,
@@ -42,6 +43,7 @@ import {
42
43
  EXPANDED_INPUT_MAX_LINES_VALUES,
43
44
  EXPANDED_OUTPUT_MAX_LINES_VALUES,
44
45
  EXPANDED_PREVIEW_MAX_LINES_VALUES,
46
+ FOOTER_CONTEXT_LIMITS,
45
47
  FOOTER_GIT_STATS_MODES,
46
48
  FOOTER_TOKEN_RATE_MODES,
47
49
  formatExcludeRenderers,
@@ -60,6 +62,7 @@ import {
60
62
  type Config,
61
63
  type DiffIndicatorMode,
62
64
  type DiffViewMode,
65
+ type FooterContextLimit,
63
66
  type FooterGitStatsMode,
64
67
  type FooterTokenRateMode,
65
68
  type ScrollButtonMode,
@@ -119,6 +122,14 @@ function footerSessionTokensDescription(enabled: boolean): string {
119
122
  : "Conversation token total hidden.";
120
123
  }
121
124
 
125
+ function footerContextLimitDescription(mode: FooterContextLimit): string {
126
+ if (mode === "compaction")
127
+ return "Context chip measures against Pi's auto-compaction point (window minus compaction.reserveTokens).";
128
+ if (mode === "both")
129
+ return "Context chip measures against the auto-compaction point and shows the full window in brackets.";
130
+ return "Context chip measures against the full model context window (default).";
131
+ }
132
+
122
133
  function footerGitStatsDescription(mode: FooterGitStatsMode): string {
123
134
  return mode === "branch"
124
135
  ? "Net changes since the merge base, including uncommitted edits. Base: origin/HEAD, then local main/master. Untracked files excluded; unavailable stats hidden."
@@ -449,12 +460,10 @@ export async function showCcstylePanel(
449
460
  return;
450
461
  }
451
462
 
452
- // 编辑器插槽只能在面板关闭后替换:面板自己就挂在 editorContainer 上,面板开着时调
453
- // setEditorComponent 会把面板踢出渲染树、done() 再也走不到,`ctx.ui.custom()` 永不落定,
454
- // 整个输入管线随之卡死。
455
- let editorPrefixChanged = false;
456
-
457
- await ctx.ui.custom((tui: any, theme: any, _keybindings: any, done: () => void) => {
463
+ // 面板是一次提问:告诉宿主 pi 在等用户输入(OSC 7501)。
464
+ const blocked = { blocked: { kind: "question", message: "Adjusting ccstyle settings" } };
465
+ await ctx.ui.custom((tui: any, theme: any, keys: any, done: () => void) => {
466
+ setInjectedKeybindings(keys);
458
467
  const modeSetting = {
459
468
  id: "mode",
460
469
  label: "Mode",
@@ -788,6 +797,13 @@ export async function showCcstylePanel(
788
797
  currentValue: config.footerGitStatsMode,
789
798
  values: FOOTER_GIT_STATS_MODES,
790
799
  };
800
+ const footerContextLimitSetting = {
801
+ id: "footerContextLimit",
802
+ label: "Context limit",
803
+ description: footerContextLimitDescription(config.footerContextLimit),
804
+ currentValue: config.footerContextLimit,
805
+ values: FOOTER_CONTEXT_LIMITS,
806
+ };
791
807
  const footerTokenRateSetting = {
792
808
  id: "footerTokenRate",
793
809
  label: "Token rate",
@@ -881,6 +897,15 @@ export async function showCcstylePanel(
881
897
  ctx.ui.notify(`Updated ${id}: ${footerCurrencyRateSetting.currentValue}`, "info");
882
898
  return;
883
899
  }
900
+ if (id === "footerContextLimit") {
901
+ updateConfig({ footerContextLimit: value as FooterContextLimit });
902
+ footerContextLimitSetting.currentValue = config.footerContextLimit;
903
+ footerContextLimitSetting.description = footerContextLimitDescription(
904
+ config.footerContextLimit,
905
+ );
906
+ ctx.ui.notify(`Updated ${id}: ${value}`, "info");
907
+ return;
908
+ }
884
909
  if (id === "footerGitStatsMode") {
885
910
  updateConfig({ footerGitStatsMode: value as FooterGitStatsMode });
886
911
  footerGitStatsSetting.currentValue = config.footerGitStatsMode;
@@ -929,7 +954,9 @@ export async function showCcstylePanel(
929
954
  editorPrefixSetting.description = enabled
930
955
  ? "Show ❯ before the input line; color follows thinking level / bash mode."
931
956
  : "Plain input line, no ❯ glyph.";
932
- editorPrefixChanged = true;
957
+ // pi 1.5.0 起 setEditorComponent 不会再把面板踢出渲染树:新编辑器等面板关闭后再出现。
958
+ if (config.enableEditorPrefix) applyPromptEditor(ctx, { force: true });
959
+ else clearPromptEditor(ctx, { force: true });
933
960
  ctx.ui.notify(`Updated ${id}: ${value}`, "info");
934
961
  return;
935
962
  }
@@ -1156,6 +1183,7 @@ export async function showCcstylePanel(
1156
1183
  label: "Footer",
1157
1184
  items: [
1158
1185
  customFooterSetting,
1186
+ footerContextLimitSetting,
1159
1187
  footerTokenRateSetting,
1160
1188
  footerTokenRateModeSetting,
1161
1189
  footerTokenRateTtftSetting,
@@ -1269,12 +1297,7 @@ export async function showCcstylePanel(
1269
1297
  tui.requestRender();
1270
1298
  },
1271
1299
  };
1272
- });
1273
- // 面板已经卸下,插槽此时替换才不会踢掉对话框。
1274
- if (editorPrefixChanged) {
1275
- if (config.enableEditorPrefix) applyPromptEditor(ctx);
1276
- else clearPromptEditor(ctx);
1277
- }
1300
+ }, blocked);
1278
1301
  // 面板卸下后主 transcript 重新挂载;再刷一次,吃掉打开期间扫树失败的切换。
1279
1302
  hooks.refreshCurrentTranscript(ctx, toolGrouping);
1280
1303
  }
@@ -11,13 +11,9 @@ import {
11
11
  type ExtensionAPI,
12
12
  type Theme,
13
13
  } from "@earendil-works/pi-coding-agent";
14
- import {
15
- getKeybindings,
16
- truncateToWidth,
17
- visibleWidth,
18
- wrapTextWithAnsi,
19
- } from "@earendil-works/pi-tui";
14
+ import { truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
20
15
  import { Box, Markdown, Spacer, Text, type Component } from "@earendil-works/pi-tui";
16
+ import { keyText } from "../utils/keybindings.ts";
21
17
  import { TOOL_CARD_BG_SLOT } from "../renderer/tool/tool-state.ts";
22
18
  import { isToolTuiFullscreen } from "../renderer/tool/names.ts";
23
19
  import {
@@ -167,8 +163,8 @@ function restoreDurationEntries(
167
163
  }
168
164
 
169
165
  function getThinkingToggleHint() {
170
- const keys = getKeybindings().getKeys("app.thinking.toggle");
171
- return keys.length > 0 ? `${keys.join("/")} to expand` : undefined;
166
+ const keys = keyText("app.thinking.toggle");
167
+ return keys.length > 0 ? `${keys} to expand` : undefined;
172
168
  }
173
169
 
174
170
  function thinkingExpandAction(): string | undefined {
@@ -11,6 +11,7 @@ import {
11
11
  import { Key, Markdown, matchesKey, visibleWidth } from "@earendil-works/pi-tui";
12
12
  import { type Color, rgbColor } from "@earendil-works/pi-tui";
13
13
  import { padLine } from "../utils/format.ts";
14
+ import { setInjectedKeybindings } from "../utils/keybindings.ts";
14
15
 
15
16
  export type ContextPart = {
16
17
  label: string;
@@ -101,7 +102,8 @@ export async function showTextPreview(
101
102
  activeContextOverlays++;
102
103
  try {
103
104
  await ctx.ui.custom(
104
- (tui, theme, _keybindings, done) => {
105
+ (tui, theme, injectedKeybindings, done) => {
106
+ setInjectedKeybindings(injectedKeybindings);
105
107
  ensureFullscreenMouseMotion(tui);
106
108
  let scrollOffset = 0;
107
109
  let pageSize = 1;
@@ -384,6 +386,7 @@ export async function showTextPreview(
384
386
  maxHeight: "80%",
385
387
  margin: 2,
386
388
  },
389
+ blocked: { kind: "question", message: "Reviewing context" },
387
390
  },
388
391
  );
389
392
  } finally {
@@ -697,7 +700,8 @@ export default function contextUsageExtension(pi: ExtensionAPI) {
697
700
  let action;
698
701
  try {
699
702
  action = await ctx.ui.custom(
700
- (tui, theme, _keybindings, done) => {
703
+ (tui, theme, injectedKeybindings, done) => {
704
+ setInjectedKeybindings(injectedKeybindings);
701
705
  ensureFullscreenMouseMotion(tui);
702
706
  let previewHitboxes: Array<{
703
707
  key: PreviewKey;
@@ -905,6 +909,7 @@ export default function contextUsageExtension(pi: ExtensionAPI) {
905
909
  maxHeight: "90%",
906
910
  margin: 1,
907
911
  },
912
+ blocked: { kind: "question", message: "Reviewing context" },
908
913
  },
909
914
  );
910
915
  } finally {