@herbertgao/pi-extensions 2026.11.2 → 2026.11.4
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 +19 -0
- package/README.md +13 -13
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +12 -0
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +109 -16
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +33 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/ccstyle-tool.ts +72 -17
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/write-execution.ts +5 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +10 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-io.ts +16 -7
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +7 -5
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-dark-hc.json +92 -0
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-light-hc.json +92 -0
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +12 -10
- package/node_modules/@herbertgao/pi-subagents/docs/rpc.md +1 -1
- package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/src/agent-record-entry.ts +22 -6
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +9 -4
- package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +167 -7
- package/node_modules/@herbertgao/pi-subagents/src/ui/viewer-keys.ts +8 -4
- package/node_modules/@narumitw/pi-btw/CHANGELOG.md +259 -0
- package/node_modules/@narumitw/pi-btw/package.json +6 -5
- package/node_modules/@narumitw/pi-caffeinate/CHANGELOG.md +70 -0
- package/node_modules/@narumitw/pi-caffeinate/package.json +5 -4
- package/node_modules/pi-commandcode-provider/CHANGELOG.md +48 -0
- package/node_modules/pi-commandcode-provider/CONTRIBUTING.md +64 -5
- package/node_modules/pi-commandcode-provider/README.md +44 -18
- package/node_modules/pi-commandcode-provider/RELEASE.md +25 -0
- package/node_modules/pi-commandcode-provider/index.ts +222 -42
- package/node_modules/pi-commandcode-provider/package.json +9 -8
- package/node_modules/pi-commandcode-provider/scripts/live-e2e-profile.mjs +6 -13
- package/node_modules/pi-commandcode-provider/scripts/typecheck-entrypoint.mjs +88 -0
- package/node_modules/pi-commandcode-provider/src/api-key.ts +67 -10
- package/node_modules/pi-commandcode-provider/src/auth-server.ts +33 -24
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog-overrides.ts +1 -1
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +9 -2
- package/node_modules/pi-commandcode-provider/src/cost.ts +29 -43
- package/node_modules/pi-commandcode-provider/src/diagnostics.ts +215 -0
- package/node_modules/pi-commandcode-provider/src/oauth.ts +41 -7
- package/node_modules/pi-commandcode-provider/src/pricing.ts +5 -3
- package/node_modules/pi-commandcode-provider/src/quota-command.ts +1 -1
- package/node_modules/pi-commandcode-provider/src/routing.ts +166 -0
- package/node_modules/pi-commandcode-provider/src/runtime.ts +23 -10
- package/node_modules/pi-commandcode-provider/src/transport.ts +82 -85
- package/node_modules/pi-commandcode-provider/src/types.ts +20 -39
- package/node_modules/pi-commandcode-provider/src/usage.ts +1 -1
- package/node_modules/pi-lens/CHANGELOG-USER.md +31 -0
- package/node_modules/pi-lens/CHANGELOG.md +178 -0
- package/node_modules/pi-lens/README.md +2 -1
- package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +1 -1
- package/node_modules/pi-lens/dist/{chunk-3O5EII3W.js → chunk-2VZ3VN3N.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-SDFKOLSF.js → chunk-3HTZDY3C.js} +8 -6
- package/node_modules/pi-lens/dist/{chunk-A5GRLYPZ.js → chunk-3NPWO5UO.js} +7 -13
- package/node_modules/pi-lens/dist/{chunk-AGGUWKRK.js → chunk-47UCC4MM.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-4ENEJHF4.js +198 -0
- package/node_modules/pi-lens/dist/{chunk-WXUDRAG6.js → chunk-5GEYJJHG.js} +10 -12
- package/node_modules/pi-lens/dist/{chunk-HHR7WGCI.js → chunk-5YSEQHJN.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-L3CLUGDY.js → chunk-6GPB3JLL.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-5F3XF3SX.js → chunk-7R5GZIA6.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-CUDD35TW.js → chunk-7UTSNTWM.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-DYRZGUMA.js → chunk-7YTRG6YW.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-JZRP4DGP.js → chunk-AACN5GNE.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-7ANZ7XDD.js → chunk-ACRJ2GZ5.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6FIRFP6A.js → chunk-C3YRO3EU.js} +10 -12
- package/node_modules/pi-lens/dist/{chunk-GMROJJRN.js → chunk-CB7PEVOJ.js} +9 -1
- package/node_modules/pi-lens/dist/{chunk-BBET6HD6.js → chunk-CDFJF5YD.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-NSPVR3FN.js → chunk-CJS6WE66.js} +17 -19
- package/node_modules/pi-lens/dist/{chunk-6YUNI7B5.js → chunk-CM6BDY4E.js} +14 -60
- package/node_modules/pi-lens/dist/{chunk-G5GV2Q7K.js → chunk-CZCAZVTD.js} +16 -2
- package/node_modules/pi-lens/dist/chunk-DGKFWQK4.js +23 -0
- package/node_modules/pi-lens/dist/{chunk-VOP4PJKA.js → chunk-E65WJVI5.js} +7 -9
- package/node_modules/pi-lens/dist/{chunk-TV6RXRYH.js → chunk-EKNYSXFB.js} +8 -10
- package/node_modules/pi-lens/dist/{chunk-4LL2VRNY.js → chunk-EY6LY2HO.js} +16 -18
- package/node_modules/pi-lens/dist/{chunk-MC6VB2E5.js → chunk-F6BEQWAK.js} +17 -5
- package/node_modules/pi-lens/dist/{chunk-R2QQC33W.js → chunk-FGNSESAC.js} +12 -14
- package/node_modules/pi-lens/dist/{chunk-OC7VWJBZ.js → chunk-FRUBVFXV.js} +35 -37
- package/node_modules/pi-lens/dist/{chunk-7CGIDRIK.js → chunk-G22UNQID.js} +14 -16
- package/node_modules/pi-lens/dist/{chunk-L4NEVZ4T.js → chunk-GQTQUNCG.js} +25 -27
- package/node_modules/pi-lens/dist/{chunk-ZKLTNLAW.js → chunk-H3BVMK47.js} +6 -6
- package/node_modules/pi-lens/dist/chunk-H6FLQ5NW.js +28 -0
- package/node_modules/pi-lens/dist/{chunk-2ZE3AUJQ.js → chunk-HEA3EM23.js} +13 -15
- package/node_modules/pi-lens/dist/{chunk-CZL44WFN.js → chunk-HSOBIN22.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-PKSUMEPT.js → chunk-HYSKJMZK.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-VN3L2JWZ.js → chunk-IICERRFF.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-O4N5BQ3T.js → chunk-IILEH3ZC.js} +8 -10
- package/node_modules/pi-lens/dist/{chunk-WC6WRNQT.js → chunk-J3Q2NYJR.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-SFLHSL5R.js → chunk-JUZ67QZQ.js} +18 -7
- package/node_modules/pi-lens/dist/chunk-KR5VGMVT.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-UHHLR2VY.js → chunk-KV6GQOGN.js} +38 -41
- package/node_modules/pi-lens/dist/{chunk-HUAM7QG3.js → chunk-KXMJLOZF.js} +25 -23
- package/node_modules/pi-lens/dist/{chunk-BUZIQDFS.js → chunk-L4Y3ROKQ.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-JBP7KESM.js → chunk-L6WBJGQS.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-35WKJWO5.js → chunk-L7O774U7.js} +14 -14
- package/node_modules/pi-lens/dist/{chunk-BOPDQ7AZ.js → chunk-LAHHGNAY.js} +19 -21
- package/node_modules/pi-lens/dist/{chunk-RGGH6M34.js → chunk-LT62P654.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-5T5A6YAJ.js → chunk-LWOM6LVS.js} +33 -34
- package/node_modules/pi-lens/dist/{chunk-JYLOYTZD.js → chunk-MKPDIAZH.js} +5 -1
- package/node_modules/pi-lens/dist/{chunk-CM73PPGD.js → chunk-MN635QYA.js} +3 -4
- package/node_modules/pi-lens/dist/{chunk-BQG2QFVO.js → chunk-MQ4PPCJB.js} +21 -29
- package/node_modules/pi-lens/dist/{chunk-HXFUTMX2.js → chunk-MRLH4MYU.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-XOMGO63G.js → chunk-N56BNAA6.js} +19 -21
- package/node_modules/pi-lens/dist/{chunk-7MAD5ZAY.js → chunk-N5CEGQPG.js} +14 -16
- package/node_modules/pi-lens/dist/{chunk-ZFORSIED.js → chunk-NCLO6E6N.js} +13 -33
- package/node_modules/pi-lens/dist/{chunk-SQC7K3SP.js → chunk-NL5LSKVD.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-I22THIHI.js → chunk-NMUSOZ2D.js} +10 -12
- package/node_modules/pi-lens/dist/{chunk-4NBWFYWW.js → chunk-NOWH2VA2.js} +8 -33
- package/node_modules/pi-lens/dist/{chunk-NM2NWH55.js → chunk-NUSXS6YB.js} +6 -5
- package/node_modules/pi-lens/dist/{chunk-OZWXLJMX.js → chunk-OSEKJEUU.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-2BKUFQKR.js → chunk-OUYAUXAT.js} +405 -181
- package/node_modules/pi-lens/dist/{chunk-JPRDTY5S.js → chunk-PBZNYHMM.js} +8 -10
- package/node_modules/pi-lens/dist/{chunk-JE6HKLC7.js → chunk-PIIUNJIT.js} +2 -4
- package/node_modules/pi-lens/dist/{chunk-ZZDIOAAJ.js → chunk-PRHYIA6X.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-4W52ZKZX.js → chunk-PXQ45SGD.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-Q6JQKWPK.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-PIQQM32Y.js → chunk-QB7T2PHK.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-HKIL6DCL.js → chunk-QGITU23N.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-QJJKOHLH.js +57 -0
- package/node_modules/pi-lens/dist/{chunk-6LJOJ6EO.js → chunk-QP33NKYC.js} +14 -16
- package/node_modules/pi-lens/dist/{chunk-DIWK3LBC.js → chunk-QVBOXT3L.js} +8 -10
- package/node_modules/pi-lens/dist/{chunk-IYVYZQRL.js → chunk-RNJFRXEN.js} +5 -7
- package/node_modules/pi-lens/dist/{chunk-G6JKM4O7.js → chunk-RNXOWDM6.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-5RNB4HVK.js → chunk-RTFMDIKV.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-XWIME22V.js → chunk-SIQHOB6P.js} +11 -13
- package/node_modules/pi-lens/dist/{chunk-T2S3FNNJ.js → chunk-SLSMJPEF.js} +41 -42
- package/node_modules/pi-lens/dist/chunk-T5QSLSMM.js +50 -0
- package/node_modules/pi-lens/dist/chunk-TGQDAG4B.js +88 -0
- package/node_modules/pi-lens/dist/{chunk-6GMGEKQN.js → chunk-THYHUIDR.js} +39 -12
- package/node_modules/pi-lens/dist/{chunk-WMDUT4KH.js → chunk-TMNUTMT5.js} +72 -89
- package/node_modules/pi-lens/dist/{chunk-7TNILKGY.js → chunk-TOE2RRCS.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-TYHPVE5H.js +25 -0
- package/node_modules/pi-lens/dist/chunk-UAKO2M6B.js +73 -0
- package/node_modules/pi-lens/dist/chunk-UC5AXW5Z.js +20 -0
- package/node_modules/pi-lens/dist/chunk-UTJP6WOS.js +28 -0
- package/node_modules/pi-lens/dist/{chunk-FRLAUP2B.js → chunk-UXTQ3QPD.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-4QG55RRC.js → chunk-V2WDBOLZ.js} +10 -12
- package/node_modules/pi-lens/dist/{chunk-FHEV6T4L.js → chunk-V67D6TMU.js} +8 -10
- package/node_modules/pi-lens/dist/{chunk-VLQ7UKZH.js → chunk-VCRVNLE7.js} +135 -2
- package/node_modules/pi-lens/dist/{chunk-KZ4ALBCH.js → chunk-VO4JFPTV.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-GIRBSBGL.js → chunk-VWLSU3XV.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-2453RRJ2.js → chunk-W5E72HJA.js} +59 -22
- package/node_modules/pi-lens/dist/{chunk-VPLBLWFO.js → chunk-W7TY6HYX.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-SP4TFY5F.js → chunk-WSSLVMDA.js} +11 -13
- package/node_modules/pi-lens/dist/{chunk-PPKECBPP.js → chunk-WTB4GKMH.js} +10 -1
- package/node_modules/pi-lens/dist/{chunk-X35S7HSB.js → chunk-X5BJ3G2P.js} +41 -30
- package/node_modules/pi-lens/dist/{chunk-X66YJ2SS.js → chunk-XKFO2SZV.js} +33 -34
- package/node_modules/pi-lens/dist/{chunk-OWTG6UMO.js → chunk-XLAI7UYY.js} +75 -22
- package/node_modules/pi-lens/dist/{chunk-4B2YFN4U.js → chunk-XO756WE5.js} +45 -33
- package/node_modules/pi-lens/dist/{chunk-VOXTCULR.js → chunk-XVB3Q2PG.js} +2 -4
- package/node_modules/pi-lens/dist/{chunk-XYLC35E4.js → chunk-YOXCCJDF.js} +517 -308
- package/node_modules/pi-lens/dist/{chunk-O2ARHQKF.js → chunk-ZCQBNPRH.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-ZD4KVFXI.js +234 -0
- package/node_modules/pi-lens/dist/{chunk-LSFXZLPW.js → chunk-ZDMFGACN.js} +184 -235
- package/node_modules/pi-lens/dist/{chunk-4BKU7PV3.js → chunk-ZMMHHXSW.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-OY7WZI7Q.js → chunk-ZPM7ZIFL.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-R4QWJQ2H.js → chunk-ZVCDHYWZ.js} +9 -11
- package/node_modules/pi-lens/dist/{chunk-RZG472YW.js → chunk-ZZN74OGD.js} +83 -46
- package/node_modules/pi-lens/dist/{chunk-BHWW6FAX.js → chunk-ZZSJAR76.js} +37 -19
- package/node_modules/pi-lens/dist/index.js +4910 -4218
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +12 -17
- package/node_modules/pi-lens/dist/mcp/cli.js +41 -42
- package/node_modules/pi-lens/dist/mcp/server.js +1451 -648
- package/node_modules/pi-lens/dist/mcp/worker.js +59 -60
- package/node_modules/pi-lens/dist/probes/installer.js +17 -19
- package/node_modules/pi-lens/docs/agent-tools.md +40 -8
- package/node_modules/pi-lens/docs/analysisall.md +1 -1
- package/node_modules/pi-lens/docs/ci-bot-pr-checks.md +7 -5
- package/node_modules/pi-lens/docs/configuration.md +51 -9
- package/node_modules/pi-lens/docs/defect-shapes.md +52 -3
- package/node_modules/pi-lens/docs/environment-variables.md +18 -1
- package/node_modules/pi-lens/docs/features.md +12 -5
- package/node_modules/pi-lens/docs/globalconfig.md +11 -3
- package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +9 -2
- package/node_modules/pi-lens/docs/invariants/session-telemetry.md +2 -2
- package/node_modules/pi-lens/docs/language-coverage.md +1 -0
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +57 -35
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +4 -1
- package/node_modules/pi-lens/docs/merge-queue-rollout.md +10 -8
- package/node_modules/pi-lens/docs/module-report-read-symbol.md +34 -23
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +11 -1
- package/node_modules/pi-lens/docs/pi-lens-investigator.md +3 -0
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +15 -7
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +1 -1
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +13 -0
- package/node_modules/pi-lens/docs/public-api-stability.md +39 -5
- package/node_modules/pi-lens/docs/release-qa-baseline.md +7 -4
- package/node_modules/pi-lens/docs/schema/pi-lens-config-v1.json +11 -2
- package/node_modules/pi-lens/docs/servercapabilities.md +3 -1
- package/node_modules/pi-lens/docs/settings.md +2 -2
- package/node_modules/pi-lens/docs/word-index.md +3 -2
- package/node_modules/pi-lens/package.json +8 -3
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +1 -2
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +1 -2
- package/node_modules/pi-lens/scripts/download-grammars.js +3 -2
- package/node_modules/pi-lens/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
- package/node_modules/pi-provider-qoder/dist/index.js +473 -62
- package/node_modules/pi-provider-qoder/package.json +1 -1
- package/node_modules/pi-web-access/CHANGELOG.md +22 -0
- package/node_modules/pi-web-access/README.md +31 -12
- package/node_modules/pi-web-access/curator-page.ts +5 -1
- package/node_modules/pi-web-access/curator-server.ts +2 -0
- package/node_modules/pi-web-access/dist/index.js +673 -308
- package/node_modules/pi-web-access/dist/mcp-cli.js +666 -309
- package/node_modules/pi-web-access/gemini-search.ts +12 -4
- package/node_modules/pi-web-access/github-api.ts +1 -1
- package/node_modules/pi-web-access/github-extract.ts +3 -2
- package/node_modules/pi-web-access/index.ts +7 -3
- package/node_modules/pi-web-access/mcp-tool-definitions.ts +1 -1
- package/node_modules/pi-web-access/outcrawl.ts +204 -0
- package/node_modules/pi-web-access/package.json +2 -2
- package/node_modules/pi-web-access/sofya.ts +201 -0
- package/node_modules/pi-web-access/utils.ts +16 -6
- package/node_modules/pi-web-access/web-tool-core.ts +4 -0
- package/package.json +16 -14
- package/node_modules/pi-commandcode-provider/src/converters.ts +0 -477
- package/node_modules/pi-commandcode-provider/src/core.ts +0 -836
- package/node_modules/pi-commandcode-provider/src/json-schema.ts +0 -417
- package/node_modules/pi-commandcode-provider/src/transcript.ts +0 -56
- package/node_modules/pi-lens/dist/chunk-2TS4GLOJ.js +0 -31
- package/node_modules/pi-lens/dist/chunk-3JAHQBSY.js +0 -27
- package/node_modules/pi-lens/dist/chunk-447YZL4S.js +0 -25
- package/node_modules/pi-lens/dist/chunk-565VRUP4.js +0 -136
- package/node_modules/pi-lens/dist/chunk-57X2CDRX.js +0 -49
- package/node_modules/pi-lens/dist/chunk-GGYOZWHW.js +0 -27
- package/node_modules/pi-lens/dist/chunk-IE5D3RA5.js +0 -58
- package/node_modules/pi-lens/dist/chunk-LPYTPNOJ.js +0 -22
- package/node_modules/pi-lens/dist/chunk-OFNMHPBT.js +0 -89
- package/node_modules/pi-lens/dist/chunk-U3AS2FR6.js +0 -106
- package/node_modules/pi-lens/dist/chunk-W3BGKBBK.js +0 -27
- package/node_modules/pi-lens/dist/chunk-WQV6BI4Q.js +0 -48
- package/node_modules/pi-lens/dist/chunk-YHGYAEFH.js +0 -443
- package/node_modules/pi-lens/dist/chunk-ZONZ6YY3.js +0 -74
- package/node_modules/pi-lens/dist/chunk-ZSM35JF4.js +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @herbertgao/pi-extensions
|
|
2
2
|
|
|
3
|
+
## 2026.11.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#356](https://github.com/HerbertGao/pi-extensions/pull/356) [`b167a96`](https://github.com/HerbertGao/pi-extensions/commit/b167a9639df433cd722fb12b7fb6368404178a0a) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Pin pi-lens 4.4.9, pi-provider-qoder 0.6.12, and pi-commandcode-provider 0.8.0. Groovy files classify as Groovy. A cut-off Qoder tool-call argument stream is a retryable server error. Command Code stays on the Provider API and does not fall back to the generate transport.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`b167a96`](https://github.com/HerbertGao/pi-extensions/commit/b167a9639df433cd722fb12b7fb6368404178a0a)]:
|
|
10
|
+
- @herbertgao/pi-cc-extensions@1.1.0
|
|
11
|
+
|
|
12
|
+
## 2026.11.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#353](https://github.com/HerbertGao/pi-extensions/pull/353) [`d7118e9`](https://github.com/HerbertGao/pi-extensions/commit/d7118e94347a57977fdaaedd81ea8bd6a02f5976) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Pin pi-btw 0.63.4, pi-caffeinate 0.49.14, pi-commandcode-provider 0.7.12, and pi-web-access 0.47.0. Searchable BTW choices keep page scrolling. Sofya and Outcrawl stay explicit-only, a locked proxy cannot be skipped, and Command Code taste learning stays opt-in.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`d7118e9`](https://github.com/HerbertGao/pi-extensions/commit/d7118e94347a57977fdaaedd81ea8bd6a02f5976), [`d7118e9`](https://github.com/HerbertGao/pi-extensions/commit/d7118e94347a57977fdaaedd81ea8bd6a02f5976)]:
|
|
19
|
+
- @herbertgao/pi-cc-extensions@1.0.13
|
|
20
|
+
- @herbertgao/pi-subagents@0.23.0
|
|
21
|
+
|
|
3
22
|
## 2026.11.2
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -21,12 +21,12 @@ 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.11.0`
|
|
24
|
-
- `pi-commandcode-provider@0.
|
|
25
|
-
- `pi-provider-qoder@0.6.
|
|
24
|
+
- `pi-commandcode-provider@0.8.0`
|
|
25
|
+
- `pi-provider-qoder@0.6.12`
|
|
26
26
|
- `@dietrichgebert/ponytail@5.3.3`
|
|
27
27
|
- `@juicesharp/rpiv-ask-user-question@2.15.0`
|
|
28
|
-
- `@narumitw/pi-btw@0.63.
|
|
29
|
-
- `@narumitw/pi-caffeinate@0.49.
|
|
28
|
+
- `@narumitw/pi-btw@0.63.4`
|
|
29
|
+
- `@narumitw/pi-caffeinate@0.49.14`
|
|
30
30
|
- `@pi-plugins/fast-mode@0.1.14`
|
|
31
31
|
- `@tifan/pi-copy-response@0.2.7`
|
|
32
32
|
- `@tifan/pi-handoff@2.2.2`
|
|
@@ -36,14 +36,14 @@ The package bundles 6 active `@herbertgao/*` child packages—`pi-agency`, `pi-b
|
|
|
36
36
|
- `@tintinweb/pi-tasks@0.9.1`
|
|
37
37
|
- `pi-typesafe@0.14.0`
|
|
38
38
|
- `pi-next-cue@1.0.8`
|
|
39
|
-
- `pi-lens@4.4.
|
|
40
|
-
- `pi-web-access@0.
|
|
39
|
+
- `pi-lens@4.4.9`
|
|
40
|
+
- `pi-web-access@0.47.0`
|
|
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.15`; 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
|
-
Antigravity `0.11.0` enriches search citations by visiting source sites by default (`ANTIGRAVITY_NO_SOURCE_ENRICH=1` disables enrichment). 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.
|
|
46
|
+
Antigravity `0.11.0` enriches search citations by visiting source sites by default (`ANTIGRAVITY_NO_SOURCE_ENRICH=1` disables enrichment). 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
|
|
|
@@ -57,13 +57,13 @@ Impeccable `4.8.0` is vendored as `@herbertgao/pi-impeccable` and loaded with `/
|
|
|
57
57
|
|
|
58
58
|
`@herbertgao/pi-bark` sends localized Bark pushes when a user-facing Pi run fully settles or `@juicesharp/rpiv-ask-user-question` needs an answer. Notifications include emoji-labeled machine/path metadata and support the bundled official Pi badge through Bark's `icon` parameter. Configure it in `$PI_CODING_AGENT_DIR/bark.json` (normally `~/.pi/agent/bark.json`); see the [package README](../pi-bark/README.md). Without a valid endpoint it stays inactive.
|
|
59
59
|
|
|
60
|
-
`@narumitw/pi-caffeinate@0.49.
|
|
60
|
+
`@narumitw/pi-caffeinate@0.49.14` 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 now depends on `@narumitw/pi-tui-kit@^0.69.0`, the same install BTW uses, and on `dbus-native@^0.16.3`.
|
|
61
61
|
|
|
62
|
-
`@narumitw/pi-btw@0.63.
|
|
62
|
+
`@narumitw/pi-btw@0.63.4` opens its side workspace through the `@narumitw/pi-tui-kit@^0.69.0` fullscreen handoff. It does not start that UI when the flow is already 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. 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.
|
|
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.
|
|
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.9` 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. It promotes `@ast-grep/cli` to `0.51.0` and `@ast-grep/napi` to `^0.51.0`. 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.11.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. `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.0` 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.
|
|
84
|
+
`pi-commandcode-provider@0.8.0` 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. On first start without a cache, model discovery waits for `https://api.commandcode.ai/provider/v1/models` and still loads if that request fails. 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. 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
|
|
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.
|
|
190
|
+
The aggregate bundles [`pi-commandcode-provider`](https://github.com/patlux/pi-commandcode-provider) version 0.8.0 under its original MIT license. The imported npm package corresponds to upstream tag `v0.8.0` at commit [`d779459494e9b1b7e8419cc53587878e89e36520`](https://github.com/patlux/pi-commandcode-provider/commit/d779459494e9b1b7e8419cc53587878e89e36520). npm publishes no gitHead; the published tarball matches that tag.
|
|
191
191
|
|
|
192
192
|
MIT License
|
|
193
193
|
|
|
@@ -213,7 +213,7 @@ 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.12 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 [`a8de674d2fdc1f7715ab8d794e51e8e620469ed9`](https://github.com/simonsmh/pi-provider-qoder/commit/a8de674d2fdc1f7715ab8d794e51e8e620469ed9).
|
|
217
217
|
|
|
218
218
|
## `@herbertgao/pi-impeccable`
|
|
219
219
|
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @herbertgao/pi-cc-extensions
|
|
2
2
|
|
|
3
|
+
## 1.0.15-local.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#356](https://github.com/HerbertGao/pi-extensions/pull/356) [`b167a96`](https://github.com/HerbertGao/pi-extensions/commit/b167a9639df433cd722fb12b7fb6368404178a0a) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Replay upstream pi-cc-extensions 1.0.15. A running tool can expand to its full command and live output, and the package includes CC Dark HC and CC Light HC. Expanding a card in the lower half of the screen keeps following. Regular mode still does not enable terminal mouse reporting.
|
|
8
|
+
|
|
9
|
+
## 1.0.14-local.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#353](https://github.com/HerbertGao/pi-extensions/pull/353) [`d7118e9`](https://github.com/HerbertGao/pi-extensions/commit/d7118e94347a57977fdaaedd81ea8bd6a02f5976) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Finish a compact summary from the turn's real activity and place it above the exposed lines. An abort during the pre-write snapshot still prevents the file from being written. A write that already reached disk still reports success.
|
|
14
|
+
|
|
3
15
|
## 1.0.13-local.1
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -34,7 +34,7 @@ Run `/reload` after installation.
|
|
|
34
34
|
| Context inspection | Usage breakdown and previews for the system prompt, memory, skills, tools definition, and messages | `/context` |
|
|
35
35
|
| Session/Subagent references | Search and inject effective context from previous Sessions or existing SubAgents | `@` |
|
|
36
36
|
| Status bar | Shows model, context, cache, cost, the conversation token total, and git; also works with `@narumitw/pi-usage` for live quota. Git/cache Nerd Font icons can be turned off | `/ccstyle` |
|
|
37
|
-
| Theme | Bundled CC Dark
|
|
37
|
+
| Theme | Bundled themes: CC Dark, CC Light, CC Dark HC, CC Light HC | `/settings` → Theme |
|
|
38
38
|
|
|
39
39
|
Renderer snapshots for `on` / `compact` modes: [default](./docs/tool-render-examples-default.md) · [compact](./docs/tool-render-examples-compact.md)
|
|
40
40
|
|
|
@@ -128,7 +128,7 @@ pi -e . # one run, does not edit settings.json
|
|
|
128
128
|
|
|
129
129
|
## Credits
|
|
130
130
|
|
|
131
|
-
- Based on [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.
|
|
131
|
+
- Based on [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.15 (MIT), upstream baseline [`b996151`](https://github.com/minuque/pi-cc-extensions/commit/b996151bb63028c270340bde3e9526a62c634d2f), with this repository's configuration migration and compatibility patches retained.
|
|
132
132
|
- 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).
|
|
133
133
|
|
|
134
134
|
## License
|
|
@@ -34,7 +34,7 @@ pi install git:github.com/HerbertGao/pi-extensions
|
|
|
34
34
|
| 上下文检查 | 查看上下文占用,并预览 System prompt、Memory、Skills、Tools definition 和消息内容 | `/context` |
|
|
35
35
|
| Session/Subagent 引用 | 搜索并注入历史 Session 或现有 SubAgent 的有效上下文 | `@` |
|
|
36
36
|
| 状态栏 | 显示:模型、上下文、缓存、费用、本次对话累计 token、git并适配 @narumitw/pi-usage 实时显示额度;git/缓存图标可关 Nerd Font | `/ccstyle` |
|
|
37
|
-
| 主题 |
|
|
37
|
+
| 主题 | 随包提供 4 个主题:CC Dark、CC Light、CC Dark HC、CC Light HC | `/settings` → Theme |
|
|
38
38
|
|
|
39
39
|
`on` / `compact` 两种模式的渲染样例:[默认模式](./docs/tool-render-examples-default.md) · [紧凑模式](./docs/tool-render-examples-compact.md)
|
|
40
40
|
|
|
@@ -128,7 +128,7 @@ pi -e . # 只跑一次,不改 settings.json
|
|
|
128
128
|
|
|
129
129
|
## 致谢
|
|
130
130
|
|
|
131
|
-
- 基于 [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.
|
|
131
|
+
- 基于 [`minuque/pi-cc-extensions`](https://github.com/minuque/pi-cc-extensions) 1.0.15(MIT),上游基线 [`b996151`](https://github.com/minuque/pi-cc-extensions/commit/b996151bb63028c270340bde3e9526a62c634d2f);保留本仓库的配置迁移与兼容性补丁。
|
|
132
132
|
- 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)。
|
|
133
133
|
|
|
134
134
|
## 许可证
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* Agent/Task 族:调用只进摘要计数,tool 卡始终折叠(避免 pending→完成高度闪动)。
|
|
9
9
|
* edit/write 与 ask_user_question 留在外层:不进摘要计数,折叠态也单独成行。
|
|
10
10
|
* 外层行一旦在消息里出现,当前回合就地完结(不计静默期),后续消息另起回合:
|
|
11
|
-
*
|
|
11
|
+
* 摘要行因此只折叠连续的一段工具调用。收尾后本回合的外层行排在摘要行之下,
|
|
12
|
+
* 摘要行覆盖的是它们之前的工具段;回合还在跑时它们留在原位,摘要行钉在可写底缘。
|
|
12
13
|
* 用户消息是回合的硬边界:steer 消息插进回合中间、或上一回合没正文就收尾时,回合
|
|
13
14
|
* 就地收口、后续消息另起一回合。custom 通知/summary 类组件既不是成员也不算外来行,
|
|
14
15
|
* 原地留在两段之间,不打断统计也不被挪位。
|
|
@@ -1211,6 +1212,8 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1211
1212
|
liveSlotToolIds: Set<string>;
|
|
1212
1213
|
/** 收尾后的静默期截止时间戳;期间仍按围观态渲染,到点才收拢。 */
|
|
1213
1214
|
settleUntil?: number;
|
|
1215
|
+
/** 已请求收尾但回合还有活干(消息仍在流式、工具还在跑):活干完再兑现。 */
|
|
1216
|
+
endRequest?: { endTimestamp?: number };
|
|
1214
1217
|
/** 消息已有 toolCall、工具组件还没到:等它一 updateDisplay 就重画槽位。 */
|
|
1215
1218
|
pendingLiveTool?: boolean;
|
|
1216
1219
|
foldTimer?: ReturnType<typeof setTimeout>;
|
|
@@ -1235,6 +1238,19 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1235
1238
|
let idleRef: (() => boolean) | undefined = deps.isIdle;
|
|
1236
1239
|
let roundTickTimer: ReturnType<typeof setInterval> | undefined;
|
|
1237
1240
|
|
|
1241
|
+
/** 本进程见过的回合:活动回合、本次 pass 建起的、收尾静默期的、还挂着尾行的。 */
|
|
1242
|
+
const allRounds = (): CompactRound[] => {
|
|
1243
|
+
const rounds = new Set<CompactRound>();
|
|
1244
|
+
if (activeRound) rounds.add(activeRound);
|
|
1245
|
+
for (const round of liveRounds) rounds.add(round);
|
|
1246
|
+
for (const round of pendingFoldRounds) rounds.add(round);
|
|
1247
|
+
for (const tail of mountedTails) {
|
|
1248
|
+
const round = tail.round as CompactRound | undefined;
|
|
1249
|
+
if (round) rounds.add(round);
|
|
1250
|
+
}
|
|
1251
|
+
return [...rounds];
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1238
1254
|
/** 会话是否空闲:回合活性的事实来源,取不到就当没空闲(宁可保留 Running)。 */
|
|
1239
1255
|
const sessionIdle = (): boolean => {
|
|
1240
1256
|
try {
|
|
@@ -1263,14 +1279,23 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1263
1279
|
roundTickTimer = undefined;
|
|
1264
1280
|
};
|
|
1265
1281
|
|
|
1282
|
+
/** 还有回合要盯就得继续 tick:活动回合的时长要跳,挂起的收尾请求要等活干完。 */
|
|
1283
|
+
const roundTickNeeded = (): boolean => {
|
|
1284
|
+
for (const round of allRounds()) {
|
|
1285
|
+
if (round.active || round.endRequest !== undefined) return true;
|
|
1286
|
+
}
|
|
1287
|
+
return false;
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1266
1290
|
// 自备 tick:getter 在 render 重算挂钟;兼驱动 Running 扫光(setCompactSummaryActive)。
|
|
1267
1291
|
const ensureRoundTick = (): void => {
|
|
1268
1292
|
if (roundTickTimer) return;
|
|
1269
1293
|
roundTickTimer = setInterval(() => {
|
|
1270
|
-
if (!patch.active || !
|
|
1294
|
+
if (!patch.active || !roundTickNeeded()) {
|
|
1271
1295
|
stopRoundTick();
|
|
1272
1296
|
return;
|
|
1273
1297
|
}
|
|
1298
|
+
for (const round of allRounds()) retryDeferredFinalize(round);
|
|
1274
1299
|
settleStrandedRounds();
|
|
1275
1300
|
try {
|
|
1276
1301
|
// 非 force:保留 fullscreen 布局缓存和差分绘制。
|
|
@@ -1302,9 +1327,15 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1302
1327
|
value <= Date.now() + 60_000;
|
|
1303
1328
|
|
|
1304
1329
|
/** 结束回合活动态;不做任何重绘。更晚的消息 timestamp 用来保住回放时长;
|
|
1305
|
-
* 同一条消息的 timestamp 不动,活回合改用本进程挂钟,避免把历史 timestamp 收到「现在」。
|
|
1306
|
-
|
|
1330
|
+
* 同一条消息的 timestamp 不动,活回合改用本进程挂钟,避免把历史 timestamp 收到「现在」。
|
|
1331
|
+
* 回合还有活干时只记下收尾请求:提前翻成 Ran for 会把仍在跑的工具报成已结束。 */
|
|
1332
|
+
const finalizeRound = (round: CompactRound, endTimestamp?: number): boolean => {
|
|
1307
1333
|
clearFoldTimer(round);
|
|
1334
|
+
if (roundHasLiveWork(round)) {
|
|
1335
|
+
round.endRequest ??= { endTimestamp };
|
|
1336
|
+
return false;
|
|
1337
|
+
}
|
|
1338
|
+
round.endRequest = undefined;
|
|
1308
1339
|
round.active = false;
|
|
1309
1340
|
if (round.endedAt === undefined) {
|
|
1310
1341
|
let fallback = 0;
|
|
@@ -1321,22 +1352,26 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1321
1352
|
}
|
|
1322
1353
|
if (activeRound === round) {
|
|
1323
1354
|
activeRound = undefined;
|
|
1324
|
-
|
|
1325
|
-
|
|
1355
|
+
// 还有回合在跑(另一个活动回合或挂起的收尾):扫光与 tick 不能跟着一起停。
|
|
1356
|
+
const stillLive = roundTickNeeded();
|
|
1357
|
+
deps.query?.setCompactSummaryActive?.(stillLive);
|
|
1358
|
+
if (!stillLive) stopRoundTick();
|
|
1326
1359
|
}
|
|
1360
|
+
return true;
|
|
1327
1361
|
};
|
|
1328
1362
|
|
|
1329
1363
|
/**
|
|
1330
1364
|
* 结束回合活动态;render=true 时走静默期,延迟 FOLD_SETTLE_MS 再收拢。
|
|
1331
1365
|
* 分组语义不受影响:activeRound 立即让位,新消息不会被并进已收尾的回合。
|
|
1366
|
+
* 还有活干时整段跳过:回合保持 live,等活干完再收尾。
|
|
1332
1367
|
*/
|
|
1333
1368
|
const endRound = (round: CompactRound, render = false, endTimestamp?: number): void => {
|
|
1334
|
-
|
|
1335
|
-
|
|
1369
|
+
const wasActive = round.active;
|
|
1370
|
+
if (!finalizeRound(round, endTimestamp)) return;
|
|
1371
|
+
if (!render || !wasActive) {
|
|
1336
1372
|
if (render) renderRound(round);
|
|
1337
1373
|
return;
|
|
1338
1374
|
}
|
|
1339
|
-
finalizeRound(round, endTimestamp);
|
|
1340
1375
|
if (round.foldTimer !== undefined) return;
|
|
1341
1376
|
round.settleUntil = Date.now() + FOLD_SETTLE_MS;
|
|
1342
1377
|
pendingFoldRounds.add(round);
|
|
@@ -1348,10 +1383,23 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1348
1383
|
}, FOLD_SETTLE_MS);
|
|
1349
1384
|
};
|
|
1350
1385
|
|
|
1386
|
+
/**
|
|
1387
|
+
* 兑现挂起的收尾请求:活干完了当场收尾并重绘,摘要行从 Running 翻成 Ran for。
|
|
1388
|
+
* 挂在工具收尾与 tick 上,不另建定时器。
|
|
1389
|
+
*/
|
|
1390
|
+
const retryDeferredFinalize = (round: CompactRound): boolean => {
|
|
1391
|
+
const request = round.endRequest;
|
|
1392
|
+
if (!request || roundHasLiveWork(round)) return false;
|
|
1393
|
+
endRound(round, true, request.endTimestamp);
|
|
1394
|
+
renderRound(round);
|
|
1395
|
+
return true;
|
|
1396
|
+
};
|
|
1397
|
+
|
|
1351
1398
|
/**
|
|
1352
1399
|
* 外层行(edit/write/ask)切出的段落封口:跳过静默期直接定稿。
|
|
1353
1400
|
* 静默期是为"正文 token 先于 toolCall 到达"的双重转场准备的;外层边界
|
|
1354
1401
|
* 出现时摘要段内容已完整,立即收拢让 Ran for 当场落位,槽位卡一并撤走。
|
|
1402
|
+
* 本回合还有工具在跑时只挂起收尾:摘要行继续 Running,活干完再定稿。
|
|
1355
1403
|
*/
|
|
1356
1404
|
const sealRound = (round: CompactRound, endTimestamp?: number): void => {
|
|
1357
1405
|
finalizeRound(round, endTimestamp);
|
|
@@ -1428,6 +1476,24 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1428
1476
|
return ids;
|
|
1429
1477
|
};
|
|
1430
1478
|
|
|
1479
|
+
/**
|
|
1480
|
+
* 回合还有活干:成员消息仍在流式,或本回合的工具还没拿到最终结果。
|
|
1481
|
+
* 收尾要么按事实等活干完,要么摘要行就会把仍在跑的工具报成 Ran for。
|
|
1482
|
+
*/
|
|
1483
|
+
const roundHasLiveWork = (round: CompactRound): boolean => {
|
|
1484
|
+
for (const component of round.messages.keys()) {
|
|
1485
|
+
if (component?.isStreaming === true) return true;
|
|
1486
|
+
}
|
|
1487
|
+
const ids = roundToolCallIds(round);
|
|
1488
|
+
if (ids.size === 0) return false;
|
|
1489
|
+
for (const tool of trackedToolComponents) {
|
|
1490
|
+
if (typeof tool?.toolCallId === "string" && ids.has(tool.toolCallId) && isRunningTool(tool)) {
|
|
1491
|
+
return true;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
return false;
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1431
1497
|
/**
|
|
1432
1498
|
* 摘要行有东西可汇总才挂:普通工具(edit/write/ask 之外)或非空思考。
|
|
1433
1499
|
* 只剩外层卡的回合不挂——那些卡各自能展开,空摘要点开只会跳位。
|
|
@@ -1602,6 +1668,12 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1602
1668
|
return tail;
|
|
1603
1669
|
};
|
|
1604
1670
|
|
|
1671
|
+
/** 它们排在摘要行之下;定位时不把它们当摘要行之前的成员。 */
|
|
1672
|
+
const isOuterToolRow = (ids: Set<string>, value: any): boolean =>
|
|
1673
|
+
typeof value?.toolCallId === "string" &&
|
|
1674
|
+
ids.has(value.toolCallId) &&
|
|
1675
|
+
OUTER_TOOLS.has(String(value.toolName ?? ""));
|
|
1676
|
+
|
|
1605
1677
|
/**
|
|
1606
1678
|
* 尾行归位。目标位:活回合(运行中/收尾静默期)且未展开 → 容器最末,
|
|
1607
1679
|
* 计数行钉在 transcript 可写底缘,运行中到达的提示行/custom 条目只能落在
|
|
@@ -1621,22 +1693,33 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1621
1693
|
if (!container || !Array.isArray(container.children)) return;
|
|
1622
1694
|
tail.container = container;
|
|
1623
1695
|
const children = container.children as any[];
|
|
1696
|
+
const ids = roundToolCallIds(round);
|
|
1697
|
+
const live = roundLive(round);
|
|
1624
1698
|
const isMember = roundMemberMatcher(round);
|
|
1699
|
+
// 收尾后,本回合的外露行(edit/write/ask)一律排到摘要行之下;
|
|
1700
|
+
// 回合还在跑时它们留在原位,摘要行才能钉在可写底缘。
|
|
1701
|
+
const staysAbove = (value: any): boolean =>
|
|
1702
|
+
isMember(value) && (!isOuterToolRow(ids, value) || live);
|
|
1625
1703
|
const current = children.indexOf(tail.host);
|
|
1626
1704
|
// 摘尾行前先定目标位,已在位就整段跳过。
|
|
1627
1705
|
let last = -1;
|
|
1628
1706
|
for (let i = 0; i < children.length; i++) {
|
|
1629
|
-
if (children[i] === tail.host || !
|
|
1707
|
+
if (children[i] === tail.host || !staysAbove(children[i])) continue;
|
|
1630
1708
|
last = i;
|
|
1631
1709
|
}
|
|
1632
|
-
|
|
1710
|
+
// 外露行压在摘要行上方时仍要重排:尾行就算在目标位上也得让位。
|
|
1711
|
+
const outerAbove =
|
|
1712
|
+
!live &&
|
|
1713
|
+
current > 0 &&
|
|
1714
|
+
children.some((value: any, index: number) => index < current && isOuterToolRow(ids, value));
|
|
1715
|
+
const pinToEnd = live && round.anchor?.expanded !== true;
|
|
1633
1716
|
const desired = pinToEnd || last < 0 ? children.length - 1 : last + 1;
|
|
1634
|
-
if (current === desired) return;
|
|
1717
|
+
if (current === desired && !outerAbove) return;
|
|
1635
1718
|
if (current >= 0) children.splice(current, 1);
|
|
1636
1719
|
let first = -1;
|
|
1637
1720
|
last = -1;
|
|
1638
1721
|
for (let i = 0; i < children.length; i++) {
|
|
1639
|
-
if (!
|
|
1722
|
+
if (!staysAbove(children[i])) continue;
|
|
1640
1723
|
if (first < 0) first = i;
|
|
1641
1724
|
last = i;
|
|
1642
1725
|
}
|
|
@@ -1646,7 +1729,7 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1646
1729
|
// 用户消息永远留在原地:挪走会把别人的消息挪到用户消息下面去。
|
|
1647
1730
|
// custom 通知同理:它是回合内的透明行,不被统计也不挪位。
|
|
1648
1731
|
if (
|
|
1649
|
-
|
|
1732
|
+
staysAbove(children[i]) ||
|
|
1650
1733
|
isUserMessageComponent(children[i]) ||
|
|
1651
1734
|
isTransparentComponent(children[i])
|
|
1652
1735
|
) {
|
|
@@ -1681,8 +1764,10 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1681
1764
|
*/
|
|
1682
1765
|
const syncTailForTool = (toolCallId: string): void => {
|
|
1683
1766
|
if (!toolCallId) return;
|
|
1684
|
-
for (const round of
|
|
1685
|
-
if (!
|
|
1767
|
+
for (const round of allRounds()) {
|
|
1768
|
+
if (!roundToolCallIds(round).has(toolCallId)) continue;
|
|
1769
|
+
// 工具收尾后活干完了:挂起的收尾请求当场兑现,摘要行立刻翻成 Ran for。
|
|
1770
|
+
if (retryDeferredFinalize(round)) return;
|
|
1686
1771
|
// 槽位是在消息更新时画的,当时工具组件还不存在:组件到了就补上。
|
|
1687
1772
|
// 参数流式更新也走这里,槽位卡跟着换内容。
|
|
1688
1773
|
if (round.pendingLiveTool || roundLive(round)) renderRound(round);
|
|
@@ -2288,6 +2373,14 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
2288
2373
|
if (hasText) {
|
|
2289
2374
|
const round = roundByComponent.get(this);
|
|
2290
2375
|
const previousMessage = round?.messages.get(this);
|
|
2376
|
+
// 消息还在流式时正文不是回合边界:同一条消息常常先出正文、再出 toolCall,
|
|
2377
|
+
// 这时收尾会在下一帧另起一条摘要行,一段工作被拆成两条。
|
|
2378
|
+
// 正文先按成员渲染,等消息收尾(isStreaming=false)再判。
|
|
2379
|
+
if (round && previousMessage && self.isStreaming === true) {
|
|
2380
|
+
round.messages.set(this, message);
|
|
2381
|
+
renderRound(round);
|
|
2382
|
+
return undefined;
|
|
2383
|
+
}
|
|
2291
2384
|
if (round && previousMessage && (round.anchor !== this || round.messages.size > 1)) {
|
|
2292
2385
|
// 最终回答开始后,当前组件恢复原生文本;它已完成的 thinking
|
|
2293
2386
|
// 留在上一轮摘要中,避免再次生成独立 Thought 行。
|
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
fullscreenLazyTui,
|
|
50
50
|
hideScrollButton,
|
|
51
51
|
dockScrollButtonActive,
|
|
52
|
+
isFullscreenAtBottom,
|
|
52
53
|
restoreOfficialScrollToEnd,
|
|
53
54
|
restoreNativeScrollIndicatorText,
|
|
54
55
|
syncOfficialScrollToEnd,
|
|
@@ -469,9 +470,9 @@ function handleFullscreenToolClick(tui: any, packet: SgrMousePacket): boolean {
|
|
|
469
470
|
// compact 摘要行自己记展开前的视口(收起时还原跟随),所以它先展开再停跟随:
|
|
470
471
|
// 顺序反了快照会记下「未跟随」,收起时就交不回官方 follow。
|
|
471
472
|
component.setExpanded(true);
|
|
472
|
-
keepViewportOnExpand(tui);
|
|
473
|
+
keepViewportOnExpand(tui, hit);
|
|
473
474
|
} else {
|
|
474
|
-
keepViewportOnExpand(tui);
|
|
475
|
+
keepViewportOnExpand(tui, hit);
|
|
475
476
|
component.setExpanded(true);
|
|
476
477
|
}
|
|
477
478
|
clearPendingCollapsePress();
|
|
@@ -521,13 +522,40 @@ function isSameExpandedRound(other: any, owner: any): boolean {
|
|
|
521
522
|
}
|
|
522
523
|
|
|
523
524
|
/**
|
|
524
|
-
*
|
|
525
|
-
*
|
|
525
|
+
* 点击行在滚动视口里的位置:视口内行号与视口高度。布局树读不到时返回 null。
|
|
526
|
+
* leaf 不带 scrollView,视口是最近的带 scrollView 的祖先 box。
|
|
527
|
+
*/
|
|
528
|
+
function clickedRowInViewport(
|
|
529
|
+
hit: { box: any; localRow: number } | null | undefined,
|
|
530
|
+
): { y: number; height: number } | null {
|
|
531
|
+
if (!hit?.box) return null;
|
|
532
|
+
let scrollBox: any = null;
|
|
533
|
+
for (let current = hit.box; current; current = current.parent) {
|
|
534
|
+
if (current.scrollView) {
|
|
535
|
+
scrollBox = current;
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
const rect = scrollBox?.rect;
|
|
540
|
+
const height = Number(rect?.height);
|
|
541
|
+
const rowY = Number(hit.box.rect?.y);
|
|
542
|
+
if (!rect || !(height > 0) || !Number.isFinite(rowY)) return null;
|
|
543
|
+
return { y: rowY + hit.localRow - Number(rect.y), height };
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* 原地展开时视口怎么走。transcript 跟随底部时,内容变高会把视口拖到底,
|
|
548
|
+
* 点击的行和它上方的外层面板被顶出屏幕:展开前关掉跟随,点击行留在原位。
|
|
526
549
|
* compact 摘要行同样适用:它的展开入口在 setExpanded 之后调用本函数(见调用点)。
|
|
550
|
+
*
|
|
551
|
+
* 例外是点击行已经落在视口下半屏:它下面没有足够空间,冻结只会把展开出来的
|
|
552
|
+
* 内容全推到屏幕外(贴着底部输入框时最常见)。这种位置保持跟随,让新内容顶上来。
|
|
527
553
|
*/
|
|
528
|
-
function keepViewportOnExpand(tui: any): void {
|
|
554
|
+
function keepViewportOnExpand(tui: any, hit?: { box: any; localRow: number } | null): void {
|
|
529
555
|
const view = tui.getPrimaryScrollView?.();
|
|
530
556
|
if (typeof view?.scrollTo !== "function" || typeof view.scrollTop !== "number") return;
|
|
557
|
+
const spot = clickedRowInViewport(hit);
|
|
558
|
+
if (spot && isFullscreenAtBottom(tui) && spot.y >= spot.height / 2) return;
|
|
531
559
|
view.scrollTo(view.scrollTop, { disableFollow: true });
|
|
532
560
|
// 已脱离底部跟随:dock 模式亮出回到底部按钮,新输出到来时仍有入口。
|
|
533
561
|
if (view.isFollowingEnd === false && dockScrollButtonActive()) setScrollButtonVisible(true);
|
|
@@ -194,6 +194,69 @@ function shellDurationText(toolName: string, context: any, isPartial: boolean):
|
|
|
194
194
|
return elapsed === undefined ? "" : formatToolDuration(elapsed);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
+
/**
|
|
198
|
+
* 运行中的展开视图:与结束后同一份 Input / Output。
|
|
199
|
+
* 还没输出、或正文 trim 后为空时用 Pending… 占位:空白会被视图画成 Done,像已经跑完了。
|
|
200
|
+
* trim 只用来判空;非空正文原样保留,不整段去掉缩进和空白。
|
|
201
|
+
* shell 的已用时间挂到视图尾部;取值函数每帧重算,秒数才跟着动画 tick 走。
|
|
202
|
+
*/
|
|
203
|
+
function renderRunningExpandedResult(toolName: string, result: any, context: any, theme: any): any {
|
|
204
|
+
const text = textFromResult(result);
|
|
205
|
+
const view = renderExpandedToolResult(
|
|
206
|
+
text.trim() ? text : "Pending…",
|
|
207
|
+
theme,
|
|
208
|
+
false,
|
|
209
|
+
context?.lastComponent,
|
|
210
|
+
context?.args,
|
|
211
|
+
context,
|
|
212
|
+
true,
|
|
213
|
+
);
|
|
214
|
+
if (isExpandedToolIoView(view) && SHELL_TOOL_NAMES.has(toolName)) {
|
|
215
|
+
view.setFooter(() => shellDurationText(toolName, context, true) || undefined);
|
|
216
|
+
}
|
|
217
|
+
return view;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* 运行中的折叠行:` ↳ Pending… · 12.4s · click to show more`。
|
|
222
|
+
* 提示必须留在行尾:collapsedHintHitbox 只认行尾,没有它这行既点不动也看不出能点。
|
|
223
|
+
* 已用时间在 render() 内取,动画 tick 才能带上新值。
|
|
224
|
+
*/
|
|
225
|
+
function renderRunningCollapsedResult(options: {
|
|
226
|
+
toolName: string;
|
|
227
|
+
context: any;
|
|
228
|
+
theme: any;
|
|
229
|
+
/** ask_user_question 的结果树用 1 格缩进,与它的 ├/└ 对齐。 */
|
|
230
|
+
prefix?: string;
|
|
231
|
+
}): any {
|
|
232
|
+
const { toolName, context, theme, prefix } = options;
|
|
233
|
+
const toolCallId = context?.toolCallId;
|
|
234
|
+
const hintPrefix = theme.fg("dim", " · ");
|
|
235
|
+
const hint = hintPrefix + theme.fg("dim", showMoreHintText());
|
|
236
|
+
const hoveredHint = hintPrefix + theme.fg("text", showMoreHintText());
|
|
237
|
+
let cachedWidth: number | undefined;
|
|
238
|
+
let cachedBody: string | undefined;
|
|
239
|
+
let cachedLine: string | undefined;
|
|
240
|
+
let cachedHoveredLine: string | undefined;
|
|
241
|
+
return {
|
|
242
|
+
render(width: number) {
|
|
243
|
+
const elapsed = shellDurationText(toolName, context, true);
|
|
244
|
+
const body = elapsed ? `Pending… · ${elapsed}` : "Pending…";
|
|
245
|
+
if (cachedLine === undefined || cachedWidth !== width || cachedBody !== body) {
|
|
246
|
+
cachedWidth = width;
|
|
247
|
+
cachedBody = body;
|
|
248
|
+
cachedLine = theme.fg("muted", renderCollapsedToolResultToWidth(body, hint, width, prefix));
|
|
249
|
+
cachedHoveredLine = theme.fg(
|
|
250
|
+
"muted",
|
|
251
|
+
renderCollapsedToolResultToWidth(body, hoveredHint, width, prefix),
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
return [isToolCallHovered(toolCallId) ? cachedHoveredLine! : cachedLine];
|
|
255
|
+
},
|
|
256
|
+
invalidate(): void {},
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
197
260
|
/**
|
|
198
261
|
* Agent 的 renderResult:与 pi-subagents 保持同样的分支,但收敛成 ccstyle 的 ↳ 行。
|
|
199
262
|
* running/partial 转交原渲染器(只有它有 spinner frame 和 activity 文案);
|
|
@@ -476,9 +539,11 @@ export function createCcstyleTool(
|
|
|
476
539
|
if (toolName === ASK_USER_QUESTION_TOOL_NAME) {
|
|
477
540
|
if (!options?.isPartial) setToolVisualState(context, isError ? "error" : "success");
|
|
478
541
|
if (options?.isPartial) {
|
|
479
|
-
//
|
|
480
|
-
|
|
481
|
-
|
|
542
|
+
// 等待回答时也能展开看问题原文(Input 即 args.questions);折叠态 1 格缩进。
|
|
543
|
+
if (expanded) return renderRunningExpandedResult(toolName, result, context, theme);
|
|
544
|
+
// 折叠后清掉展开视图,与其它运行中工具一致。
|
|
545
|
+
if (context?.state) context.state.ccstyleIoView = undefined;
|
|
546
|
+
return renderRunningCollapsedResult({ toolName, context, theme, prefix: " ↳ " });
|
|
482
547
|
}
|
|
483
548
|
if (expanded) {
|
|
484
549
|
return renderExpandedToolResult(
|
|
@@ -501,21 +566,11 @@ export function createCcstyleTool(
|
|
|
501
566
|
});
|
|
502
567
|
}
|
|
503
568
|
if (options?.isPartial) {
|
|
569
|
+
// 运行中也给和结束后同一份 Input / Output:命令全文与已产生的输出。
|
|
570
|
+
if (expanded) return renderRunningExpandedResult(toolName, result, context, theme);
|
|
504
571
|
// 折叠态保持 3 格:与完成后的 ` ↳ …` 同列,工具跑完那行不横跳。
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
if (!SHELL_TOOL_NAMES.has(toolName)) {
|
|
508
|
-
return new Text(theme.fg("muted", pending), 0, 0);
|
|
509
|
-
}
|
|
510
|
-
// shell 运行中报已用时间:数字在 render() 内取,动画 tick 才能带上新值。
|
|
511
|
-
return {
|
|
512
|
-
render(width: number) {
|
|
513
|
-
const elapsed = shellDurationText(toolName, context, true);
|
|
514
|
-
const suffix = elapsed ? theme.fg("dim", ` · ${elapsed}`) : "";
|
|
515
|
-
return [truncateToWidth(theme.fg("muted", pending) + suffix, width, "")];
|
|
516
|
-
},
|
|
517
|
-
invalidate(): void {},
|
|
518
|
-
};
|
|
572
|
+
if (context?.state) context.state.ccstyleIoView = undefined;
|
|
573
|
+
return renderRunningCollapsedResult({ toolName, context, theme });
|
|
519
574
|
}
|
|
520
575
|
|
|
521
576
|
// shell:结果定型时定一次结束时间,这一行之后不再变。
|