@herbertgao/pi-extensions 2026.9.19 → 2026.10.0
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 +14 -16
- package/THIRD_PARTY_NOTICES.md +29 -3
- package/node_modules/@herbertgao/pi-bark/README.md +39 -3
- package/node_modules/@herbertgao/pi-bark/package.json +1 -1
- package/node_modules/@herbertgao/pi-bark/src/index.ts +275 -15
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +85 -68
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +79 -62
- package/node_modules/@herbertgao/pi-cc-extensions/assets/readme/preview.webp +0 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +116 -34
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +370 -118
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/core.ts +6 -36
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/index.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +31 -33
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +330 -360
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/reference/index.ts +56 -108
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/reference/session.ts +97 -15
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/reference/subagent.ts +80 -45
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/flush-docked-bash.ts +36 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer-layout.ts +229 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer.ts +521 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/mcp-chip.ts +136 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/startup-header.ts +92 -61
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/working-message.ts +58 -38
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/index.ts +19 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +1127 -231
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +267 -262
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/index.ts +38 -48
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/markdown-enhance.ts +8 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/hover.ts +2 -7
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +287 -114
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/layout.ts +15 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/packets.ts +18 -72
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/scroll.ts +61 -26
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +303 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/ansi-utils.ts +25 -57
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-component.ts +125 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-edit-render.ts +227 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-header.ts +136 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-highlight.ts +151 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-inline.ts +324 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-layout.ts +762 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-limits.ts +152 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-palette.ts +410 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-parse.ts +535 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-presentation.ts +4 -4
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-renderer.ts +21 -3219
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-text.ts +44 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-write-render.ts +568 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/index.ts +103 -48
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/line-width-safety.ts +8 -7
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/write-execution.ts +2 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +171 -196
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/mcp-title.ts +39 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/{message-display.ts → tool/message-display.ts} +27 -93
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +429 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +259 -164
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/{show-more-hint.ts → tool/show-more-hint.ts} +10 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/transcript-refresh.ts +8 -26
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/ansi-color.ts +44 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/ansi-text.ts +77 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/component-tree.ts +34 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/format.ts +28 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/fullscreen-detect.ts +51 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/patch-keys.ts +124 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/sgr-mouse.ts +70 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +10 -8
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/package.json +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/mention-clone.ts +3 -2
- package/node_modules/@herbertgao/sol-pi/CONTRIBUTING.md +22 -0
- package/node_modules/@herbertgao/sol-pi/README.md +36 -17
- package/node_modules/@herbertgao/sol-pi/THIRD_PARTY_NOTICES.md +10 -6
- package/node_modules/@herbertgao/sol-pi/agents-install.md +15 -12
- package/node_modules/@herbertgao/sol-pi/docs/compatibility.md +24 -8
- package/node_modules/@herbertgao/sol-pi/docs/configuration.md +2 -2
- package/node_modules/@herbertgao/sol-pi/docs/star-history.md +18 -0
- package/node_modules/@herbertgao/sol-pi/package.json +4 -2
- package/node_modules/@herbertgao/sol-pi/scripts/check-sol-pi-config.mjs +1 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/config.ts +1 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/file-queue.ts +23 -4
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/index.ts +32 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/then-run.ts +3 -2
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/observation-pack/observation.ts +1 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/economics.ts +27 -7
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/extension.ts +137 -41
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/index.ts +1 -0
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/plan.ts +2 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/projection.ts +58 -0
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/state.ts +28 -6
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/tools.ts +2 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/runtime-paths.ts +15 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +2 -2
- package/node_modules/@pi-plugins/fast-mode/README.md +7 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +7 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/package.json +5 -5
- package/node_modules/pi-antigravity/README.md +3 -0
- package/node_modules/pi-antigravity/package.json +8 -8
- package/node_modules/pi-antigravity/src/auth/oauth.ts +6 -3
- package/node_modules/pi-antigravity/src/index.ts +114 -110
- package/node_modules/pi-antigravity/src/stream/stream.ts +1 -1
- package/node_modules/pi-antigravity/src/utils/util.ts +18 -1
- package/node_modules/pi-multi-account/CHANGELOG.md +20 -0
- package/node_modules/pi-multi-account/README.md +46 -8
- package/node_modules/pi-multi-account/config-file-transaction.ts +42 -0
- package/node_modules/pi-multi-account/index.ts +255 -269
- package/node_modules/pi-multi-account/model-pins.ts +36 -0
- package/node_modules/pi-multi-account/package.json +9 -7
- package/node_modules/pi-multi-account/slot-proxy-auth.ts +12 -2
- package/node_modules/pi-multi-account/slot-proxy.ts +27 -5
- package/node_modules/pi-web-access/CHANGELOG.md +17 -0
- package/node_modules/pi-web-access/README.md +6 -3
- package/node_modules/pi-web-access/brave-rate-limit.ts +170 -0
- package/node_modules/pi-web-access/brave.ts +28 -11
- package/node_modules/pi-web-access/dist/index.js +202 -33
- package/node_modules/pi-web-access/gemini-search.ts +2 -5
- package/node_modules/pi-web-access/index.ts +13 -7
- package/node_modules/pi-web-access/openai-search.ts +24 -10
- package/node_modules/pi-web-access/package.json +1 -1
- package/node_modules/pi-web-access/summary-review.ts +8 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/README.md +16 -12
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/adapter.d.ts +0 -5
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/adapter.js +2 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/contract.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/reader.d.ts +3 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/reader.js +27 -15
- package/node_modules/{@herbertgao/resume-from/dist/adapters/codex → resume-from/dist/adapters/claude-code}/redaction.js +16 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/writer.d.ts +2 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/writer.js +1 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/contract.d.ts +2 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/index.js +1 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/read.d.ts +16 -0
- package/node_modules/resume-from/dist/adapters/codex/read.js +723 -0
- package/node_modules/{@herbertgao/resume-from/dist/adapters/pi → resume-from/dist/adapters/codex}/redaction.js +16 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/rollout.d.ts +44 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/rollout.js +88 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/write.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/write.js +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/contract.d.ts +5 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/adapter.js +10 -6
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/contract.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from/dist/adapters/claude-code → resume-from/dist/adapters/pi}/redaction.js +16 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/serialize.d.ts +2 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/serialize.js +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/render.d.ts +1 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/render.js +4 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/runner.js +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/contract.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/command.js +31 -8
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/wiring.d.ts +1 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/wiring.js +1 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/confirmation.d.ts +4 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/confirmation.js +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/contract.d.ts +8 -6
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/contract.d.ts +10 -5
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/finder.d.ts +2 -1
- package/node_modules/resume-from/dist/import/discovery/finder.js +269 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/contract.d.ts +3 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/lander.js +3 -3
- package/node_modules/resume-from/dist/import/pipeline.d.ts +28 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/pipeline.js +31 -11
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/builder.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/builder.js +9 -5
- package/node_modules/resume-from/dist/import/preview/warnings.d.ts +14 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/warnings.js +26 -20
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/wiring.js +12 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/contract.d.ts +9 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/git.d.ts +4 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/git.js +7 -4
- package/node_modules/resume-from/dist/platform/repo/reader.d.ts +3 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/reader.js +60 -20
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/session/contract.d.ts +8 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/package.json +19 -32
- package/node_modules/{@herbertgao/resume-from → resume-from}/shims/pi/extensions/resume-from.js +2 -2
- package/package.json +18 -22
- package/node_modules/@herbertgao/pi-cc-extensions/assets/readme/hero.en.svg +0 -101
- package/node_modules/@herbertgao/pi-cc-extensions/assets/readme/hero.svg +0 -101
- package/node_modules/@herbertgao/pi-cc-extensions/assets/readme/welcome.webp +0 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/render-utils.ts +0 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/types.ts +0 -30
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/write-display-utils.ts +0 -12
- package/node_modules/@herbertgao/resume-from/dist/adapters/codex/read.js +0 -270
- package/node_modules/@herbertgao/resume-from/dist/import/discovery/finder.js +0 -129
- package/node_modules/@herbertgao/resume-from/dist/import/pipeline.d.ts +0 -17
- package/node_modules/@herbertgao/resume-from/dist/import/preview/warnings.d.ts +0 -11
- package/node_modules/@herbertgao/resume-from/dist/platform/repo/reader.d.ts +0 -8
- package/node_modules/pi-footer/CHANGELOG.md +0 -145
- package/node_modules/pi-footer/LICENSE +0 -21
- package/node_modules/pi-footer/README.md +0 -354
- package/node_modules/pi-footer/package.json +0 -68
- package/node_modules/pi-footer/src/cache.ts +0 -106
- package/node_modules/pi-footer/src/colors.ts +0 -237
- package/node_modules/pi-footer/src/config.ts +0 -202
- package/node_modules/pi-footer/src/event-widgets.ts +0 -41
- package/node_modules/pi-footer/src/extension-statuses.ts +0 -102
- package/node_modules/pi-footer/src/git.ts +0 -135
- package/node_modules/pi-footer/src/index.ts +0 -268
- package/node_modules/pi-footer/src/metrics.ts +0 -141
- package/node_modules/pi-footer/src/presets.ts +0 -383
- package/node_modules/pi-footer/src/render.ts +0 -114
- package/node_modules/pi-footer/src/separators.ts +0 -52
- package/node_modules/pi-footer/src/types.ts +0 -122
- package/node_modules/pi-footer/src/ui/color-level-confirm.ts +0 -22
- package/node_modules/pi-footer/src/ui/color-options.ts +0 -195
- package/node_modules/pi-footer/src/ui/config-lifecycle.ts +0 -61
- package/node_modules/pi-footer/src/ui/edit-colors.ts +0 -13
- package/node_modules/pi-footer/src/ui/events.ts +0 -35
- package/node_modules/pi-footer/src/ui/extension-status-picker.ts +0 -60
- package/node_modules/pi-footer/src/ui/extension-statuses.ts +0 -73
- package/node_modules/pi-footer/src/ui/fields.ts +0 -252
- package/node_modules/pi-footer/src/ui/global-menu.ts +0 -126
- package/node_modules/pi-footer/src/ui/helpers.ts +0 -44
- package/node_modules/pi-footer/src/ui/layout.ts +0 -17
- package/node_modules/pi-footer/src/ui/line-list.ts +0 -19
- package/node_modules/pi-footer/src/ui/model.ts +0 -64
- package/node_modules/pi-footer/src/ui/navigation.ts +0 -29
- package/node_modules/pi-footer/src/ui/option-edit.ts +0 -93
- package/node_modules/pi-footer/src/ui/overlay-render.ts +0 -103
- package/node_modules/pi-footer/src/ui/screen-context.ts +0 -18
- package/node_modules/pi-footer/src/ui/screen-controller.ts +0 -27
- package/node_modules/pi-footer/src/ui/screen-render.ts +0 -32
- package/node_modules/pi-footer/src/ui/screen-state.ts +0 -20
- package/node_modules/pi-footer/src/ui/screen.ts +0 -243
- package/node_modules/pi-footer/src/ui/screens/add-widget.ts +0 -92
- package/node_modules/pi-footer/src/ui/screens/confirm-exit.ts +0 -52
- package/node_modules/pi-footer/src/ui/screens/controller.ts +0 -12
- package/node_modules/pi-footer/src/ui/screens/edit-colors.ts +0 -68
- package/node_modules/pi-footer/src/ui/screens/edit-widget.ts +0 -115
- package/node_modules/pi-footer/src/ui/screens/extension-status-row.ts +0 -61
- package/node_modules/pi-footer/src/ui/screens/global.ts +0 -75
- package/node_modules/pi-footer/src/ui/screens/line-list.ts +0 -108
- package/node_modules/pi-footer/src/ui/screens/main.ts +0 -99
- package/node_modules/pi-footer/src/ui/screens/terminal.ts +0 -121
- package/node_modules/pi-footer/src/ui/screens/widget-list.ts +0 -154
- package/node_modules/pi-footer/src/ui/terminal-menu.ts +0 -32
- package/node_modules/pi-footer/src/ui/theme.ts +0 -48
- package/node_modules/pi-footer/src/ui/title-bar.ts +0 -100
- package/node_modules/pi-footer/src/ui/widget-actions.ts +0 -76
- package/node_modules/pi-footer/src/ui.ts +0 -66
- package/node_modules/pi-footer/src/widgets/context.ts +0 -28
- package/node_modules/pi-footer/src/widgets/core/active-tools.ts +0 -17
- package/node_modules/pi-footer/src/widgets/core/context-window.ts +0 -24
- package/node_modules/pi-footer/src/widgets/core/cwd-basename.ts +0 -19
- package/node_modules/pi-footer/src/widgets/core/cwd.ts +0 -108
- package/node_modules/pi-footer/src/widgets/core/event.ts +0 -34
- package/node_modules/pi-footer/src/widgets/core/external-status.ts +0 -102
- package/node_modules/pi-footer/src/widgets/core/model-provider.ts +0 -20
- package/node_modules/pi-footer/src/widgets/core/model.ts +0 -35
- package/node_modules/pi-footer/src/widgets/core/provider.ts +0 -17
- package/node_modules/pi-footer/src/widgets/core/session-name.ts +0 -17
- package/node_modules/pi-footer/src/widgets/core/text-verbosity.ts +0 -17
- package/node_modules/pi-footer/src/widgets/core/thinking-level.ts +0 -17
- package/node_modules/pi-footer/src/widgets/git/ahead-behind.ts +0 -17
- package/node_modules/pi-footer/src/widgets/git/branch.ts +0 -81
- package/node_modules/pi-footer/src/widgets/git/clean.ts +0 -19
- package/node_modules/pi-footer/src/widgets/git/deletions.ts +0 -17
- package/node_modules/pi-footer/src/widgets/git/diff.ts +0 -38
- package/node_modules/pi-footer/src/widgets/git/insertions.ts +0 -17
- package/node_modules/pi-footer/src/widgets/git/remote.ts +0 -17
- package/node_modules/pi-footer/src/widgets/git/root.ts +0 -17
- package/node_modules/pi-footer/src/widgets/git/sha.ts +0 -17
- package/node_modules/pi-footer/src/widgets/git/staged.ts +0 -17
- package/node_modules/pi-footer/src/widgets/git/status.ts +0 -19
- package/node_modules/pi-footer/src/widgets/git/unstaged.ts +0 -17
- package/node_modules/pi-footer/src/widgets/git/untracked.ts +0 -17
- package/node_modules/pi-footer/src/widgets/instance.ts +0 -118
- package/node_modules/pi-footer/src/widgets/layout/custom-text.ts +0 -18
- package/node_modules/pi-footer/src/widgets/layout/flex-separator.ts +0 -32
- package/node_modules/pi-footer/src/widgets/layout/separator.ts +0 -57
- package/node_modules/pi-footer/src/widgets/layout/spacer.ts +0 -31
- package/node_modules/pi-footer/src/widgets/options.ts +0 -122
- package/node_modules/pi-footer/src/widgets/project/runtime.ts +0 -361
- package/node_modules/pi-footer/src/widgets/registry.ts +0 -223
- package/node_modules/pi-footer/src/widgets/session/assistant-messages.ts +0 -17
- package/node_modules/pi-footer/src/widgets/session/compactions.ts +0 -17
- package/node_modules/pi-footer/src/widgets/session/elapsed.ts +0 -18
- package/node_modules/pi-footer/src/widgets/session/last-activity.ts +0 -18
- package/node_modules/pi-footer/src/widgets/session/messages.ts +0 -19
- package/node_modules/pi-footer/src/widgets/session/session-id.ts +0 -17
- package/node_modules/pi-footer/src/widgets/session/session-start.ts +0 -18
- package/node_modules/pi-footer/src/widgets/session/tool-results.ts +0 -17
- package/node_modules/pi-footer/src/widgets/session/total-messages.ts +0 -19
- package/node_modules/pi-footer/src/widgets/session/total-time.ts +0 -18
- package/node_modules/pi-footer/src/widgets/session/user-messages.ts +0 -17
- package/node_modules/pi-footer/src/widgets/store.ts +0 -26
- package/node_modules/pi-footer/src/widgets/tokens/cache-hit-rate.ts +0 -55
- package/node_modules/pi-footer/src/widgets/tokens/cache-read.ts +0 -18
- package/node_modules/pi-footer/src/widgets/tokens/cache-write.ts +0 -18
- package/node_modules/pi-footer/src/widgets/tokens/context-bar.ts +0 -108
- package/node_modules/pi-footer/src/widgets/tokens/context-length.ts +0 -26
- package/node_modules/pi-footer/src/widgets/tokens/context-remaining.ts +0 -29
- package/node_modules/pi-footer/src/widgets/tokens/context.ts +0 -29
- package/node_modules/pi-footer/src/widgets/tokens/cost.ts +0 -51
- package/node_modules/pi-footer/src/widgets/tokens/input-speed.ts +0 -25
- package/node_modules/pi-footer/src/widgets/tokens/input-tokens.ts +0 -18
- package/node_modules/pi-footer/src/widgets/tokens/output-speed.ts +0 -25
- package/node_modules/pi-footer/src/widgets/tokens/output-tokens.ts +0 -18
- package/node_modules/pi-footer/src/widgets/tokens/tokens.ts +0 -20
- package/node_modules/pi-footer/src/widgets/tokens/total-speed.ts +0 -25
- package/node_modules/pi-footer/src/widgets/tokens/total-tokens.ts +0 -18
- package/node_modules/pi-footer/src/widgets/types.ts +0 -181
- package/node_modules/pi-footer/src/widgets/utils/colors.ts +0 -11
- package/node_modules/pi-footer/src/widgets/utils/context.ts +0 -112
- package/node_modules/pi-footer/src/widgets/utils/session.ts +0 -19
- package/node_modules/pi-footer/src/widgets/utils/token-format.ts +0 -78
- /package/node_modules/{@herbertgao/resume-from → resume-from}/LICENSE +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/entries.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/entries.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/layout.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/layout.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/readback.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/readback.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/redaction.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/validation.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/validation.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/readback.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/readback.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/redaction.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/validation.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/validation.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/adapter.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/format.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/format.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/parse.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/parse.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/redaction.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/validate.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/validate.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/bin.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/bin.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/agents.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/agents.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/args.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/args.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/presentation.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/presentation.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/runner.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/entry.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/entry.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/command.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/picker.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/picker.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/presentation.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/presentation.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/register.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/register.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/ui.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/ui.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/profile.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/profile.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/registry.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/registry.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/errors.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/errors.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/homes.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/homes.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/ordering.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/ordering.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/errors.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/errors.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/errors.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/errors.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/handover.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/handover.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/lander.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/marker.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/marker.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/format.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/format.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/rules.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/rules.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/wiring.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/defaults.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/defaults.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/errors.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/errors.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/loader.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/loader.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/paths.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/paths.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/validate.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/validate.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/file-committer.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/file-committer.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/estimator.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/estimator.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/session/contract.js +0 -0
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="400" viewBox="0 0 1200 400" role="img" aria-labelledby="title desc">
|
|
2
|
-
<title id="title">pi-cc-extensions
|
|
3
|
-
</title>
|
|
4
|
-
<desc id="desc">Claude 与 Pi 品牌图标组合连接三项扩展能力:Claude Code 风格界面、上下文洞察和历史 Session 引用。
|
|
5
|
-
</desc>
|
|
6
|
-
<defs>
|
|
7
|
-
<linearGradient id="panel" x1="0" y1="0" x2="1" y2="1">
|
|
8
|
-
<stop offset="0" stop-color="#0D131B"/>
|
|
9
|
-
<stop offset="1" stop-color="#090D12"/>
|
|
10
|
-
</linearGradient>
|
|
11
|
-
</defs>
|
|
12
|
-
<rect width="1200" height="400" rx="28" fill="url(#panel)"/>
|
|
13
|
-
<rect x="1" y="1" width="1198" height="398" rx="27" fill="none" stroke="#263241" stroke-width="2"/>
|
|
14
|
-
<g id="title-block" transform="translate(64 58)" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif">
|
|
15
|
-
<g font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="16" font-weight="600" letter-spacing="1.4">
|
|
16
|
-
<text x="0" y="0" fill="#66E3C4">PI EXTENSION
|
|
17
|
-
</text>
|
|
18
|
-
</g>
|
|
19
|
-
<text x="0" y="82" fill="#F4F7FA" font-size="54" font-weight="750" letter-spacing="-1.5">pi-cc-extensions
|
|
20
|
-
</text>
|
|
21
|
-
<text x="0" y="130" fill="#B8C3CF" font-size="23">让 Pi 工作时表现像 Claude code 🙃
|
|
22
|
-
</text>
|
|
23
|
-
<g transform="translate(0 180)" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="17">
|
|
24
|
-
<rect width="488" height="58" rx="12" fill="#111923" stroke="#2B3948"/>
|
|
25
|
-
<text x="20" y="36" fill="#66E3C4">›
|
|
26
|
-
</text>
|
|
27
|
-
<text x="44" y="36" fill="#F4F7FA">/ccstyle
|
|
28
|
-
</text>
|
|
29
|
-
<text x="155" y="36" fill="#536172">·
|
|
30
|
-
</text>
|
|
31
|
-
<text x="178" y="36" fill="#7CC7FF">/context
|
|
32
|
-
</text>
|
|
33
|
-
<text x="292" y="36" fill="#536172">·
|
|
34
|
-
</text>
|
|
35
|
-
<text x="315" y="36" fill="#F2C879">@session:
|
|
36
|
-
</text>
|
|
37
|
-
<rect x="411" y="22" width="9" height="20" rx="2" fill="#66E3C4"/>
|
|
38
|
-
</g>
|
|
39
|
-
<g transform="translate(0 282)" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="15">
|
|
40
|
-
<circle cx="6" cy="-5" r="6" fill="#66E3C4"/>
|
|
41
|
-
<text x="22" y="0" fill="#8B9AAD">3 EXTENSIONS
|
|
42
|
-
</text>
|
|
43
|
-
<text x="160" y="0" fill="#3B4857">•
|
|
44
|
-
</text>
|
|
45
|
-
<text x="183" y="0" fill="#8B9AAD">TYPESCRIPT
|
|
46
|
-
</text>
|
|
47
|
-
<text x="303" y="0" fill="#3B4857">•
|
|
48
|
-
</text>
|
|
49
|
-
<text x="326" y="0" fill="#8B9AAD">NODE ≥ 22.19
|
|
50
|
-
</text>
|
|
51
|
-
</g>
|
|
52
|
-
</g>
|
|
53
|
-
<g id="extension-map" transform="translate(662 48)" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif">
|
|
54
|
-
<g id="claude-pi-mark" transform="translate(0 0)">
|
|
55
|
-
<!-- Official Claude starburst vector; source: Anthropic Claude brand mark. -->
|
|
56
|
-
<path transform="translate(2 2) scale(.34)" fill="#D97757" d="m19.6 66.5 19.7-11 .3-1-.3-.5h-1l-3.3-.2-11.2-.3L14 53l-9.5-.5-2.4-.5L0 49l.2-1.5 2-1.3 2.9.2 6.3.5 9.5.6 6.9.4L38 49.1h1.6l.2-.7-.5-.4-.4-.4L29 41l-10.6-7-5.6-4.1-3-2-1.5-2-.6-4.2 2.7-3 3.7.3.9.2 3.7 2.9 8 6.1L37 36l1.5 1.2.6-.4.1-.3-.7-1.1L33 25l-6-10.4-2.7-4.3-.7-2.6c-.3-1-.4-2-.4-3l3-4.2L28 0l4.2.6L33.8 2l2.6 6 4.1 9.3L47 29.9l2 3.8 1 3.4.3 1h.7v-.5l.5-7.2 1-8.7 1-11.2.3-3.2 1.6-3.8 3-2L61 2.6l2 2.9-.3 1.8-1.1 7.7L59 27.1l-1.5 8.2h.9l1-1.1 4.1-5.4 6.9-8.6 3-3.5L77 13l2.3-1.8h4.3l3.1 4.7-1.4 4.9-4.4 5.6-3.7 4.7-5.3 7.1-3.2 5.7.3.4h.7l12-2.6 6.4-1.1 7.6-1.3 3.5 1.6.4 1.6-1.4 3.4-8.2 2-9.6 2-14.3 3.3-.2.1.2.3 6.4.6 2.8.2h6.8l12.6 1 3.3 2 1.9 2.7-.3 2-5.1 2.6-6.8-1.6-16-3.8-5.4-1.3h-.8v.4l4.6 4.5 8.3 7.5L89 80.1l.5 2.4-1.3 2-1.4-.2-9.2-7-3.6-3-8-6.8h-.5v.7l1.8 2.7 9.8 14.7.5 4.5-.7 1.4-2.6 1-2.7-.6-5.8-8-6-9-4.7-8.2-.5.4-2.9 30.2-1.3 1.5-3 1.2-2.5-2-1.4-3 1.4-6.2 1.6-8 1.3-6.4 1.2-7.9.7-2.6v-.2H49L43 72l-9 12.3-7.2 7.6-1.7.7-3-1.5.3-2.8L24 86l10-12.8 6-7.9 4-4.6-.1-.5h-.3L17.2 77.4l-4.7.6-2-2 .2-3 1-1 8-5.5Z"/>
|
|
57
|
-
<path d="M50 3V35" stroke="#3A4857" stroke-width="2"/>
|
|
58
|
-
<!-- Official Pi logo vectors; source: https://pi.dev/logo-auto.svg -->
|
|
59
|
-
<g transform="translate(52 -5) scale(.06)" fill="#F4F7FA">
|
|
60
|
-
<path fill-rule="evenodd" d="M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z"/>
|
|
61
|
-
<path d="M517.36 400H634.72V634.72H517.36Z"/>
|
|
62
|
-
</g>
|
|
63
|
-
<text x="104" y="15" fill="#F4F7FA" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="15" font-weight="700" letter-spacing=".8">CLAUDE CODE UX
|
|
64
|
-
</text>
|
|
65
|
-
<text x="104" y="34" fill="#7F8D9C" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="13" letter-spacing="1.2">FOR PI
|
|
66
|
-
</text>
|
|
67
|
-
</g>
|
|
68
|
-
<g transform="translate(0 52)">
|
|
69
|
-
<rect width="474" height="82" rx="14" fill="#101821" stroke="#2C3A48"/>
|
|
70
|
-
<rect width="5" height="82" rx="2.5" fill="#66E3C4"/>
|
|
71
|
-
<text x="26" y="32" fill="#F4F7FA" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="18" font-weight="700">/ccstyle
|
|
72
|
-
</text>
|
|
73
|
-
<text x="26" y="59" fill="#8B9AAD" font-size="16">工具摘要 · Diff · 状态栏
|
|
74
|
-
</text>
|
|
75
|
-
<circle cx="438" cy="29" r="9" fill="#66E3C4" opacity=".18"/>
|
|
76
|
-
<path d="M434 29l3 3 6-7" fill="none" stroke="#66E3C4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
77
|
-
</g>
|
|
78
|
-
<g transform="translate(0 144)">
|
|
79
|
-
<rect width="474" height="82" rx="14" fill="#101821" stroke="#2C3A48"/>
|
|
80
|
-
<rect width="5" height="82" rx="2.5" fill="#7CC7FF"/>
|
|
81
|
-
<text x="26" y="32" fill="#F4F7FA" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="18" font-weight="700">/context
|
|
82
|
-
</text>
|
|
83
|
-
<text x="26" y="59" fill="#8B9AAD" font-size="16">用量分布 · 注入内容预览
|
|
84
|
-
</text>
|
|
85
|
-
<g transform="translate(416 23)">
|
|
86
|
-
<rect width="42" height="14" rx="7" fill="#1C2B38"/>
|
|
87
|
-
<rect width="27" height="14" rx="7" fill="#7CC7FF"/>
|
|
88
|
-
</g>
|
|
89
|
-
</g>
|
|
90
|
-
<g transform="translate(0 236)">
|
|
91
|
-
<rect width="474" height="82" rx="14" fill="#101821" stroke="#2C3A48"/>
|
|
92
|
-
<rect width="5" height="82" rx="2.5" fill="#F2C879"/>
|
|
93
|
-
<text x="26" y="32" fill="#F4F7FA" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="18" font-weight="700">@session:
|
|
94
|
-
</text>
|
|
95
|
-
<text x="26" y="59" fill="#8B9AAD" font-size="16">历史补全 · 跨会话引用
|
|
96
|
-
</text>
|
|
97
|
-
<text x="431" y="40" fill="#F2C879" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="26">@
|
|
98
|
-
</text>
|
|
99
|
-
</g>
|
|
100
|
-
</g>
|
|
101
|
-
</svg>
|
|
Binary file
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export type DiffViewMode = "auto" | "split" | "unified";
|
|
2
|
-
export type DiffIndicatorMode = "bars" | "classic" | "none";
|
|
3
|
-
|
|
4
|
-
export interface ToolDisplayConfig {
|
|
5
|
-
diffViewMode: DiffViewMode;
|
|
6
|
-
diffIndicatorMode: DiffIndicatorMode;
|
|
7
|
-
diffSplitMinWidth: number;
|
|
8
|
-
editDiffCollapsedLines: number;
|
|
9
|
-
/** Write-only collapsed body lines. 0 = `↳ created • click to show more`. */
|
|
10
|
-
writeDiffCollapsedLines: number;
|
|
11
|
-
diffWordWrap: boolean;
|
|
12
|
-
expandedPreviewMaxLines: number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const DEFAULT_TOOL_DISPLAY_CONFIG: ToolDisplayConfig = {
|
|
16
|
-
diffViewMode: "auto",
|
|
17
|
-
diffIndicatorMode: "bars",
|
|
18
|
-
diffSplitMinWidth: 120,
|
|
19
|
-
/** Collapsed edit/diff body: ~half a typical terminal after chrome. */
|
|
20
|
-
editDiffCollapsedLines: 24,
|
|
21
|
-
/** Write create/overwrite collapsed body; 0 shows only the expand hint. */
|
|
22
|
-
writeDiffCollapsedLines: 0,
|
|
23
|
-
diffWordWrap: true,
|
|
24
|
-
/**
|
|
25
|
-
* Expanded tool/diff body cap. 40 ≈ one screen of content after title,
|
|
26
|
-
* Input section, editor, and status — keeps the TUI compact.
|
|
27
|
-
* Raise via /ccstyle → Diff → Expanded max lines when reviewing large dumps.
|
|
28
|
-
*/
|
|
29
|
-
expandedPreviewMaxLines: 40,
|
|
30
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export function splitWriteContentLines(content: string): string[] {
|
|
2
|
-
if (!content) {
|
|
3
|
-
return [];
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
const normalized = content.replace(/\r\n?/g, "\n");
|
|
7
|
-
const lines = normalized.split("\n");
|
|
8
|
-
if (lines.length > 0 && lines[lines.length - 1] === "") {
|
|
9
|
-
lines.pop();
|
|
10
|
-
}
|
|
11
|
-
return lines;
|
|
12
|
-
}
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The source role: a Codex home becomes a list of sessions, and one session becomes the
|
|
3
|
-
* canonical vocabulary. Every result body is dropped (FR-24) and every reasoning trace is
|
|
4
|
-
* ignored (FR-28, C-4).
|
|
5
|
-
*/
|
|
6
|
-
import { readFile } from "node:fs/promises";
|
|
7
|
-
import { isAbsolute } from "node:path";
|
|
8
|
-
import { redactSensitiveArgumentsText, redactSensitiveText } from "./redaction.js";
|
|
9
|
-
import { CODEX_ENTRY_COMPACTED, CODEX_ENTRY_EVENT_MSG, CODEX_ENTRY_RESPONSE_ITEM, CODEX_EVENT_AGENT_MESSAGE, CODEX_EVENT_USER_MESSAGE, CODEX_ITEM_CUSTOM_TOOL_CALL, CODEX_ITEM_CUSTOM_TOOL_CALL_OUTPUT, CODEX_ITEM_FUNCTION_CALL, CODEX_ITEM_FUNCTION_CALL_OUTPUT, isNotFoundError, KNOWN_ENTRY_TYPES, listRolloutFiles, parseRolloutText, payloadType, readSessionMeta, sessionsRoot, toIsoUtc, } from "./rollout.js";
|
|
10
|
-
const TITLE_LIMIT = 80;
|
|
11
|
-
const ARGUMENTS_PREVIEW_LIMIT = 60;
|
|
12
|
-
/** Tools whose name alone settles the question (FR-26). Everything else stays "unknown". */
|
|
13
|
-
const READ_ONLY_TOOLS = new Set([
|
|
14
|
-
"read_file",
|
|
15
|
-
"read",
|
|
16
|
-
"view_image",
|
|
17
|
-
"list_dir",
|
|
18
|
-
"grep",
|
|
19
|
-
"find",
|
|
20
|
-
"web_search",
|
|
21
|
-
]);
|
|
22
|
-
const MUTATING_TOOLS = new Set([
|
|
23
|
-
"apply_patch",
|
|
24
|
-
"write_file",
|
|
25
|
-
"edit_file",
|
|
26
|
-
"create_file",
|
|
27
|
-
"delete_file",
|
|
28
|
-
]);
|
|
29
|
-
export class CodexRolloutUnreadableError extends Error {
|
|
30
|
-
constructor(filePath) {
|
|
31
|
-
super(`Codex thread is unreadable: ${filePath} was cut mid-entry`);
|
|
32
|
-
this.name = "CodexRolloutUnreadableError";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/** Lenient: a file cut mid-entry still yields whatever parsed, with `truncated` set. */
|
|
36
|
-
export async function scanRollout(filePath) {
|
|
37
|
-
// Whole-file read: listing a home reads every rollout, and C-5 measured those files
|
|
38
|
-
// in megabytes. Ceiling accepted because title and turn count both need the whole file;
|
|
39
|
-
// revisit if a home with thousands of threads makes the listing feel slow.
|
|
40
|
-
const text = await readFile(filePath, "utf8");
|
|
41
|
-
const { entries, truncated } = parseRolloutText(text);
|
|
42
|
-
let meta = null;
|
|
43
|
-
for (const entry of entries) {
|
|
44
|
-
meta = readSessionMeta(entry);
|
|
45
|
-
if (meta !== null)
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
const { turns, skippedEntries, changedPaths } = toCanonicalTurns(entries);
|
|
49
|
-
const firstUserTurn = turns.find((turn) => turn.role === "user" && turn.kind === "message");
|
|
50
|
-
const lastStamp = [...entries].reverse().find((entry) => toIsoUtc(entry.timestamp) !== null);
|
|
51
|
-
return {
|
|
52
|
-
filePath,
|
|
53
|
-
meta,
|
|
54
|
-
turns,
|
|
55
|
-
skippedEntries,
|
|
56
|
-
startedAt: toIsoUtc(meta?.timestamp ?? entries[0]?.timestamp ?? null),
|
|
57
|
-
updatedAt: toIsoUtc(lastStamp?.timestamp ?? meta?.timestamp ?? null),
|
|
58
|
-
title: titleOf(firstUserTurn?.text ?? ""),
|
|
59
|
-
changedPaths,
|
|
60
|
-
truncated,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/** Strict: FR-51's "unreadable" answer. */
|
|
64
|
-
export async function readRollout(filePath) {
|
|
65
|
-
const rollout = await scanRollout(filePath);
|
|
66
|
-
if (rollout.truncated)
|
|
67
|
-
throw new CodexRolloutUnreadableError(filePath);
|
|
68
|
-
return rollout;
|
|
69
|
-
}
|
|
70
|
-
export async function listCodexSessions(home) {
|
|
71
|
-
const descriptors = [];
|
|
72
|
-
for (const filePath of await listRolloutFiles(sessionsRoot(home))) {
|
|
73
|
-
let rollout;
|
|
74
|
-
try {
|
|
75
|
-
rollout = await scanRollout(filePath);
|
|
76
|
-
}
|
|
77
|
-
catch (error) {
|
|
78
|
-
if (isNotFoundError(error))
|
|
79
|
-
continue; // A rollout may disappear during a concurrent cleanup.
|
|
80
|
-
throw error;
|
|
81
|
-
}
|
|
82
|
-
if (rollout.meta === null)
|
|
83
|
-
continue;
|
|
84
|
-
descriptors.push({
|
|
85
|
-
ref: { agent: "codex", home, id: rollout.meta.id },
|
|
86
|
-
title: rollout.title,
|
|
87
|
-
startedAt: rollout.startedAt ?? "",
|
|
88
|
-
updatedAt: rollout.updatedAt ?? rollout.startedAt ?? "",
|
|
89
|
-
turnCount: rollout.turns.length,
|
|
90
|
-
repoPath: rollout.meta.cwd !== null && isAbsolute(rollout.meta.cwd) ? rollout.meta.cwd : null,
|
|
91
|
-
filePath,
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
descriptors.sort((left, right) => right.updatedAt.localeCompare(left.updatedAt));
|
|
95
|
-
return descriptors;
|
|
96
|
-
}
|
|
97
|
-
export async function loadCodexSession(descriptor) {
|
|
98
|
-
const rollout = await readRollout(descriptor.filePath);
|
|
99
|
-
return {
|
|
100
|
-
provenance: {
|
|
101
|
-
ref: descriptor.ref,
|
|
102
|
-
title: descriptor.title,
|
|
103
|
-
startedAt: descriptor.startedAt,
|
|
104
|
-
updatedAt: descriptor.updatedAt,
|
|
105
|
-
repo: {
|
|
106
|
-
commit: rollout.meta?.commit ?? null,
|
|
107
|
-
branch: rollout.meta?.branch ?? null,
|
|
108
|
-
changedPaths: rollout.changedPaths,
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
turns: rollout.turns,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
function titleOf(text) {
|
|
115
|
-
const line = text
|
|
116
|
-
.split("\n")
|
|
117
|
-
.find((candidate) => candidate.trim() !== "")
|
|
118
|
-
?.trim() ?? "";
|
|
119
|
-
return line.length > TITLE_LIMIT ? `${line.slice(0, TITLE_LIMIT - 1)}…` : line;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Messages come from `event_msg` and tool calls from `response_item`: the same text appears in
|
|
123
|
-
* both shapes, and taking each from one place is what keeps every turn out of the session twice.
|
|
124
|
-
* Reasoning, in either shape, produces nothing at all (C-4, FR-28, NG-8).
|
|
125
|
-
*/
|
|
126
|
-
function toCanonicalTurns(entries) {
|
|
127
|
-
const outputs = new Map();
|
|
128
|
-
for (const entry of entries) {
|
|
129
|
-
if (entry.type !== CODEX_ENTRY_RESPONSE_ITEM)
|
|
130
|
-
continue;
|
|
131
|
-
const type = payloadType(entry);
|
|
132
|
-
if (type !== CODEX_ITEM_FUNCTION_CALL_OUTPUT && type !== CODEX_ITEM_CUSTOM_TOOL_CALL_OUTPUT)
|
|
133
|
-
continue;
|
|
134
|
-
const callId = entry.payload.call_id;
|
|
135
|
-
if (typeof callId !== "string")
|
|
136
|
-
continue;
|
|
137
|
-
outputs.set(callId, outputTextOf(entry.payload.output));
|
|
138
|
-
}
|
|
139
|
-
const turns = [];
|
|
140
|
-
const changed = new Set();
|
|
141
|
-
let skippedEntries = 0;
|
|
142
|
-
for (const entry of entries) {
|
|
143
|
-
if (!KNOWN_ENTRY_TYPES.has(entry.type)) {
|
|
144
|
-
skippedEntries += 1;
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
const type = payloadType(entry);
|
|
148
|
-
if (entry.type === CODEX_ENTRY_COMPACTED) {
|
|
149
|
-
const message = entry.payload.message;
|
|
150
|
-
if (typeof message !== "string" || message.trim() === "")
|
|
151
|
-
continue;
|
|
152
|
-
turns.push({
|
|
153
|
-
index: turns.length,
|
|
154
|
-
role: "agent",
|
|
155
|
-
kind: "summary",
|
|
156
|
-
// FR-28, security: credentials in message text must not cross to a different vendor.
|
|
157
|
-
text: redactSensitiveText(message),
|
|
158
|
-
toolCall: null,
|
|
159
|
-
timestamp: toIsoUtc(entry.timestamp),
|
|
160
|
-
});
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
if (entry.type === CODEX_ENTRY_EVENT_MSG) {
|
|
164
|
-
if (type !== CODEX_EVENT_USER_MESSAGE && type !== CODEX_EVENT_AGENT_MESSAGE)
|
|
165
|
-
continue;
|
|
166
|
-
const message = entry.payload.message;
|
|
167
|
-
if (typeof message !== "string" || message.trim() === "")
|
|
168
|
-
continue;
|
|
169
|
-
turns.push({
|
|
170
|
-
index: turns.length,
|
|
171
|
-
role: type === CODEX_EVENT_USER_MESSAGE ? "user" : "agent",
|
|
172
|
-
kind: "message",
|
|
173
|
-
// FR-28, security: credentials in message text must not cross to a different vendor.
|
|
174
|
-
text: redactSensitiveText(message),
|
|
175
|
-
toolCall: null,
|
|
176
|
-
timestamp: toIsoUtc(entry.timestamp),
|
|
177
|
-
});
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
|
-
if (entry.type !== CODEX_ENTRY_RESPONSE_ITEM)
|
|
181
|
-
continue;
|
|
182
|
-
if (type !== CODEX_ITEM_FUNCTION_CALL && type !== CODEX_ITEM_CUSTOM_TOOL_CALL)
|
|
183
|
-
continue;
|
|
184
|
-
const toolName = typeof entry.payload.name === "string" ? entry.payload.name : "";
|
|
185
|
-
if (toolName === "")
|
|
186
|
-
continue;
|
|
187
|
-
const rawArguments = type === CODEX_ITEM_FUNCTION_CALL ? entry.payload.arguments : entry.payload.input;
|
|
188
|
-
const argumentsText = typeof rawArguments === "string" ? rawArguments : "";
|
|
189
|
-
const callId = entry.payload.call_id;
|
|
190
|
-
// FR-54: use has() not get() — outputs.get() can return "" for an empty result.
|
|
191
|
-
const resultRecorded = typeof callId === "string" && outputs.has(callId);
|
|
192
|
-
const output = typeof callId === "string" ? (outputs.get(callId) ?? null) : null;
|
|
193
|
-
const toolCall = toolCallRecord(toolName, argumentsText, output, resultRecorded);
|
|
194
|
-
if (toolCall.effect === "mutating")
|
|
195
|
-
for (const path of pathsOf(argumentsText))
|
|
196
|
-
changed.add(path);
|
|
197
|
-
turns.push({
|
|
198
|
-
index: turns.length,
|
|
199
|
-
role: "agent",
|
|
200
|
-
kind: "tool-call",
|
|
201
|
-
text: "",
|
|
202
|
-
toolCall,
|
|
203
|
-
timestamp: toIsoUtc(entry.timestamp),
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
return { turns, skippedEntries, changedPaths: [...changed] };
|
|
207
|
-
}
|
|
208
|
-
/** Only the shape of the output is measured. Not one fragment of it is carried (FR-24, FR-25). */
|
|
209
|
-
function toolCallRecord(toolName, argumentsText, output, resultRecorded) {
|
|
210
|
-
const safeArguments = redactSensitiveArgumentsText(argumentsText);
|
|
211
|
-
const head = `${toolName}(${singleLine(safeArguments, ARGUMENTS_PREVIEW_LIMIT)})`;
|
|
212
|
-
const outcomeLine = output === null
|
|
213
|
-
? `${head} → no output recorded`
|
|
214
|
-
: `${head} → ${output.split("\n").length} lines, body dropped`;
|
|
215
|
-
return {
|
|
216
|
-
toolName,
|
|
217
|
-
argumentsText: safeArguments,
|
|
218
|
-
outcomeLine: redactSensitiveText(outcomeLine),
|
|
219
|
-
effect: effectOf(toolName),
|
|
220
|
-
bodyDropped: output !== null,
|
|
221
|
-
// FR-54: false when no *_call_output entry existed for this call_id (broken tail signal).
|
|
222
|
-
resultRecorded,
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
function effectOf(toolName) {
|
|
226
|
-
if (MUTATING_TOOLS.has(toolName))
|
|
227
|
-
return "mutating";
|
|
228
|
-
if (READ_ONLY_TOOLS.has(toolName))
|
|
229
|
-
return "read-only";
|
|
230
|
-
return "unknown";
|
|
231
|
-
}
|
|
232
|
-
function outputTextOf(output) {
|
|
233
|
-
if (typeof output === "string")
|
|
234
|
-
return output;
|
|
235
|
-
if (Array.isArray(output)) {
|
|
236
|
-
return output
|
|
237
|
-
.map((part) => typeof part === "object" && part !== null
|
|
238
|
-
? String(part.text ?? "")
|
|
239
|
-
: "")
|
|
240
|
-
.join("\n");
|
|
241
|
-
}
|
|
242
|
-
return output === undefined || output === null ? "" : JSON.stringify(output);
|
|
243
|
-
}
|
|
244
|
-
function singleLine(text, limit) {
|
|
245
|
-
const flat = text.replaceAll(/\s+/g, " ").trim();
|
|
246
|
-
return flat.length > limit ? `${flat.slice(0, limit - 1)}…` : flat;
|
|
247
|
-
}
|
|
248
|
-
/** Files a mutating call touched, for RepoSnapshot.changedPaths (FR-36). */
|
|
249
|
-
function pathsOf(argumentsText) {
|
|
250
|
-
let text = argumentsText;
|
|
251
|
-
const direct = [];
|
|
252
|
-
try {
|
|
253
|
-
const parsed = JSON.parse(argumentsText);
|
|
254
|
-
if (typeof parsed === "object" && parsed !== null) {
|
|
255
|
-
const record = parsed;
|
|
256
|
-
const strings = Object.values(record).filter((value) => typeof value === "string");
|
|
257
|
-
text = strings.join("\n");
|
|
258
|
-
for (const key of ["path", "file_path", "filename"]) {
|
|
259
|
-
const value = record[key];
|
|
260
|
-
if (typeof value === "string" && value !== "")
|
|
261
|
-
direct.push(value);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
catch {
|
|
266
|
-
// Arguments that are not JSON are searched as they were recorded.
|
|
267
|
-
}
|
|
268
|
-
const patched = [...text.matchAll(/\*\*\* (?:Add|Update|Delete) File: (.+)/g)].map((match) => (match[1] ?? "").trim());
|
|
269
|
-
return [...direct, ...patched].filter((path) => path !== "");
|
|
270
|
-
}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
// The source side of the tool: find the sessions of this repository, order them, resolve the
|
|
2
|
-
// user's choice, and load it. It never writes and never calls a model (NG-1, AC-4, FR-8).
|
|
3
|
-
import { SessionSelectionError } from "./errors.js";
|
|
4
|
-
import { buildSearchList, canonicalPath, isDirectory, } from "./homes.js";
|
|
5
|
-
import { compareDescriptors } from "./ordering.js";
|
|
6
|
-
const NEXT_STEP = "Run the list again to see the sessions available in this repository.";
|
|
7
|
-
function reasonLine(reason) {
|
|
8
|
-
const text = reason instanceof Error ? reason.message : String(reason);
|
|
9
|
-
return text.split("\n")[0] ?? "unknown error";
|
|
10
|
-
}
|
|
11
|
-
export function createSessionFinder(deps) {
|
|
12
|
-
async function collect(target, repoRoot) {
|
|
13
|
-
// A home the user named must never fail silently: adapters swallow a missing
|
|
14
|
-
// directory (an absent default home is normal), but a typo'd --home is not (FR-2).
|
|
15
|
-
if (target.named === true && !(await isDirectory(target.home))) {
|
|
16
|
-
return {
|
|
17
|
-
rows: [],
|
|
18
|
-
failures: [
|
|
19
|
-
{
|
|
20
|
-
home: target.home,
|
|
21
|
-
agent: target.agent,
|
|
22
|
-
message: "home not searched: no such directory",
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
let found;
|
|
28
|
-
try {
|
|
29
|
-
found = await target.adapter.listSessions(target.home);
|
|
30
|
-
}
|
|
31
|
-
catch (reason) {
|
|
32
|
-
// One bad home never empties the listing.
|
|
33
|
-
return {
|
|
34
|
-
rows: [],
|
|
35
|
-
failures: [
|
|
36
|
-
{
|
|
37
|
-
home: target.home,
|
|
38
|
-
agent: target.agent,
|
|
39
|
-
message: `home not searched: ${reasonLine(reason)}`,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
const rows = [];
|
|
45
|
-
const failures = [];
|
|
46
|
-
for (const descriptor of found) {
|
|
47
|
-
if (descriptor.repoPath === null) {
|
|
48
|
-
// Out of scope, but never silent: the tool cannot show that it belongs here.
|
|
49
|
-
failures.push({
|
|
50
|
-
home: target.home,
|
|
51
|
-
agent: target.agent,
|
|
52
|
-
message: `session ${descriptor.ref.id} records no repository, so it cannot be listed here`,
|
|
53
|
-
});
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
if ((await canonicalPath(descriptor.repoPath)) === repoRoot)
|
|
57
|
-
rows.push(descriptor); // FR-13
|
|
58
|
-
}
|
|
59
|
-
return { rows, failures };
|
|
60
|
-
}
|
|
61
|
-
/** The single listing both `list` and `resolve` use, so the two always agree (FR-10). */
|
|
62
|
-
async function buildListing(scope) {
|
|
63
|
-
const targets = await buildSearchList(deps.adapters, deps.config, scope);
|
|
64
|
-
const repoRoot = await canonicalPath(scope.repoRoot);
|
|
65
|
-
const collected = await Promise.all(targets.map((target) => collect(target, repoRoot)));
|
|
66
|
-
const rows = [];
|
|
67
|
-
const failures = [];
|
|
68
|
-
for (const part of collected) {
|
|
69
|
-
rows.push(...part.rows);
|
|
70
|
-
failures.push(...part.failures);
|
|
71
|
-
}
|
|
72
|
-
rows.sort(compareDescriptors);
|
|
73
|
-
return { rows, failures };
|
|
74
|
-
}
|
|
75
|
-
async function resolveRow(rows, row) {
|
|
76
|
-
const chosen = Number.isInteger(row) && row >= 1 ? rows[row - 1] : undefined;
|
|
77
|
-
if (!chosen) {
|
|
78
|
-
throw new SessionSelectionError(String(row), `Row ${row} is not in this repository's session list, which has ${rows.length} row(s). ${NEXT_STEP}`);
|
|
79
|
-
}
|
|
80
|
-
return chosen;
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
async list(scope) {
|
|
84
|
-
return await buildListing(scope);
|
|
85
|
-
},
|
|
86
|
-
async resolve(scope, input) {
|
|
87
|
-
const { rows } = await buildListing(scope);
|
|
88
|
-
switch (input.by) {
|
|
89
|
-
case "row":
|
|
90
|
-
return await resolveRow(rows, input.row);
|
|
91
|
-
case "session-id": {
|
|
92
|
-
const matches = rows.filter((row) => row.ref.id === input.id);
|
|
93
|
-
const found = matches[0];
|
|
94
|
-
if (!found) {
|
|
95
|
-
throw new SessionSelectionError(input.id, `No session "${input.id}" belongs to this repository. ${NEXT_STEP}`);
|
|
96
|
-
}
|
|
97
|
-
if (matches.length > 1) {
|
|
98
|
-
const locations = matches
|
|
99
|
-
.map((row) => `${row.ref.agent} at "${row.ref.home}" (${row.filePath})`)
|
|
100
|
-
.join("; ");
|
|
101
|
-
throw new SessionSelectionError(input.id, `Session ID "${input.id}" matches ${matches.length} sessions: ${locations}. ` +
|
|
102
|
-
"Select a numbered row or exact file path, or narrow the search with an agent and --home.");
|
|
103
|
-
}
|
|
104
|
-
return found;
|
|
105
|
-
}
|
|
106
|
-
case "file-path": {
|
|
107
|
-
const wanted = await canonicalPath(input.path);
|
|
108
|
-
for (const row of rows) {
|
|
109
|
-
if ((await canonicalPath(row.filePath)) === wanted)
|
|
110
|
-
return row;
|
|
111
|
-
}
|
|
112
|
-
// Selection by path is a convenience, not a way around the repository filter (NG-9).
|
|
113
|
-
throw new SessionSelectionError(input.path, `"${input.path}" is not a session of this repository. ${NEXT_STEP}`);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
async load(descriptor) {
|
|
118
|
-
const adapter = deps.adapters.find((candidate) => {
|
|
119
|
-
const capabilities = candidate.capabilities();
|
|
120
|
-
return capabilities.agent === descriptor.ref.agent && capabilities.roles.includes("source");
|
|
121
|
-
});
|
|
122
|
-
if (!adapter) {
|
|
123
|
-
throw new Error(`no source adapter for agent "${descriptor.ref.agent}"`);
|
|
124
|
-
}
|
|
125
|
-
// Returned unchanged: the rules of sections D and E belong to src/import/transfer/.
|
|
126
|
-
return await adapter.loadSession(descriptor);
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { AgentAdapter, FileCommitter, ImportConfig, ImportPipeline, PreviewBuilder, SessionFinder, SessionLander, TokenEstimator, TransferRules } from "./contract.js";
|
|
2
|
-
/** The four stages, and the services they are driven with. `wiring.ts` builds them. */
|
|
3
|
-
export interface PipelineStages {
|
|
4
|
-
finder: SessionFinder;
|
|
5
|
-
rules: TransferRules;
|
|
6
|
-
/** A preview builder that reads the repository the request names. */
|
|
7
|
-
previewFor(repoRoot: string): PreviewBuilder;
|
|
8
|
-
lander: SessionLander;
|
|
9
|
-
/** Every adapter the composition root constructed. This module only looks one up. */
|
|
10
|
-
adapters: readonly AgentAdapter[];
|
|
11
|
-
config: ImportConfig;
|
|
12
|
-
estimator: TokenEstimator;
|
|
13
|
-
committer: FileCommitter;
|
|
14
|
-
/** ISO-8601 UTC. Only the landing reads it, so a preview and a commit agree (FR-47). */
|
|
15
|
-
now(): string;
|
|
16
|
-
}
|
|
17
|
-
export declare function createPipelineFromStages(stages: PipelineStages): ImportPipeline;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PreviewWarning, RepoReader, TransferPlan } from "./contract.js";
|
|
2
|
-
/** Orders warnings by kind, keeping the order they were added within one kind. */
|
|
3
|
-
export declare function sortWarnings(warnings: PreviewWarning[]): PreviewWarning[];
|
|
4
|
-
/**
|
|
5
|
-
* Compares the source commit with the current HEAD (FR-37, FR-38). A repository that
|
|
6
|
-
* cannot be read, or a commit this tree does not have, is said to be unknown — never
|
|
7
|
-
* guessed and never left out (FR-36). None of these block (FR-39).
|
|
8
|
-
*/
|
|
9
|
-
export declare function repoWarning(plan: TransferPlan, repo: RepoReader, cwd: string): Promise<PreviewWarning | null>;
|
|
10
|
-
/** The warnings that come from the plan alone. */
|
|
11
|
-
export declare function planWarnings(plan: TransferPlan): PreviewWarning[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { RepoReader, RepoReaderOptions } from "./contract.js";
|
|
2
|
-
/**
|
|
3
|
-
* A reader bound to one working directory.
|
|
4
|
-
*
|
|
5
|
-
* `identify` takes the directory to look at; `distanceFrom` compares against the HEAD of `cwd`,
|
|
6
|
-
* which is the repository the command is running in.
|
|
7
|
-
*/
|
|
8
|
-
export declare function createRepoReader(cwd?: string, options?: RepoReaderOptions): RepoReader;
|