@herbertgao/pi-extensions 2026.8.15 → 2026.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/THIRD_PARTY_NOTICES.md +26 -0
- package/node_modules/@czottmann/pi-automode/CHANGELOG.md +13 -1
- package/node_modules/@czottmann/pi-automode/README.md +20 -0
- package/node_modules/@czottmann/pi-automode/docs/GLOSSARY.md +1 -1
- package/node_modules/@czottmann/pi-automode/docs/automode-classifier-flow.md +2 -1
- package/node_modules/@czottmann/pi-automode/docs/defaults.md +3 -2
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/classifier.ts +38 -2
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/constants.ts +5 -3
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/extension.ts +11 -3
- package/node_modules/@czottmann/pi-automode/package.json +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +20 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +46 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +55 -17
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/packets.ts +6 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/scroll.ts +5 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +34 -30
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +3 -3
- package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +2 -2
- package/node_modules/@narumitw/pi-btw/README.md +5 -1
- package/node_modules/@narumitw/pi-btw/dist/index.ts +143 -14
- package/node_modules/@narumitw/pi-btw/dist/index.ts.map +3 -3
- package/node_modules/@narumitw/pi-btw/package.json +4 -4
- package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +158 -7
- package/node_modules/@narumitw/pi-btw/src/text.ts +18 -0
- package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +5 -16
- package/node_modules/@narumitw/pi-caffeinate/LICENSE +21 -0
- package/node_modules/@narumitw/pi-caffeinate/README.md +224 -0
- package/node_modules/@narumitw/pi-caffeinate/dist/index.ts +1112 -0
- package/node_modules/@narumitw/pi-caffeinate/dist/index.ts.map +7 -0
- package/node_modules/@narumitw/pi-caffeinate/package.json +53 -0
- package/node_modules/@narumitw/pi-caffeinate/src/caffeinate.ts +811 -0
- package/node_modules/@narumitw/pi-caffeinate/src/dbus-inhibit.ts +153 -0
- package/node_modules/@narumitw/pi-caffeinate/src/index.ts +1 -0
- package/node_modules/@narumitw/pi-caffeinate/src/inhibitor-process.ts +43 -0
- package/node_modules/@narumitw/pi-caffeinate/src/inhibitors.ts +167 -0
- package/node_modules/@narumitw/pi-caffeinate/src/settings.ts +202 -0
- package/node_modules/@pi-plugins/fast-mode/README.md +5 -3
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +20 -55
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/package.json +1 -1
- package/node_modules/@tifan/pi-handoff/README.md +6 -3
- package/node_modules/@tifan/pi-handoff/package.json +1 -1
- package/node_modules/@tifan/pi-handoff/src/index.ts +8 -3
- package/node_modules/pi-lens/CHANGELOG.md +988 -0
- package/node_modules/pi-lens/README.md +3 -0
- package/node_modules/pi-lens/config/biome/core.jsonc +11 -2
- package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +13 -1
- package/node_modules/pi-lens/dist/clients/actionable-warnings-logger.js +2 -2
- package/node_modules/pi-lens/dist/clients/actionable-warnings.js +927 -80
- package/node_modules/pi-lens/dist/clients/agent-behavior-client.js +13 -4
- package/node_modules/pi-lens/dist/clients/ast-grep-client.js +123 -3
- package/node_modules/pi-lens/dist/clients/ast-grep-rule-manager.js +60 -5
- package/node_modules/pi-lens/dist/clients/ast-grep-tool-logger.js +2 -2
- package/node_modules/pi-lens/dist/clients/bash-file-access.js +1 -3
- package/node_modules/pi-lens/dist/clients/biome-client.js +9 -2
- package/node_modules/pi-lens/dist/clients/blocker-freshness.js +14 -0
- package/node_modules/pi-lens/dist/clients/bootstrap.js +509 -73
- package/node_modules/pi-lens/dist/clients/bounded-cache.js +152 -12
- package/node_modules/pi-lens/dist/clients/bounded-telemetry.js +59 -4
- package/node_modules/pi-lens/dist/clients/bundled-resource-health.js +113 -0
- package/node_modules/pi-lens/dist/clients/bus-events-logger.js +2 -2
- package/node_modules/pi-lens/dist/clients/cache/rule-cache.js +31 -4
- package/node_modules/pi-lens/dist/clients/cache-manager.js +105 -6
- package/node_modules/pi-lens/dist/clients/cache-observability.js +44 -18
- package/node_modules/pi-lens/dist/clients/cargo-manifest.js +422 -0
- package/node_modules/pi-lens/dist/clients/cascade-logger.js +2 -2
- package/node_modules/pi-lens/dist/clients/code-quality-warnings.js +13 -3
- package/node_modules/pi-lens/dist/clients/complexity-client.js +16 -5
- package/node_modules/pi-lens/dist/clients/config-core/deny.js +221 -0
- package/node_modules/pi-lens/dist/clients/config-core/index.js +47 -0
- package/node_modules/pi-lens/dist/clients/config-core/merge.js +357 -0
- package/node_modules/pi-lens/dist/clients/config-core/normalize.js +340 -0
- package/node_modules/pi-lens/dist/clients/config-core/process-spec.js +248 -0
- package/node_modules/pi-lens/dist/clients/config-core/provenance.js +171 -0
- package/node_modules/pi-lens/dist/clients/config-core/records.js +218 -0
- package/node_modules/pi-lens/dist/clients/config-core/resolve.js +125 -0
- package/node_modules/pi-lens/dist/clients/config-core/safe-object.js +78 -0
- package/node_modules/pi-lens/dist/clients/config-core/schema.js +167 -0
- package/node_modules/pi-lens/dist/clients/config-diagnostic-codes.js +281 -0
- package/node_modules/pi-lens/dist/clients/config-locations.js +160 -0
- package/node_modules/pi-lens/dist/clients/config-resolve.js +789 -0
- package/node_modules/pi-lens/dist/clients/config-schema.js +197 -0
- package/node_modules/pi-lens/dist/clients/config-warn.js +407 -0
- package/node_modules/pi-lens/dist/clients/dead-code-client.js +19 -14
- package/node_modules/pi-lens/dist/clients/dead-code-logger.js +2 -2
- package/node_modules/pi-lens/dist/clients/deadline-utils.js +178 -0
- package/node_modules/pi-lens/dist/clients/debug-handles.js +2 -2
- package/node_modules/pi-lens/dist/clients/debug-heap.js +3 -3
- package/node_modules/pi-lens/dist/clients/deferred-lsp-work.js +106 -0
- package/node_modules/pi-lens/dist/clients/degradation-ledger.js +113 -7
- package/node_modules/pi-lens/dist/clients/dependency-checker.js +8 -19
- package/node_modules/pi-lens/dist/clients/diagnostic-line-freshness.js +12 -9
- package/node_modules/pi-lens/dist/clients/diagnostic-logger.js +14 -4
- package/node_modules/pi-lens/dist/clients/dispatch/dispatcher.js +162 -18
- package/node_modules/pi-lens/dist/clients/dispatch/fact-store.js +97 -0
- package/node_modules/pi-lens/dist/clients/dispatch/integration.js +9 -7
- package/node_modules/pi-lens/dist/clients/dispatch/runners/actionlint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/ast-grep-napi.js +380 -26
- package/node_modules/pi-lens/dist/clients/dispatch/runners/biome-check.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/cpp-check.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/credo.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/cue-vet.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/dart-analyze.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/detekt.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/dotnet-build.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/elixir-check.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/eslint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/fact-rules.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/fish-indent.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/gleam-check.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/go-vet.js +1 -3
- package/node_modules/pi-lens/dist/clients/dispatch/runners/golangci-lint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/hadolint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-lint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-render.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/htmlhint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/javac.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/ktlint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/lsp.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/markdownlint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/mypy.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/oxlint.js +13 -18
- package/node_modules/pi-lens/dist/clients/dispatch/runners/php-lint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/phpstan.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/prisma-validate.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/psscriptanalyzer.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/pyright.js +7 -4
- package/node_modules/pi-lens/dist/clients/dispatch/runners/rubocop.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/ruff.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/rust-clippy.js +1 -3
- package/node_modules/pi-lens/dist/clients/dispatch/runners/shellcheck.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/shfmt.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/spellcheck.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/spotbugs.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/sqlfluff.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/stylelint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/swiftlint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/taplo.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/terragrunt.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/tflint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/tree-sitter.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/trivy-config.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/availability-policy.js +3 -0
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/diagnostic-parsers.js +3 -4
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +194 -80
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/toolchain-availability.js +84 -15
- package/node_modules/pi-lens/dist/clients/dispatch/runners/vale.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/yamllint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/zig-check.js +0 -1
- package/node_modules/pi-lens/dist/clients/disposition-logger.js +3 -3
- package/node_modules/pi-lens/dist/clients/effective-config.js +403 -0
- package/node_modules/pi-lens/dist/clients/error-class.js +23 -0
- package/node_modules/pi-lens/dist/clients/event-loop-hold.js +274 -0
- package/node_modules/pi-lens/dist/clients/extension-log.js +2 -2
- package/node_modules/pi-lens/dist/clients/feature-hints.js +2 -1
- package/node_modules/pi-lens/dist/clients/file-time.js +6 -1
- package/node_modules/pi-lens/dist/clients/file-utils.js +112 -9
- package/node_modules/pi-lens/dist/clients/finding-delivery-gate.js +50 -13
- package/node_modules/pi-lens/dist/clients/format-service.js +6 -1
- package/node_modules/pi-lens/dist/clients/formatters.js +276 -102
- package/node_modules/pi-lens/dist/clients/freshness-cadence.js +17 -0
- package/node_modules/pi-lens/dist/clients/generated-artifacts.js +114 -19
- package/node_modules/pi-lens/dist/clients/generation-guard.js +4 -9
- package/node_modules/pi-lens/dist/clients/git-guard.js +1 -1
- package/node_modules/pi-lens/dist/clients/go-client.js +39 -0
- package/node_modules/pi-lens/dist/clients/gradle-ktfmt-style.js +252 -0
- package/node_modules/pi-lens/dist/clients/hashline-anchor.js +424 -0
- package/node_modules/pi-lens/dist/clients/hook-budgets.js +76 -0
- package/node_modules/pi-lens/dist/clients/host-edit-normalize.js +5 -2
- package/node_modules/pi-lens/dist/clients/host-ports.js +1 -1
- package/node_modules/pi-lens/dist/clients/installer/index.js +71 -52
- package/node_modules/pi-lens/dist/clients/instance-reaper.js +104 -230
- package/node_modules/pi-lens/dist/clients/instance-registry.js +6 -3
- package/node_modules/pi-lens/dist/clients/language-registry.js +595 -0
- package/node_modules/pi-lens/dist/clients/latency-logger.js +160 -2
- package/node_modules/pi-lens/dist/clients/ledger-bounds.js +13 -0
- package/node_modules/pi-lens/dist/clients/lens-config.js +141 -30
- package/node_modules/pi-lens/dist/clients/lens-engine.js +30 -37
- package/node_modules/pi-lens/dist/clients/lens-flag-registry.js +59 -6
- package/node_modules/pi-lens/dist/clients/log-cleanup.js +2 -2
- package/node_modules/pi-lens/dist/clients/lsp/aggregation.js +3 -1
- package/node_modules/pi-lens/dist/clients/lsp/client.js +168 -30
- package/node_modules/pi-lens/dist/clients/lsp/config.js +483 -158
- package/node_modules/pi-lens/dist/clients/lsp/diagnostic-binding.js +1 -1
- package/node_modules/pi-lens/dist/clients/lsp/edits.js +15 -2
- package/node_modules/pi-lens/dist/clients/lsp/index.js +676 -71
- package/node_modules/pi-lens/dist/clients/lsp/language.js +18 -169
- package/node_modules/pi-lens/dist/clients/lsp/launch.js +2 -1
- package/node_modules/pi-lens/dist/clients/lsp/pending-aux-coverage.js +5 -16
- package/node_modules/pi-lens/dist/clients/lsp/server.js +284 -147
- package/node_modules/pi-lens/dist/clients/lsp/session-roots.js +116 -23
- package/node_modules/pi-lens/dist/clients/lsp/spawn-history.js +2 -7
- package/node_modules/pi-lens/dist/clients/lsp/tsserver-sync.js +9 -2
- package/node_modules/pi-lens/dist/clients/lsp/workspace-diagnostics-cache.js +1 -1
- package/node_modules/pi-lens/dist/clients/lsp-mutation.js +163 -21
- package/node_modules/pi-lens/dist/clients/map-with-concurrency.js +36 -0
- package/node_modules/pi-lens/dist/clients/mcp/analyze.js +33 -4
- package/node_modules/pi-lens/dist/clients/mcp/session.js +5 -16
- package/node_modules/pi-lens/dist/clients/memory-sampler.js +8 -3
- package/node_modules/pi-lens/dist/clients/middle-man-analysis.js +2 -4
- package/node_modules/pi-lens/dist/clients/module-report.js +20 -45
- package/node_modules/pi-lens/dist/clients/mutating-tool.js +651 -0
- package/node_modules/pi-lens/dist/clients/mutation-attribution.js +368 -0
- package/node_modules/pi-lens/dist/clients/mutation-bridge.js +240 -0
- package/node_modules/pi-lens/dist/clients/ndjson-logger.js +247 -20
- package/node_modules/pi-lens/dist/clients/observed-mutation-sources.js +101 -0
- package/node_modules/pi-lens/dist/clients/observed-mutation.js +1215 -0
- package/node_modules/pi-lens/dist/clients/opaque-mutation-scan.js +68 -22
- package/node_modules/pi-lens/dist/clients/opengrep-config.js +4 -0
- package/node_modules/pi-lens/dist/clients/package-manager.js +195 -26
- package/node_modules/pi-lens/dist/clients/partial-edit-apply.js +359 -80
- package/node_modules/pi-lens/dist/clients/path-attribution-telemetry.js +23 -7
- package/node_modules/pi-lens/dist/clients/path-keyed-map.js +21 -2
- package/node_modules/pi-lens/dist/clients/path-utils.js +428 -13
- package/node_modules/pi-lens/dist/clients/persist-debounce.js +8 -1
- package/node_modules/pi-lens/dist/clients/php-cs-fixer-config.js +114 -0
- package/node_modules/pi-lens/dist/clients/pipeline.js +77 -16
- package/node_modules/pi-lens/dist/clients/probe-home-state.js +228 -0
- package/node_modules/pi-lens/dist/clients/process-bridge.js +66 -0
- package/node_modules/pi-lens/dist/clients/process-snapshot.js +68 -0
- package/node_modules/pi-lens/dist/clients/project-diagnostics/fresh-fetch.js +4 -3
- package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/runner-findings.js +27 -3
- package/node_modules/pi-lens/dist/clients/project-diagnostics/scanner.js +51 -20
- package/node_modules/pi-lens/dist/clients/project-lens-config.js +393 -122
- package/node_modules/pi-lens/dist/clients/project-snapshot.js +52 -24
- package/node_modules/pi-lens/dist/clients/python-environment.js +217 -0
- package/node_modules/pi-lens/dist/clients/python-provenance.js +639 -0
- package/node_modules/pi-lens/dist/clients/quiet-window.js +6 -1
- package/node_modules/pi-lens/dist/clients/read-bridge.js +13 -21
- package/node_modules/pi-lens/dist/clients/read-expansion.js +9 -46
- package/node_modules/pi-lens/dist/clients/read-guard-logger.js +15 -4
- package/node_modules/pi-lens/dist/clients/read-guard-tool-lines.js +364 -212
- package/node_modules/pi-lens/dist/clients/read-guard.js +21 -0
- package/node_modules/pi-lens/dist/clients/resource-sampler.js +195 -96
- package/node_modules/pi-lens/dist/clients/review-graph/builder.js +152 -109
- package/node_modules/pi-lens/dist/clients/review-graph/service.js +55 -3
- package/node_modules/pi-lens/dist/clients/review-graph/shared-extraction-ir.js +7 -15
- package/node_modules/pi-lens/dist/clients/review-graph/workspace-modules.js +10 -74
- package/node_modules/pi-lens/dist/clients/review-graph-logger.js +9 -3
- package/node_modules/pi-lens/dist/clients/runtime-agent-end.js +18 -2
- package/node_modules/pi-lens/dist/clients/runtime-context.js +49 -16
- package/node_modules/pi-lens/dist/clients/runtime-coordinator.js +25 -6
- package/node_modules/pi-lens/dist/clients/runtime-session.js +139 -22
- package/node_modules/pi-lens/dist/clients/runtime-tool-call.js +168 -35
- package/node_modules/pi-lens/dist/clients/runtime-tool-result.js +797 -243
- package/node_modules/pi-lens/dist/clients/runtime-turn.js +1028 -53
- package/node_modules/pi-lens/dist/clients/rust-client.js +31 -0
- package/node_modules/pi-lens/dist/clients/safe-spawn.js +33 -10
- package/node_modules/pi-lens/dist/clients/sanitize.js +7 -1
- package/node_modules/pi-lens/dist/clients/scratch-tree-policy.js +1 -3
- package/node_modules/pi-lens/dist/clients/security-scan-client.js +3 -0
- package/node_modules/pi-lens/dist/clients/session-lifecycle.js +1 -1
- package/node_modules/pi-lens/dist/clients/session-start-observability.js +79 -0
- package/node_modules/pi-lens/dist/clients/sessionstart-logger.js +12 -3
- package/node_modules/pi-lens/dist/clients/sgconfig.js +6 -1
- package/node_modules/pi-lens/dist/clients/skills-resolver.js +105 -0
- package/node_modules/pi-lens/dist/clients/smells-rollup.js +2 -2
- package/node_modules/pi-lens/dist/clients/string-utils.js +13 -0
- package/node_modules/pi-lens/dist/clients/subagent-mode.js +17 -4
- package/node_modules/pi-lens/dist/clients/test-runner-client.js +176 -39
- package/node_modules/pi-lens/dist/clients/test-runner-delivery.js +239 -0
- package/node_modules/pi-lens/dist/clients/tool-definition.js +41 -1
- package/node_modules/pi-lens/dist/clients/tool-policy.js +91 -21
- package/node_modules/pi-lens/dist/clients/tree-sitter-cache.js +40 -40
- package/node_modules/pi-lens/dist/clients/tree-sitter-client.js +86 -48
- package/node_modules/pi-lens/dist/clients/tree-sitter-logger.js +2 -2
- package/node_modules/pi-lens/dist/clients/tree-sitter-query-loader.js +81 -1
- package/node_modules/pi-lens/dist/clients/tree-sitter-shared.js +51 -46
- package/node_modules/pi-lens/dist/clients/tree-sitter-symbol-extractor.js +28 -0
- package/node_modules/pi-lens/dist/clients/typos-config.js +5 -0
- package/node_modules/pi-lens/dist/clients/user-notify.js +6 -2
- package/node_modules/pi-lens/dist/clients/widget-state.js +191 -26
- package/node_modules/pi-lens/dist/clients/word-index-logger.js +2 -2
- package/node_modules/pi-lens/dist/clients/word-index-store.js +20 -5
- package/node_modules/pi-lens/dist/clients/word-index.js +243 -31
- package/node_modules/pi-lens/dist/clients/workspace-topology.js +8 -1
- package/node_modules/pi-lens/dist/clients/zizmor-config.js +3 -0
- package/node_modules/pi-lens/dist/index.js +64335 -54300
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +3 -1
- package/node_modules/pi-lens/dist/mcp/server.js +127 -5
- package/node_modules/pi-lens/dist/scripts/lib/process-scan.mjs +583 -0
- package/node_modules/pi-lens/dist/scripts/lib/skills-predicate.mjs +129 -0
- package/node_modules/pi-lens/dist/tools/effective-config.js +89 -0
- package/node_modules/pi-lens/dist/tools/lens-diagnostics.js +95 -24
- package/node_modules/pi-lens/dist/tools/lsp-diagnostics.js +67 -80
- package/node_modules/pi-lens/dist/tools/lsp-navigation.js +37 -16
- package/node_modules/pi-lens/dist/tools/shared.js +0 -1
- package/node_modules/pi-lens/docs/agent-guide.md +64 -1
- package/node_modules/pi-lens/docs/configuration.md +222 -0
- package/node_modules/pi-lens/docs/dependencies.md +3 -3
- package/node_modules/pi-lens/docs/features.md +44 -5
- package/node_modules/pi-lens/docs/language-coverage.md +2 -2
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +25 -0
- package/node_modules/pi-lens/docs/pi-lens-investigator.md +25 -0
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +27 -0
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +38 -0
- package/node_modules/pi-lens/docs/pi-lens-warden.md +55 -0
- package/node_modules/pi-lens/docs/public-api-stability.md +359 -0
- package/node_modules/pi-lens/docs/release-qa-baseline.md +182 -0
- package/node_modules/pi-lens/docs/subagent-compat.md +110 -30
- package/node_modules/pi-lens/docs/tree-sitter_rules_catalog.md +2 -2
- package/node_modules/pi-lens/package.json +15 -23
- package/node_modules/pi-lens/rules/tree-sitter-queries/python/python-cross-language-method.yml +3 -3
- package/node_modules/pi-lens/rules/tree-sitter-queries/python/python-hallucinated-import.yml +2 -2
- package/node_modules/pi-lens/rules/tree-sitter-queries/python/python-sql-injection.yml +12 -2
- package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +192 -1
- package/node_modules/pi-lens/scripts/install-selftest.mjs +58 -2
- package/node_modules/pi-lens/scripts/lib/skills-predicate.mjs +129 -0
- package/node_modules/pi-lens/scripts/rpc-load-check.mjs +3 -1
- package/node_modules/pi-mcp-adapter/CHANGELOG.md +27 -0
- package/node_modules/pi-mcp-adapter/README.md +13 -13
- package/node_modules/pi-mcp-adapter/commands.ts +58 -21
- package/node_modules/pi-mcp-adapter/config.ts +18 -4
- package/node_modules/pi-mcp-adapter/direct-tools.ts +26 -6
- package/node_modules/pi-mcp-adapter/dist/config.d.ts +4 -0
- package/node_modules/pi-mcp-adapter/dist/config.js +13 -4
- package/node_modules/pi-mcp-adapter/dist/config.js.map +1 -1
- package/node_modules/pi-mcp-adapter/dist/types.d.ts +11 -3
- package/node_modules/pi-mcp-adapter/dist/types.js.map +1 -1
- package/node_modules/pi-mcp-adapter/error-signal.ts +15 -4
- package/node_modules/pi-mcp-adapter/errors.ts +141 -0
- package/node_modules/pi-mcp-adapter/host-html-template.ts +58 -5
- package/node_modules/pi-mcp-adapter/index.ts +2 -3
- package/node_modules/pi-mcp-adapter/init.ts +5 -0
- package/node_modules/pi-mcp-adapter/mcp-panel.ts +30 -9
- package/node_modules/pi-mcp-adapter/mcp-setup-panel.ts +66 -28
- package/node_modules/pi-mcp-adapter/mcp-status.ts +2 -0
- package/node_modules/pi-mcp-adapter/package.json +2 -1
- package/node_modules/pi-mcp-adapter/proxy-modes.ts +66 -13
- package/node_modules/pi-mcp-adapter/sandbox-proxy-template.ts +217 -0
- package/node_modules/pi-mcp-adapter/server-manager.ts +337 -6
- package/node_modules/pi-mcp-adapter/skills/mcp-scripting/SKILL.md +1 -0
- package/node_modules/pi-mcp-adapter/types.ts +18 -3
- package/node_modules/pi-mcp-adapter/ui-resource-handler.ts +18 -2
- package/node_modules/pi-mcp-adapter/ui-server.ts +179 -54
- package/node_modules/pi-mcp-adapter/ui-session.ts +28 -8
- package/node_modules/pi-web-access/CHANGELOG.md +28 -0
- package/node_modules/pi-web-access/README.md +62 -15
- package/node_modules/pi-web-access/curator-page.ts +3 -1
- package/node_modules/pi-web-access/curator-server.ts +5 -1
- package/node_modules/pi-web-access/gemini-search.ts +8 -4
- package/node_modules/pi-web-access/github-extract.ts +242 -1
- package/node_modules/pi-web-access/index.ts +118 -64
- package/node_modules/pi-web-access/mistral-search.ts +281 -0
- package/node_modules/pi-web-access/package.json +2 -2
- package/node_modules/pi-web-access/perplexity.ts +14 -1
- package/node_modules/pi-web-access/utils.ts +23 -6
- package/node_modules/pi-web-access/xai-search.ts +96 -33
- package/package.json +15 -11
|
@@ -246,7 +246,7 @@ export class ExpandedToolIoView {
|
|
|
246
246
|
private hoveredSection: ToolIoSection | null = null;
|
|
247
247
|
/** Which sections currently show the show-more affordance (after last render). */
|
|
248
248
|
private truncated: { input: boolean; output: boolean } = { input: false, output: false };
|
|
249
|
-
/** 0-based
|
|
249
|
+
/** 0-based body/footer line indexes that carry show-more after last render. */
|
|
250
250
|
private showMoreHeaderRows: { input?: number; output?: number } = {};
|
|
251
251
|
|
|
252
252
|
constructor(
|
|
@@ -306,12 +306,12 @@ export class ExpandedToolIoView {
|
|
|
306
306
|
this.invalidate();
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
/** True when the plain
|
|
309
|
+
/** True when the plain footer line is a truncated section with show-more. */
|
|
310
310
|
matchShowMoreLine(plainLine: string): ToolIoSection | null {
|
|
311
311
|
const line = plainLine.replace(/\x1b\[[0-9;]*m/g, "");
|
|
312
|
-
if (!line.includes(` • ${showMoreHintText()}`)) return null;
|
|
313
|
-
if (
|
|
314
|
-
if (
|
|
312
|
+
if (!line.includes(` • ${showMoreHintText()}`) || !/\+\d+ more lines/.test(line)) return null;
|
|
313
|
+
if (this.truncated.input && line.includes("│")) return "input";
|
|
314
|
+
if (this.truncated.output) return "output";
|
|
315
315
|
return null;
|
|
316
316
|
}
|
|
317
317
|
|
|
@@ -355,24 +355,13 @@ export class ExpandedToolIoView {
|
|
|
355
355
|
this.truncated = { input: false, output: false };
|
|
356
356
|
this.showMoreHeaderRows = {};
|
|
357
357
|
|
|
358
|
-
const pushHeader = (
|
|
359
|
-
corner: "├" | "└",
|
|
360
|
-
label: string,
|
|
361
|
-
section: ToolIoSection,
|
|
362
|
-
showMore: boolean,
|
|
363
|
-
) => {
|
|
358
|
+
const pushHeader = (corner: "├" | "└", label: string) => {
|
|
364
359
|
const mark = theme.fg("dim", ` ${corner} `);
|
|
365
360
|
const title = theme.fg(
|
|
366
361
|
"accent",
|
|
367
362
|
typeof theme.bold === "function" ? theme.bold(label) : label,
|
|
368
363
|
);
|
|
369
|
-
|
|
370
|
-
const more = showMore
|
|
371
|
-
? theme.fg("dim", " •") +
|
|
372
|
-
theme.fg(this.hoveredSection === section ? "text" : "dim", ` ${showMoreHintText()}`)
|
|
373
|
-
: "";
|
|
374
|
-
if (showMore) this.showMoreHeaderRows[section] = lines.length;
|
|
375
|
-
lines.push(truncateToWidth(mark + title + more, safeWidth, ""));
|
|
364
|
+
lines.push(truncateToWidth(mark + title, safeWidth, ""));
|
|
376
365
|
};
|
|
377
366
|
|
|
378
367
|
const pushRailLine = (styledContent: string, continued = true) => {
|
|
@@ -394,7 +383,7 @@ export class ExpandedToolIoView {
|
|
|
394
383
|
|
|
395
384
|
const pushBody = (
|
|
396
385
|
body: string,
|
|
397
|
-
opts: { input?: boolean; limit: number; continued?: boolean },
|
|
386
|
+
opts: { input?: boolean; limit: number; continued?: boolean; section: ToolIoSection },
|
|
398
387
|
): boolean /* truncated */ => {
|
|
399
388
|
const raw = body.replace(/\t/g, " ").replace(/\n+$/, "");
|
|
400
389
|
if (!raw.trim()) {
|
|
@@ -417,7 +406,14 @@ export class ExpandedToolIoView {
|
|
|
417
406
|
if (truncated) {
|
|
418
407
|
const hidden = Math.max(0, wrapped.length - visible.length);
|
|
419
408
|
if (hidden > 0) {
|
|
420
|
-
|
|
409
|
+
const more =
|
|
410
|
+
theme.fg("dim", " •") +
|
|
411
|
+
theme.fg(
|
|
412
|
+
this.hoveredSection === opts.section ? "text" : "dim",
|
|
413
|
+
` ${showMoreHintText()}`,
|
|
414
|
+
);
|
|
415
|
+
pushRailLine(theme.fg("dim", `… +${hidden} more lines`) + more, opts.continued);
|
|
416
|
+
this.showMoreHeaderRows[opts.section] = lines.length - 1;
|
|
421
417
|
}
|
|
422
418
|
}
|
|
423
419
|
return truncated;
|
|
@@ -426,7 +422,6 @@ export class ExpandedToolIoView {
|
|
|
426
422
|
const hasInput = this.inputBody.trim().length > 0;
|
|
427
423
|
const outputText = this.getOutputBody();
|
|
428
424
|
|
|
429
|
-
// Decide show-more from the same truncation rules as pushBody.
|
|
430
425
|
const inputWouldTruncate =
|
|
431
426
|
hasInput &&
|
|
432
427
|
bodyExceedsLineLimit(this.inputBody, this.maxInputLines, contentWidth, true, theme);
|
|
@@ -441,20 +436,21 @@ export class ExpandedToolIoView {
|
|
|
441
436
|
|
|
442
437
|
if (hasInput) {
|
|
443
438
|
this.truncated.input = inputWouldTruncate;
|
|
444
|
-
pushHeader("├", "Input"
|
|
439
|
+
pushHeader("├", "Input");
|
|
445
440
|
pushBody(this.inputBody, {
|
|
446
441
|
input: true,
|
|
447
442
|
limit: this.maxInputLines,
|
|
448
443
|
continued: true,
|
|
444
|
+
section: "input",
|
|
449
445
|
});
|
|
450
446
|
pushBlankRail();
|
|
451
447
|
this.truncated.output = outputWouldTruncate;
|
|
452
|
-
pushHeader("└", "Output"
|
|
453
|
-
pushBody(outputText, { limit: this.maxOutputLines, continued: false });
|
|
448
|
+
pushHeader("└", "Output");
|
|
449
|
+
pushBody(outputText, { limit: this.maxOutputLines, continued: false, section: "output" });
|
|
454
450
|
} else {
|
|
455
451
|
this.truncated.output = outputWouldTruncate;
|
|
456
|
-
pushHeader("└", "Output"
|
|
457
|
-
pushBody(outputText, { limit: this.maxOutputLines, continued: false });
|
|
452
|
+
pushHeader("└", "Output");
|
|
453
|
+
pushBody(outputText, { limit: this.maxOutputLines, continued: false, section: "output" });
|
|
458
454
|
}
|
|
459
455
|
|
|
460
456
|
this.cachedWidth = width;
|
|
@@ -655,16 +651,24 @@ export function renderExpandedToolResult(
|
|
|
655
651
|
): ExpandedToolIoView | ExpandedToolResultText | Text {
|
|
656
652
|
const inputBody = formatToolInputArgs(args);
|
|
657
653
|
const outputBody = body;
|
|
658
|
-
const
|
|
654
|
+
const maxOutputLines = config.expandedOutputMaxLines;
|
|
655
|
+
const maxInputLines = config.expandedInputMaxLines;
|
|
659
656
|
|
|
660
657
|
// Prefer structured Input/Output when we have args or non-empty output.
|
|
661
658
|
if (inputBody.trim() || outputBody.trim()) {
|
|
662
659
|
let view: ExpandedToolIoView;
|
|
663
660
|
if (isExpandedToolIoView(lastComponent)) {
|
|
664
|
-
lastComponent.setContent(inputBody, outputBody, isError,
|
|
661
|
+
lastComponent.setContent(inputBody, outputBody, isError, maxOutputLines, maxInputLines);
|
|
665
662
|
view = lastComponent;
|
|
666
663
|
} else {
|
|
667
|
-
view = new ExpandedToolIoView(
|
|
664
|
+
view = new ExpandedToolIoView(
|
|
665
|
+
theme,
|
|
666
|
+
inputBody,
|
|
667
|
+
outputBody,
|
|
668
|
+
isError,
|
|
669
|
+
maxOutputLines,
|
|
670
|
+
maxInputLines,
|
|
671
|
+
);
|
|
668
672
|
}
|
|
669
673
|
if (context) rememberIoView(context, view);
|
|
670
674
|
return view;
|
|
@@ -701,7 +705,7 @@ function frameViewId(view: ExpandedToolIoView): number | null {
|
|
|
701
705
|
function withIoViewMarkers(view: ExpandedToolIoView, lines: string[]): string[] {
|
|
702
706
|
const id = frameViewId(view);
|
|
703
707
|
if (id === null) return lines;
|
|
704
|
-
// Mark by exact
|
|
708
|
+
// Mark by exact recorded show-more row from render — never scan body text heuristically.
|
|
705
709
|
const marked = lines.slice();
|
|
706
710
|
for (const { section, line } of view.showMoreHeaderLineIndexes()) {
|
|
707
711
|
if (line < 0 || line >= marked.length) continue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herbertgao/pi-cc-extensions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A Pi productivity suite with Claude Code-style UI, context inspection, and agent/session references",
|
|
6
6
|
"type": "module",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
},
|
|
70
70
|
"x-upstream": {
|
|
71
71
|
"package": "pi-cc-extensions",
|
|
72
|
-
"version": "0.8.
|
|
72
|
+
"version": "0.8.69",
|
|
73
73
|
"repository": "https://github.com/minuque/pi-cc-extensions",
|
|
74
|
-
"commit": "
|
|
74
|
+
"commit": "5d7a2666f51da9f450bd019af10200c88cc1df98"
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicesharp/rpiv-ask-user-question",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Pi extension. A structured questionnaire the model can put to you when it would otherwise guess, with typed options instead of free-form replies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@juicesharp/rpiv-config": "^2.
|
|
97
|
+
"@juicesharp/rpiv-config": "^2.9.0",
|
|
98
98
|
"typebox": "^1.1.24"
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -9,7 +9,7 @@ Only context you explicitly bring back is loaded into the main editor.
|
|
|
9
9
|
|
|
10
10
|
- Starts a side thread immediately with `/btw <question>` or opens the manager with `/btw`.
|
|
11
11
|
- Uses any persisted main-session branch as context without switching branches.
|
|
12
|
-
- Supports scrollable answers, transcript search, follow-up questions, queued steering, and in-memory resume.
|
|
12
|
+
- Supports scrollable answers, transcript search, a clickable jump-to-latest control, follow-up questions, queued steering, and in-memory resume.
|
|
13
13
|
- Keeps side questions and answers out of the main conversation by default.
|
|
14
14
|
- Brings back the latest answer, a question suffix, an exact range, or the complete thread only when requested.
|
|
15
15
|
- Uses Pi's current model and thinking level or saved pi-btw choices.
|
|
@@ -120,6 +120,9 @@ A failed response remains visible and does not discard later queued questions.
|
|
|
120
120
|
Steering never appends to the main conversation or editor.
|
|
121
121
|
|
|
122
122
|
Use the mouse wheel, trackpad, or `PgUp`/`PgDn` to scroll transcript history.
|
|
123
|
+
On Pi 0.85 or newer, scrolling away from a following transcript shows **Jump to latest message** over its final visible row.
|
|
124
|
+
Click the control or use Pi's effective `tui.altScreen.bottom` binding (`End` by default) to resume at the latest content.
|
|
125
|
+
The control disappears after the transcript returns to follow-end mode.
|
|
123
126
|
The footer shows history keys only when scrolling is available.
|
|
124
127
|
Ctrl+C cancels the active response and discards the current draft and steering queue.
|
|
125
128
|
Completed questions, answers, and visible errors remain available through Resume until the extension instance ends.
|
|
@@ -216,6 +219,7 @@ The file is read for every `/btw` invocation, so edits apply without `/reload`.
|
|
|
216
219
|
- Resume state is memory-only and lasts only for the current extension instance.
|
|
217
220
|
- A side thread retains the latest 40,000 characters of main-conversation context and adds a truncation notice when earlier content is omitted.
|
|
218
221
|
- Clipboard access depends on Pi's host helper, the operating system, and the terminal.
|
|
222
|
+
- Pi versions before 0.85 omit the clickable jump-to-latest control.
|
|
219
223
|
|
|
220
224
|
## 🗂️ Package layout
|
|
221
225
|
|
|
@@ -482,8 +482,10 @@ import {
|
|
|
482
482
|
} from "@earendil-works/pi-coding-agent";
|
|
483
483
|
import {
|
|
484
484
|
isKeyRelease,
|
|
485
|
+
isKittyProtocolActive,
|
|
485
486
|
Key as Key2,
|
|
486
487
|
matchesKey as matchesKey2,
|
|
488
|
+
parseKey,
|
|
487
489
|
TuiAltScreen,
|
|
488
490
|
truncateToWidth as truncateToWidth2
|
|
489
491
|
} from "@earendil-works/pi-tui";
|
|
@@ -495,6 +497,18 @@ function sanitizeSingleLine(text) {
|
|
|
495
497
|
return code > 31 && (code < 127 || code > 159);
|
|
496
498
|
}).join("").replace(/ +/gu, " ").trim();
|
|
497
499
|
}
|
|
500
|
+
function formatKeyLabel2(key) {
|
|
501
|
+
const sanitized = sanitizeSingleLine(key);
|
|
502
|
+
if (!sanitized) return "";
|
|
503
|
+
return sanitized.split("+").map((part) => {
|
|
504
|
+
const lower = part.toLowerCase();
|
|
505
|
+
if (lower === "shift") return "Shift";
|
|
506
|
+
if (lower === "ctrl") return "Ctrl";
|
|
507
|
+
if (lower === "alt") return "Alt";
|
|
508
|
+
if (lower === "super") return "Super";
|
|
509
|
+
return part.length === 1 ? part.toUpperCase() : `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`;
|
|
510
|
+
}).join("+");
|
|
511
|
+
}
|
|
498
512
|
|
|
499
513
|
// src/fullscreen-ui.ts
|
|
500
514
|
var FullscreenUiDisposedError = class extends Error {
|
|
@@ -607,6 +621,88 @@ var BtwTuiAltScreen = class extends TuiAltScreen {
|
|
|
607
621
|
};
|
|
608
622
|
var BRACKETED_PASTE_START = "\x1B[200~";
|
|
609
623
|
var BRACKETED_PASTE_END = "\x1B[201~";
|
|
624
|
+
var ALT_SCREEN_ACTIONS_BEFORE_BOTTOM = [
|
|
625
|
+
"tui.altScreen.search",
|
|
626
|
+
"tui.altScreen.searchNext",
|
|
627
|
+
"tui.altScreen.searchPrevious",
|
|
628
|
+
"tui.altScreen.searchClose",
|
|
629
|
+
"tui.altScreen.pageUp",
|
|
630
|
+
"tui.altScreen.pageDown",
|
|
631
|
+
"tui.altScreen.halfPageUp",
|
|
632
|
+
"tui.altScreen.halfPageDown",
|
|
633
|
+
"tui.altScreen.lineUp",
|
|
634
|
+
"tui.altScreen.lineDown",
|
|
635
|
+
"tui.altScreen.previousPrompt",
|
|
636
|
+
"tui.altScreen.nextPrompt",
|
|
637
|
+
"tui.altScreen.top"
|
|
638
|
+
];
|
|
639
|
+
var KEY_MODIFIER_ORDER = ["shift", "ctrl", "alt", "super"];
|
|
640
|
+
var MATCHABLE_SPECIAL_KEYS = /* @__PURE__ */ new Set([
|
|
641
|
+
"space",
|
|
642
|
+
"tab",
|
|
643
|
+
"enter",
|
|
644
|
+
"backspace",
|
|
645
|
+
"delete",
|
|
646
|
+
"insert",
|
|
647
|
+
"home",
|
|
648
|
+
"end",
|
|
649
|
+
"pageup",
|
|
650
|
+
"pagedown",
|
|
651
|
+
"up",
|
|
652
|
+
"down",
|
|
653
|
+
"left",
|
|
654
|
+
"right"
|
|
655
|
+
]);
|
|
656
|
+
var MATCHABLE_SYMBOL_KEYS = new Set("`-=[]\\;',./!@#$%^&*()_+|~{}:<>?");
|
|
657
|
+
function normalizedKeyId(key) {
|
|
658
|
+
const parts = key.toLowerCase().split("+");
|
|
659
|
+
const base = parts.at(-1);
|
|
660
|
+
if (!base) return "";
|
|
661
|
+
const normalizedBase = base === "esc" ? "escape" : base === "return" ? "enter" : base;
|
|
662
|
+
const modifiers = KEY_MODIFIER_ORDER.filter((modifier) => parts.includes(modifier));
|
|
663
|
+
return [...modifiers, normalizedBase].join("+");
|
|
664
|
+
}
|
|
665
|
+
function formatEffectiveKeyLabel(key) {
|
|
666
|
+
const parts = key.split("+");
|
|
667
|
+
const base = parts.at(-1);
|
|
668
|
+
if (base === "pageup") parts[parts.length - 1] = "pageUp";
|
|
669
|
+
if (base === "pagedown") parts[parts.length - 1] = "pageDown";
|
|
670
|
+
return formatKeyLabel2(parts.join("+"));
|
|
671
|
+
}
|
|
672
|
+
function canMatchKeyInput(key) {
|
|
673
|
+
const parts = key.split("+");
|
|
674
|
+
const base = parts.at(-1) ?? "";
|
|
675
|
+
const modifiers = parts.slice(0, -1);
|
|
676
|
+
if (base === "escape") return modifiers.length === 0;
|
|
677
|
+
if (base === "clear") {
|
|
678
|
+
return modifiers.length === 0 || modifiers.length === 1 && (modifiers[0] === "shift" || modifiers[0] === "ctrl");
|
|
679
|
+
}
|
|
680
|
+
if (/^f(?:[1-9]|1[0-2])$/u.test(base)) return modifiers.length === 0;
|
|
681
|
+
return MATCHABLE_SPECIAL_KEYS.has(base) || base.length === 1 && (/^[a-z0-9]$/u.test(base) || MATCHABLE_SYMBOL_KEYS.has(base));
|
|
682
|
+
}
|
|
683
|
+
function rawCtrlInput(base) {
|
|
684
|
+
if (base.length !== 1) return void 0;
|
|
685
|
+
const rawBase = base === "-" ? "_" : base;
|
|
686
|
+
if (!"abcdefghijklmnopqrstuvwxyz[\\]_".includes(rawBase)) return void 0;
|
|
687
|
+
return String.fromCharCode(rawBase.charCodeAt(0) & 31);
|
|
688
|
+
}
|
|
689
|
+
function legacyRawInput(key) {
|
|
690
|
+
const parts = key.split("+");
|
|
691
|
+
const base = parts.at(-1) ?? "";
|
|
692
|
+
if (parts.length === 2 && parts[0] === "ctrl") return rawCtrlInput(base);
|
|
693
|
+
if (isKittyProtocolActive()) return void 0;
|
|
694
|
+
if (parts.length === 2 && parts[0] === "alt" && base.length === 1) return `\x1B${base}`;
|
|
695
|
+
if (parts.length === 3 && parts[0] === "ctrl" && parts[1] === "alt") {
|
|
696
|
+
const input = rawCtrlInput(base);
|
|
697
|
+
return input ? `\x1B${input}` : void 0;
|
|
698
|
+
}
|
|
699
|
+
return void 0;
|
|
700
|
+
}
|
|
701
|
+
function keyInputIdentity(key) {
|
|
702
|
+
const identity = normalizedKeyId(key);
|
|
703
|
+
const input = legacyRawInput(identity);
|
|
704
|
+
return input ? normalizedKeyId(parseKey(input) ?? identity) : identity;
|
|
705
|
+
}
|
|
610
706
|
function hasManualSelectionCopyApi() {
|
|
611
707
|
return typeof TuiAltScreen.prototype.hasActiveSelection === "function" && typeof TuiAltScreen.prototype.copyActiveSelectionToClipboard === "function";
|
|
612
708
|
}
|
|
@@ -625,6 +721,25 @@ function createBtwFullscreenTui(parent, theme, keybindings, copyOnSelect, manual
|
|
|
625
721
|
mouse: true,
|
|
626
722
|
copyOnSelect,
|
|
627
723
|
searchMatchStyle: (text) => theme.underline(styleSearchMatch(text)),
|
|
724
|
+
scrollToEndIndicator: () => {
|
|
725
|
+
const unavailableKeyIdentities = /* @__PURE__ */ new Set([keyInputIdentity(Key2.ctrl("c"))]);
|
|
726
|
+
for (const action of ALT_SCREEN_ACTIONS_BEFORE_BOTTOM) {
|
|
727
|
+
for (const actionKey of keybindings.getKeys(action)) {
|
|
728
|
+
unavailableKeyIdentities.add(keyInputIdentity(String(actionKey)));
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
if (!copyOnSelect) {
|
|
732
|
+
for (const copyKey of keybindings.getKeys("app.message.copy")) {
|
|
733
|
+
unavailableKeyIdentities.add(keyInputIdentity(String(copyKey)));
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
const key = keybindings.getKeys("tui.altScreen.bottom").map((candidate) => keyInputIdentity(String(candidate))).find(
|
|
737
|
+
(identity) => identity && canMatchKeyInput(identity) && !unavailableKeyIdentities.has(identity) && formatEffectiveKeyLabel(identity)
|
|
738
|
+
);
|
|
739
|
+
const label = theme.fg("text", " \u2193 Jump to latest message");
|
|
740
|
+
const shortcut = key ? theme.fg("muted", ` \xB7 ${formatEffectiveKeyLabel(key)}`) : "";
|
|
741
|
+
return theme.bg("selectedBg", `${label}${shortcut} `);
|
|
742
|
+
},
|
|
628
743
|
searchCurrentMatchStyle: (text) => theme.bold(theme.inverse(styleSearchMatch(text))),
|
|
629
744
|
openUrl,
|
|
630
745
|
copySelection: async (text) => {
|
|
@@ -693,9 +808,11 @@ var BtwFullscreenHost = class {
|
|
|
693
808
|
disposed = false;
|
|
694
809
|
finished = false;
|
|
695
810
|
parentStopped = false;
|
|
696
|
-
|
|
811
|
+
parentRestoreAttempted = false;
|
|
697
812
|
fullscreenCreated = false;
|
|
698
813
|
fullscreenStopped = false;
|
|
814
|
+
parentRestoreQueued = false;
|
|
815
|
+
parentRestorePromise;
|
|
699
816
|
cleanupError;
|
|
700
817
|
setParentOverlay(overlay) {
|
|
701
818
|
this.parentOverlay = overlay;
|
|
@@ -728,7 +845,7 @@ var BtwFullscreenHost = class {
|
|
|
728
845
|
try {
|
|
729
846
|
this.hardCancelActiveCustom?.();
|
|
730
847
|
} finally {
|
|
731
|
-
this.
|
|
848
|
+
this.queueParentRestore();
|
|
732
849
|
}
|
|
733
850
|
return { consume: true };
|
|
734
851
|
});
|
|
@@ -741,14 +858,33 @@ var BtwFullscreenHost = class {
|
|
|
741
858
|
} catch (error) {
|
|
742
859
|
this.cleanupError ??= error;
|
|
743
860
|
}
|
|
744
|
-
this.
|
|
861
|
+
if (this.parentRestorePromise) await this.parentRestorePromise;
|
|
862
|
+
else this.restoreParent();
|
|
745
863
|
if (this.cleanupError !== void 0) outcome = { kind: "failed", error: this.cleanupError };
|
|
746
864
|
this.finished = true;
|
|
747
865
|
this.done(outcome);
|
|
748
866
|
}
|
|
867
|
+
queueParentRestore() {
|
|
868
|
+
if (this.parentRestoreQueued || this.parentRestoreAttempted) return;
|
|
869
|
+
this.parentRestoreQueued = true;
|
|
870
|
+
this.parentRestorePromise = Promise.resolve().then(async () => {
|
|
871
|
+
try {
|
|
872
|
+
await this.fullscreen?.terminal.drainInput?.();
|
|
873
|
+
} catch (error) {
|
|
874
|
+
this.cleanupError ??= error;
|
|
875
|
+
}
|
|
876
|
+
this.parentRestoreQueued = false;
|
|
877
|
+
this.restoreParent();
|
|
878
|
+
});
|
|
879
|
+
}
|
|
749
880
|
restoreParent() {
|
|
750
|
-
this.removeHardCancelListener
|
|
881
|
+
const removeHardCancelListener = this.removeHardCancelListener;
|
|
751
882
|
this.removeHardCancelListener = void 0;
|
|
883
|
+
try {
|
|
884
|
+
removeHardCancelListener?.();
|
|
885
|
+
} catch (error) {
|
|
886
|
+
this.cleanupError ??= error;
|
|
887
|
+
}
|
|
752
888
|
if (this.fullscreenCreated && !this.fullscreenStopped) {
|
|
753
889
|
this.fullscreenStopped = true;
|
|
754
890
|
try {
|
|
@@ -757,7 +893,7 @@ var BtwFullscreenHost = class {
|
|
|
757
893
|
this.cleanupError ??= error;
|
|
758
894
|
}
|
|
759
895
|
}
|
|
760
|
-
if (!this.parentStopped || this.
|
|
896
|
+
if (!this.parentStopped || this.parentRestoreAttempted) return;
|
|
761
897
|
const parentOverlay = this.parentOverlay;
|
|
762
898
|
this.parentOverlay = void 0;
|
|
763
899
|
try {
|
|
@@ -766,8 +902,8 @@ var BtwFullscreenHost = class {
|
|
|
766
902
|
this.cleanupError ??= error;
|
|
767
903
|
}
|
|
768
904
|
try {
|
|
905
|
+
this.parentRestoreAttempted = true;
|
|
769
906
|
this.parent.start();
|
|
770
|
-
this.parentRestarted = true;
|
|
771
907
|
this.parent.renderNow(false);
|
|
772
908
|
} catch (error) {
|
|
773
909
|
this.cleanupError ??= error;
|
|
@@ -2355,14 +2491,7 @@ function renderSideThreadHeader(width, theme, thinkingLevel) {
|
|
|
2355
2491
|
return theme.fg("muted", `${title}${"\u2500".repeat(ruleWidth)}`);
|
|
2356
2492
|
}
|
|
2357
2493
|
function thinkingKeyLabel(keybindings) {
|
|
2358
|
-
|
|
2359
|
-
return key.split("+").map((part) => {
|
|
2360
|
-
const lower = part.toLowerCase();
|
|
2361
|
-
if (lower === "shift") return "Shift";
|
|
2362
|
-
if (lower === "ctrl") return "Ctrl";
|
|
2363
|
-
if (lower === "alt") return "Alt";
|
|
2364
|
-
return part.length === 1 ? part.toUpperCase() : `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`;
|
|
2365
|
-
}).join("+");
|
|
2494
|
+
return formatKeyLabel2(String(keybindings.getKeys("app.thinking.cycle")[0] ?? "shift+tab")) || "Shift+Tab";
|
|
2366
2495
|
}
|
|
2367
2496
|
function fitComposerLayout(header, contentLines, footer, editorLines, availableRows, statusLines = []) {
|
|
2368
2497
|
const lines = [header, ...contentLines, ...statusLines, footer, ...editorLines];
|