pi-view-image 0.3.7 → 0.3.8
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 +21 -13
- package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/README.md +10 -12
- package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/package.json +13 -10
- package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/contributions/xsettings.ts +1 -1
- package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/host/binary.ts +1 -1
- package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/protocol/nested-tools.ts +1 -1
- package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/ui/presentation.ts +3 -3
- package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/ui/presentation.test.ts +3 -3
- package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/README.md +81 -29
- package/node_modules/@luan.sh/pi-libtui/native-revision +1 -0
- package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/package.json +8 -5
- package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/native-binary.ts +8 -8
- package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/panels.ts +2 -2
- package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/editor-chrome.test.ts +2 -2
- package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/native-binary.test.ts +1 -1
- package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/public-surface.test.ts +11 -11
- package/package.json +12 -9
- package/src/code-mode-adapter.ts +1 -1
- package/src/core/appearance.ts +1 -1
- package/src/extension.ts +15 -4
- package/src/image-limits.ts +57 -0
- package/src/native/binary.ts +2 -2
- package/src/runtime/editor-attachments.ts +2 -2
- package/src/tools/view-image/presentation.ts +2 -2
- package/test/image-limits.test.ts +50 -0
- package/test/view-image.test.ts +3 -3
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/LICENSE +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/extension.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/host/cell-operations.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/host/client.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/host/connection.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/host/delegation.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/host/operation.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/host/process.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/host/protocol.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/host/session.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/index.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/protocol/hierarchy.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/protocol/preflights.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/protocol/tool-definition-adapter.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/protocol/types.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/runtime/code-mode.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/runtime/delegation.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/runtime/lifecycle.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/runtime/trace-values.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/sdk.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/tools/exec/definition.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/tools/exec/description.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/tools/exec/grammar.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/tools/result.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/src/tools/wait/definition.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/extension.test.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/host/integration.test.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/host/protocol.test.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/protocol/nested-tools.test.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/protocol/preflights.test.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/runtime/delegation.test.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/runtime/trace-values.test.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/tool-definition-adapter.test.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/test/tools/result.test.ts +0 -0
- /package/node_modules/{@cfcluan → @luan.sh}/pi-code-mode/tsconfig.json +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/LICENSE +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/activity-presentation.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/appearance.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/background-surface.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/color/palette.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/color/preview.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/color/resolver.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/color/theme.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/component-stack.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/content/markdown-code.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/content/terminal-text.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/content/text.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/action-panel.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/dialog-button-bar.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/multi-select.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/picker-panel.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/screen-icon-actions.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/searchable-select.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/select-box.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/selectable-list.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/selection-action-bar.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/semantic-input.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/controls/tab.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/cursor.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/decoration/editor-pills.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/decoration/glyphs.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/decoration/pointer-interaction.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/decoration/powerline-pill.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/decoration/status.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/decoration/transient-pill.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/diff/index.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/diff/model.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/diff/parse.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/diff/pierre-syntax.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/diff/render.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/diff/structured.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/diff/view.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/editor/chrome.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/editor/composition.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/editor/layout.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/editor/presentation.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/editor/protocol.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/editor.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/extension.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/folding.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/cursor-bridge.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/editor-bridge.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/extension-host.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/mouse-bridge.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/mouse-dispatch.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/mouse-input.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/mouse-targets.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/pi-layout-adapter.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/pi-native-selection.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/split-pane-bridge.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/host/transcript-bridge.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/index.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/line-layout.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/motion.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/mouse/events.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/mouse/fullscreen-layout.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/mouse/registry.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/mouse.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/overlay/anchored.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/overlay/detail-card.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/overlay/dialog.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/overlay/floating.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/overlay/framed-editor.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/overlay/fullscreen.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/overlay/hover-tooltip.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/overlay/modal-mount.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/render-cache.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/render-epoch.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/request-animation.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/scrollbar.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/selection.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/split-pane.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/status-presentation.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/stream.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/syntax.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/terminal/bridge-client.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/terminal/embedding.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/terminal/output.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/terminal/projection.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/terminal/pty-host.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/terminal/pty-pane.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/terminal-colors.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/tool/action.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/tool/activity.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/tool/call-preview.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/tool/disclosure-action.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/tool/expanded-region-viewport.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/tool/index.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/tool/output.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/tool/transcript.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/src/tool/view-region.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/appearance.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/bounded-stream.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/bridge-client.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/color-preview.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/component-stack.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/components.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/content-text.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/cursor-bridge.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/cursor.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/editor-layout.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/editor-registry.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/editor-theme.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/editor-token-pill.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/floating-overlay.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/folding.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/harmonious-theme.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/interaction.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/key-icons.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/markdown-code.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/modal-overlay-mount.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/motion.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/mouse/bridge.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/mouse/extension.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/mouse/registry.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/mouse/screen-decoration.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/palette.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/panels.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/pointer-components.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/progress.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/pty-host.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/pty-pane.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/render-cache.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/render-epoch.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/request-animation.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/screen-icon-actions.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/select-box.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/select-pointer.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/selectable-list.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/selection/registry.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/selection-action-bar.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/split-pane-bridge.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/split-pane.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/status-presentation.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/syntax.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/terminal-colors.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/terminal-embedding.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/terminal-projection.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/theme-colors.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/tool-output.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/tool-transcript.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/test/unified-diff.test.ts +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/themes/harmonious.json +0 -0
- /package/node_modules/{pi-libtui → @luan.sh/pi-libtui}/tsconfig.json +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/CONTRIBUTING.md +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/LICENSE +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/README.md +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/dist/diff.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/dist/diff.min.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/eslint.config.mjs +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/convert/dmp.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/convert/dmp.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/convert/dmp.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/convert/xml.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/convert/xml.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/convert/xml.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/array.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/array.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/array.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/base.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/base.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/base.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/character.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/character.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/character.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/css.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/css.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/css.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/json.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/json.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/json.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/line.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/line.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/line.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/sentence.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/sentence.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/sentence.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/word.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/word.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/diff/word.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/index.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/index.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/index.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/package.json +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/apply.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/apply.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/apply.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/create.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/create.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/create.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/line-endings.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/line-endings.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/line-endings.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/parse.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/parse.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/parse.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/reverse.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/reverse.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/patch/reverse.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/types.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/types.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/types.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/array.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/array.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/array.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/distance-iterator.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/distance-iterator.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/distance-iterator.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/params.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/params.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/params.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/string.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/string.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libcjs/util/string.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/convert/dmp.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/convert/dmp.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/convert/dmp.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/convert/xml.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/convert/xml.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/convert/xml.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/array.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/array.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/array.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/base.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/base.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/base.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/character.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/character.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/character.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/css.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/css.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/css.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/json.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/json.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/json.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/line.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/line.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/line.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/sentence.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/sentence.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/sentence.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/word.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/word.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/diff/word.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/index.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/index.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/index.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/package.json +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/apply.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/apply.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/apply.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/create.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/create.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/create.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/line-endings.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/line-endings.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/line-endings.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/parse.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/parse.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/parse.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/reverse.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/reverse.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/patch/reverse.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/types.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/types.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/types.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/array.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/array.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/array.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/distance-iterator.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/distance-iterator.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/distance-iterator.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/params.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/params.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/params.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/string.d.ts +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/string.d.ts.map +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/libesm/util/string.js +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/package.json +0 -0
- /package/node_modules/{diff → @pierre/diffs/node_modules/diff}/release-notes.md +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
# pi-view-image
|
|
1
|
+
# @luan.sh/pi-view-image [<img src="https://pi.luan.sh/icons/pi.svg" width="14" alt="Pi gallery">](https://pi.dev/packages/@luan.sh/pi-view-image) [<img src="https://pi.luan.sh/icons/npm.svg" width="14" alt="npm">](https://www.npmjs.com/package/@luan.sh/pi-view-image)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
`pi-view-image` adds a Codex-compatible `view_image` tool to Pi. A
|
|
3
|
+
`@luan.sh/pi-view-image` adds a Codex-compatible `view_image` tool to Pi. A
|
|
6
4
|
native Rust binary reads and validates a local PNG, JPEG, GIF, or WebP file and
|
|
7
5
|
returns it as a Pi image content block, so any vision-capable model can look at
|
|
8
6
|
a file that is already on disk. The same package makes pasted image paths in the
|
|
@@ -11,23 +9,23 @@ before they reach the provider.
|
|
|
11
9
|
|
|
12
10
|
## Preview
|
|
13
11
|
|
|
14
|
-

|
|
15
13
|
|
|
16
|
-
[Watch the demo](https://
|
|
14
|
+
[Watch the demo](https://pi.luan.sh/media/previews/pi-view-image-62df21208d2a.mp4).
|
|
17
15
|
|
|
18
16
|
## Install
|
|
19
17
|
|
|
20
18
|
```sh
|
|
21
|
-
pi install npm
|
|
19
|
+
pi install npm:@luan.sh/pi-view-image
|
|
22
20
|
```
|
|
23
21
|
|
|
24
|
-
Requires a Rust toolchain (https://rustup.rs). The `
|
|
22
|
+
Requires a Rust toolchain (https://rustup.rs). The `view-image` binary builds
|
|
25
23
|
itself on first use under Pi's agent directory (`native/view-image/<version>/`).
|
|
26
24
|
Set `PI_VIEW_IMAGE_BIN` to use a prebuilt binary; it must point to an
|
|
27
25
|
executable file. Pi shows an info notification while the first build runs.
|
|
28
26
|
|
|
29
|
-
Code Mode support is bundled. If
|
|
30
|
-
(`pi install npm:@
|
|
27
|
+
Code Mode support is bundled. If `@luan.sh/pi-code-mode` is also installed
|
|
28
|
+
(`pi install npm:@luan.sh/pi-code-mode`), `view_image` is callable from inside
|
|
31
29
|
Code Mode scripts as described below; without it the tool is still available as
|
|
32
30
|
a normal Pi tool.
|
|
33
31
|
|
|
@@ -48,7 +46,8 @@ Example call:
|
|
|
48
46
|
|
|
49
47
|
Behaviour:
|
|
50
48
|
|
|
51
|
-
- `high` resizes images larger than
|
|
49
|
+
- `high` resizes images larger than 2000 pixels on either axis (Anthropic's
|
|
50
|
+
limit for requests carrying more than 20 images). Resized
|
|
52
51
|
images and GIF input are re-encoded as PNG; PNG, JPEG, and WebP files that
|
|
53
52
|
are not resized keep their original bytes and MIME type.
|
|
54
53
|
- `original` keeps the source dimensions and bytes.
|
|
@@ -68,7 +67,7 @@ Behaviour:
|
|
|
68
67
|
|
|
69
68
|
### Inside Code Mode
|
|
70
69
|
|
|
71
|
-
The tool is also registered through
|
|
70
|
+
The tool is also registered through `@luan.sh/pi-code-mode/sdk`. In a Code Mode
|
|
72
71
|
script, `view_image` returns `{ image_url, detail }`, where `image_url` is a
|
|
73
72
|
base64 `data:` URL. Forward it with `image(result)` so the model sees the image:
|
|
74
73
|
|
|
@@ -89,7 +88,7 @@ paste a file path on Command-V. Ordinary text and non-image paths are left
|
|
|
89
88
|
alone.
|
|
90
89
|
|
|
91
90
|
When the prompt is submitted, each pending pill is loaded through the native
|
|
92
|
-
binary at `
|
|
91
|
+
binary at `high` detail, attached as an image, and its text becomes a
|
|
93
92
|
`<file name="..."></file>` tag. If a file cannot be loaded, the pill reverts to
|
|
94
93
|
the plain path and Pi shows a warning `Could not attach <path>: <message>`.
|
|
95
94
|
Pending pills are cleared on session start and shutdown.
|
|
@@ -112,6 +111,15 @@ of image tags equals the count of image blocks; otherwise the message is left
|
|
|
112
111
|
unchanged. This applies to Pi's own `@image` attachments and to pastes handled
|
|
113
112
|
by this package, and is provider-neutral.
|
|
114
113
|
|
|
114
|
+
The same hook then clamps every image block in the outgoing context, in user
|
|
115
|
+
and tool-result messages alike, to 2000 pixels on either axis using Pi's
|
|
116
|
+
`resizeImage`. Anthropic rejects larger images once a request carries more
|
|
117
|
+
than 20 of them, and attach-time resizing cannot fix images already in the
|
|
118
|
+
session history. Each distinct image is decoded once per session.
|
|
119
|
+
Shrinking an image that Anthropic has already seen changes the request prefix,
|
|
120
|
+
so the next response reports dropped thinking blocks once; pi-thinking-binding
|
|
121
|
+
then strips those blocks for the rest of the session.
|
|
122
|
+
|
|
115
123
|
## Configuration
|
|
116
124
|
|
|
117
125
|
The package has no settings. The only configuration is the
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
# @
|
|
2
|
-
|
|
3
|
-
[Pi gallery](https://pi.dev/packages/@cfcluan/pi-code-mode)
|
|
1
|
+
# @luan.sh/pi-code-mode [<img src="https://pi.luan.sh/icons/pi.svg" width="14" alt="Pi gallery">](https://pi.dev/packages/@luan.sh/pi-code-mode) [<img src="https://pi.luan.sh/icons/npm.svg" width="14" alt="npm">](https://www.npmjs.com/package/@luan.sh/pi-code-mode)
|
|
4
2
|
|
|
5
3
|
Code Mode adds two tools to Pi:
|
|
6
4
|
|
|
@@ -14,14 +12,14 @@ available inside `exec` through the SDK described below.
|
|
|
14
12
|
|
|
15
13
|
## Preview
|
|
16
14
|
|
|
17
|
-

|
|
18
16
|
|
|
19
|
-
[Watch the demo](https://
|
|
17
|
+
[Watch the demo](https://pi.luan.sh/media/previews/pi-code-mode-90738a72b416.mp4).
|
|
20
18
|
|
|
21
19
|
## Install
|
|
22
20
|
|
|
23
21
|
```sh
|
|
24
|
-
pi install npm:@
|
|
22
|
+
pi install npm:@luan.sh/pi-code-mode
|
|
25
23
|
```
|
|
26
24
|
|
|
27
25
|
Requires a Rust toolchain (https://rustup.rs). The `code-mode-host` binary
|
|
@@ -29,7 +27,7 @@ builds itself on first use under Pi's agent directory
|
|
|
29
27
|
(`native/code-mode-host/<version>/`). Set `PI_CODE_MODE_HOST_BINARY` to use a
|
|
30
28
|
prebuilt binary.
|
|
31
29
|
|
|
32
|
-
Optional companion: `pi install npm
|
|
30
|
+
Optional companion: `pi install npm:@luan.sh/pi-xsettings` adds the
|
|
33
31
|
`/xsettings` editor for the settings listed below; without it the defaults
|
|
34
32
|
apply.
|
|
35
33
|
|
|
@@ -55,8 +53,8 @@ changing the hierarchy; session shutdown releases it.
|
|
|
55
53
|
|
|
56
54
|
## Settings
|
|
57
55
|
|
|
58
|
-
Settings use the
|
|
59
|
-
|
|
56
|
+
Settings use the `@luan.sh/pi-code-mode` namespace and are edited with `/xsettings` when
|
|
57
|
+
`@luan.sh/pi-xsettings` is installed; otherwise the defaults apply.
|
|
60
58
|
|
|
61
59
|
| Key | Default | Meaning |
|
|
62
60
|
| --- | --- | --- |
|
|
@@ -138,7 +136,7 @@ output bounds, errors, and bounded nested call traces.
|
|
|
138
136
|
|
|
139
137
|
## SDK for other extensions
|
|
140
138
|
|
|
141
|
-
Depend on
|
|
139
|
+
Depend on `@luan.sh/pi-code-mode` and import from `@luan.sh/pi-code-mode/sdk`
|
|
142
140
|
(UI-free). Registering an adapter makes a tool eligible for lifting; the user
|
|
143
141
|
still selects it in `pi-code-mode.tools`.
|
|
144
142
|
|
|
@@ -147,7 +145,7 @@ The bridge reuses the tool's `execute`, `prepareArguments`, `renderCall`, and
|
|
|
147
145
|
`renderResult`, so direct and nested calls share one execution path:
|
|
148
146
|
|
|
149
147
|
```ts
|
|
150
|
-
import { registerCodeModeFunctionTool } from "@
|
|
148
|
+
import { registerCodeModeFunctionTool } from "@luan.sh/pi-code-mode/sdk";
|
|
151
149
|
|
|
152
150
|
const dispose = registerCodeModeFunctionTool(tool, {
|
|
153
151
|
outputSchema: { type: "object", properties: { value: { type: "string" } }, required: ["value"] },
|
|
@@ -163,7 +161,7 @@ Use `registerCodeModeToolAdapter` for freeform tools or behaviour a
|
|
|
163
161
|
`ToolDefinition` cannot express:
|
|
164
162
|
|
|
165
163
|
```ts
|
|
166
|
-
import { registerCodeModeToolAdapter } from "@
|
|
164
|
+
import { registerCodeModeToolAdapter } from "@luan.sh/pi-code-mode/sdk";
|
|
167
165
|
|
|
168
166
|
const dispose = registerCodeModeToolAdapter({
|
|
169
167
|
name: "example_tool",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
3
|
-
"version": "0.3.
|
|
2
|
+
"name": "@luan.sh/pi-code-mode",
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"pi": {
|
|
20
20
|
"extensions": [
|
|
21
21
|
"./src/extension.ts",
|
|
22
|
-
"./node_modules/pi-libtui/src/extension.ts"
|
|
22
|
+
"./node_modules/@luan.sh/pi-libtui/src/extension.ts"
|
|
23
23
|
],
|
|
24
|
-
"image": "https://
|
|
25
|
-
"video": "https://
|
|
24
|
+
"image": "https://pi.luan.sh/media/previews/pi-code-mode-1fb9bf32cd5a.png",
|
|
25
|
+
"video": "https://pi.luan.sh/media/previews/pi-code-mode-90738a72b416.mp4"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@earendil-works/pi-coding-agent": "*",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"typebox": "*"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"pi-libtui": "file:../pi-libtui",
|
|
34
|
-
"pi-xsettings": "file:../pi-xsettings"
|
|
33
|
+
"@luan.sh/pi-libtui": "file:../pi-libtui",
|
|
34
|
+
"@luan.sh/pi-xsettings": "file:../pi-xsettings"
|
|
35
35
|
},
|
|
36
36
|
"bundledDependencies": [
|
|
37
|
-
"pi-libtui",
|
|
38
|
-
"pi-xsettings"
|
|
37
|
+
"@luan.sh/pi-libtui",
|
|
38
|
+
"@luan.sh/pi-xsettings"
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
@@ -46,5 +46,8 @@
|
|
|
46
46
|
"scripts": {
|
|
47
47
|
"typecheck": "tsc --build",
|
|
48
48
|
"test": "bun test --only-failures \"$PWD/test\""
|
|
49
|
-
}
|
|
49
|
+
},
|
|
50
|
+
"publishAliases": [
|
|
51
|
+
"pi-code-mode"
|
|
52
|
+
]
|
|
50
53
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSettings, type SettingDefinitionInput, type SettingsOf } from "pi-xsettings/sdk";
|
|
1
|
+
import { createSettings, type SettingDefinitionInput, type SettingsOf } from "@luan.sh/pi-xsettings/sdk";
|
|
2
2
|
|
|
3
3
|
const CODE_MODE_OUTPUT_TOKEN_OPTIONS = [1_000, 2_500, 5_000, 10_000, 20_000, 50_000, 100_000] as const;
|
|
4
4
|
const CODE_MODE_YIELD_OPTIONS = [1_000, 5_000, 10_000, 30_000, 60_000] as const;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentToolResult, ExtensionContext, Theme } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import type { TuiMouseEvent } from "pi-libtui/mouse";
|
|
2
|
+
import type { TuiMouseEvent } from "@luan.sh/pi-libtui/mouse";
|
|
3
3
|
|
|
4
4
|
export const NESTED_TOOL_ADAPTER_PROTOCOL = "pi-code-mode/nested-tool-adapters/v2" as const;
|
|
5
5
|
export const NESTED_TOOL_ADAPTERS = Symbol.for(NESTED_TOOL_ADAPTER_PROTOCOL);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AgentToolResult, Theme, ToolRenderResultOptions } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { truncateToWidth } from "@earendil-works/pi-tui";
|
|
3
|
-
import { ComponentStack, icon, SyntaxText, sanitizeTuiField, TabBar, tuiTheme } from "pi-libtui";
|
|
4
|
-
import type { TuiMouseEvent } from "pi-libtui/mouse";
|
|
5
|
-
import { ToolActivity, type ToolTranscriptStatus } from "pi-libtui/tool";
|
|
3
|
+
import { ComponentStack, icon, SyntaxText, sanitizeTuiField, TabBar, tuiTheme } from "@luan.sh/pi-libtui";
|
|
4
|
+
import type { TuiMouseEvent } from "@luan.sh/pi-libtui/mouse";
|
|
5
|
+
import { ToolActivity, type ToolTranscriptStatus } from "@luan.sh/pi-libtui/tool";
|
|
6
6
|
import { getNestedToolAdapterRegistry, type NestedToolPresentationComponent } from "../protocol/nested-tools.ts";
|
|
7
7
|
import type { CodeModeToolDetails, NestedToolTrace } from "../protocol/types.ts";
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { beforeAll, describe, expect, test } from "bun:test";
|
|
2
2
|
import type { AgentToolResult, Theme } from "@earendil-works/pi-coding-agent";
|
|
3
|
-
import { ComponentStack, icon, MarkdownText, whenSyntaxReady } from "pi-libtui";
|
|
4
|
-
import type { TuiMouseEvent } from "pi-libtui/mouse";
|
|
5
|
-
import { ToolActivity } from "pi-libtui/tool";
|
|
3
|
+
import { ComponentStack, icon, MarkdownText, whenSyntaxReady } from "@luan.sh/pi-libtui";
|
|
4
|
+
import type { TuiMouseEvent } from "@luan.sh/pi-libtui/mouse";
|
|
5
|
+
import { ToolActivity } from "@luan.sh/pi-libtui/tool";
|
|
6
6
|
import {
|
|
7
7
|
type NestedToolPresentationComponent,
|
|
8
8
|
type NestedToolPresentationTrace,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
# pi-libtui
|
|
2
|
-
|
|
3
|
-
[Pi gallery](https://pi.dev/packages/pi-libtui)
|
|
1
|
+
# @luan.sh/pi-libtui [<img src="https://pi.luan.sh/icons/pi.svg" width="14" alt="Pi gallery">](https://pi.dev/packages/@luan.sh/pi-libtui) [<img src="https://pi.luan.sh/icons/npm.svg" width="14" alt="npm">](https://www.npmjs.com/package/@luan.sh/pi-libtui)
|
|
4
2
|
|
|
5
3
|
Shared terminal UI for Pi extensions: layouts, split panes, dialogs, pickers,
|
|
6
4
|
selection actions, semantic colors, icons, cursors, syntax highlighting,
|
|
7
5
|
animated tool surfaces, streamed output, diffs, terminal projection, and the
|
|
8
6
|
protocols those pieces need. The primary audience is extension authors.
|
|
9
7
|
|
|
10
|
-
The package has two surfaces. `import "pi-libtui"` is a
|
|
8
|
+
The package has two surfaces. `import "@luan.sh/pi-libtui"` is a
|
|
11
9
|
side-effect-free library: it does not start Pi, probe the terminal, register a
|
|
12
10
|
tool, or install UI. `src/extension.ts` is a Pi extension (listed in the
|
|
13
11
|
package's `pi.extensions`) that installs the generic mouse, cursor, and
|
|
@@ -20,24 +18,24 @@ registers no model-facing tools, keybindings, or feature-specific UI.
|
|
|
20
18
|
|
|
21
19
|
The native palette diagnostic and shared picker components in Xsettings.
|
|
22
20
|
|
|
23
|
-

|
|
24
22
|
|
|
25
|
-
[Watch the demo](https://
|
|
23
|
+
[Watch the demo](https://pi.luan.sh/media/previews/pi-libtui-e7ff85f140d3.mp4).
|
|
26
24
|
|
|
27
25
|
## Install
|
|
28
26
|
|
|
29
27
|
```sh
|
|
30
|
-
pi install npm
|
|
28
|
+
pi install npm:@luan.sh/pi-libtui
|
|
31
29
|
```
|
|
32
30
|
|
|
33
31
|
This loads the host extension and the `harmonious` theme on its own. Feature
|
|
34
|
-
packages normally bundle their own copy instead: add
|
|
32
|
+
packages normally bundle their own copy instead: add `@luan.sh/pi-libtui` to
|
|
35
33
|
both `dependencies` and `bundledDependencies` in `package.json`, and list
|
|
36
34
|
`"./node_modules/pi-libtui/src/extension.ts"` in the package's
|
|
37
35
|
`pi.extensions` so the mouse/cursor bridge is active. The host claims itself
|
|
38
36
|
once per process, so several installed copies do not conflict.
|
|
39
37
|
|
|
40
|
-
Optional companion: `pi install npm
|
|
38
|
+
Optional companion: `pi install npm:@luan.sh/pi-xsettings` adds the `/xsettings`
|
|
41
39
|
UI that publishes the appearance settings below; without it the compiled
|
|
42
40
|
defaults apply.
|
|
43
41
|
|
|
@@ -49,6 +47,59 @@ neither a generated 256-color palette nor an ANSI base-16 palette, the host
|
|
|
49
47
|
switches to Pi's built-in theme for the detected light or dark scheme (dark if
|
|
50
48
|
the measurement fails).
|
|
51
49
|
|
|
50
|
+
## Components
|
|
51
|
+
|
|
52
|
+
Captures of the shared components inside the extensions that use them. The
|
|
53
|
+
images are served from the documentation site.
|
|
54
|
+
|
|
55
|
+
`ActionPanel` with a `DialogButtonBar` footer in a `DialogOverlay`: the
|
|
56
|
+
pi-copy-mode reaction picker.
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
`MultiSelect` with ordered checkboxes, a filter `SemanticInput`, and a
|
|
61
|
+
`DialogButtonBar`: the pi-xsettings segment editor.
|
|
62
|
+
|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
`mountSplitPane` with side-panel tabs from `registerSidePanelProvider`:
|
|
66
|
+
pi-panels hosting a pi-side conversation.
|
|
67
|
+
|
|
68
|
+

|
|
69
|
+
|
|
70
|
+
`UnifiedDiffView` from `pi-libtui/diff`: the pi-fileops `apply_patch` result.
|
|
71
|
+
|
|
72
|
+

|
|
73
|
+
|
|
74
|
+
`PtyPane` over `TerminalProjection` from `pi-libtui/terminal`: the
|
|
75
|
+
pi-exec-command Process Hub attached to a running server.
|
|
76
|
+
|
|
77
|
+

|
|
78
|
+
|
|
79
|
+
`renderDetailCard` as an anchored overlay: a pi-copy-mode annotation.
|
|
80
|
+
|
|
81
|
+

|
|
82
|
+
|
|
83
|
+
`ToolActivity` and `ToolTranscript` from `pi-libtui/tool`: pi-tool-search
|
|
84
|
+
and pi-exec-command rows collapsed into an `Explored` group.
|
|
85
|
+
|
|
86
|
+

|
|
87
|
+
|
|
88
|
+
`ProgressBar`, `renderPill`, and `renderEditorTokenPills`: the
|
|
89
|
+
pi-custom-editor status row and file tokens.
|
|
90
|
+
|
|
91
|
+

|
|
92
|
+
|
|
93
|
+
`TransientPill`: the pi-tuicr confirmation after a review comment is added.
|
|
94
|
+
|
|
95
|
+

|
|
96
|
+
|
|
97
|
+
Components without a capture in a shipped extension: `PickerPanel`
|
|
98
|
+
(pi-prompt-storage), `SearchableSelect` and `SelectBox` (pi-xsettings
|
|
99
|
+
editors), `SelectionActionBar` (pi-copy-mode), `FramedEditorOverlay`,
|
|
100
|
+
`mountHoverTooltip`, `FloatingOverlay`, `ActivityIndicator` styles, and
|
|
101
|
+
`applyScrollbar`. Add them here when a gallery recording shows them in use.
|
|
102
|
+
|
|
52
103
|
## Public modules
|
|
53
104
|
|
|
54
105
|
Every entry point is a side-effect-free import. "Host required" means the
|
|
@@ -56,15 +107,15 @@ Pi-native behaviour also needs the extension loaded.
|
|
|
56
107
|
|
|
57
108
|
| Import path | Principal exports / capability | Host required |
|
|
58
109
|
| --- | --- | --- |
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
110
|
+
| `@luan.sh/pi-libtui` | Layouts, split panes, side-panel protocol, dialogs, pickers, inputs, selection actions, semantic colors, icons, cursors, `PtyProcess`, `PtyPane`, `applyScrollbar`, `PointerInteractionController`, `RenderedLinesCache`, `SyntaxText`, motion/progress, appearance (`getTuiAppearance`, `configureTuiAppearance`, `subscribeTuiAppearance`), `ensureNativeBinary` | Rendering no; panes, PTYs, and bridges yes |
|
|
111
|
+
| `@luan.sh/pi-libtui/diff` | `createUnifiedDiffModel`, `parseUnifiedDiff`, `renderUnifiedDiff`, `UnifiedDiffView`, bounded diff models/viewports | No |
|
|
112
|
+
| `@luan.sh/pi-libtui/editor` | `ensureEditorRegistry`, `dispatchEditorPaste`, `dispatchEditorRender`, `SemanticEditor`, `semanticEditorTheme`, editor registry contracts | Only to connect the registry to Pi's editor |
|
|
113
|
+
| `@luan.sh/pi-libtui/folding` | `ensureFoldingRegistry`, `foldTargetAt`, `clearFoldingCurrent`, fold-target contracts | Only for copy-mode keyboard integration |
|
|
114
|
+
| `@luan.sh/pi-libtui/mouse` | `ensureMouseRegistry`, `registerModalPointerShield`, viewport handlers, pointer contracts, `getFullscreenLayoutCapability`, `publishFullscreenLayoutCapability`, `resolveFullscreenLayout` | Yes for terminal pointer events and layout geometry |
|
|
115
|
+
| `@luan.sh/pi-libtui/selection` | `ensureSelectionRegistry`, native selection geometry, completion events, action contracts | Yes for Pi-native selection events |
|
|
116
|
+
| `@luan.sh/pi-libtui/stream` | `BoundedStreamBuffer`, bounded UTF-8/ANSI-safe stream snapshots | No |
|
|
117
|
+
| `@luan.sh/pi-libtui/terminal` | `TerminalProjection`, incremental `TerminalOutput` for bounded PTY/ANSI projection | No |
|
|
118
|
+
| `@luan.sh/pi-libtui/tool` | `ToolAction`, `LiveToolAction`, `ToolDisclosureAction`, `ToolActivity`, `ToolOutput`, `ToolTranscript`, `ToolViewRegion`, tool-call preview helpers | No for rendering |
|
|
68
119
|
|
|
69
120
|
The `ensure*Registry` functions create or reuse a process-global capability
|
|
70
121
|
keyed by `Symbol.for`, so feature packages and the host share one instance.
|
|
@@ -76,16 +127,16 @@ guarded Pi 0.84–0.85 adapter; unsupported hosts keep their native transcript.
|
|
|
76
127
|
|
|
77
128
|
## Native binaries
|
|
78
129
|
|
|
79
|
-
Feature packages shell out to Rust binaries such as `
|
|
130
|
+
Feature packages shell out to Rust binaries such as `terminal-bridge` (the
|
|
80
131
|
exported `TERMINAL_BRIDGE` descriptor). Requires a Rust toolchain
|
|
81
|
-
(https://rustup.rs). The `
|
|
82
|
-
under Pi's agent directory (`native/terminal-bridge
|
|
83
|
-
`<
|
|
132
|
+
(https://rustup.rs). The `terminal-bridge` binary builds itself on first use
|
|
133
|
+
under Pi's agent directory (`native/terminal-bridge/<revision>/`), where
|
|
134
|
+
`<revision>` is the source commit recorded in the packaged `native-revision` file. Set `PI_TERMINAL_BRIDGE_BINARY` to use
|
|
84
135
|
a prebuilt binary; it must point at an executable file.
|
|
85
136
|
|
|
86
137
|
`ensureNativeBinary(binary, hooks?)` resolves in this order: the descriptor's
|
|
87
|
-
env override, then `<agentDir>/native/<crate>/
|
|
88
|
-
it on first use when absent. Builds are keyed by crate and
|
|
138
|
+
env override, then `<agentDir>/native/<crate>/<revision>/bin/<name>`, building
|
|
139
|
+
it on first use when absent. Builds are keyed by crate and source commit, so every
|
|
89
140
|
installed copy shares them, and concurrent requests within one process share
|
|
90
141
|
one build. Pass `onBuild` to show the delay in the UI. The extension host keeps
|
|
91
142
|
the shared PTY host alive across an extension reload; a session switch or quit
|
|
@@ -127,8 +178,8 @@ shape is absent.
|
|
|
127
178
|
|
|
128
179
|
This package has no settings store of its own. It exposes an appearance
|
|
129
180
|
registry with compiled defaults (`DEFAULT_TUI_APPEARANCE`) that a settings host
|
|
130
|
-
such as
|
|
131
|
-
with pi-xsettings installed they are edited live via `/xsettings`. Keys and
|
|
181
|
+
such as `@luan.sh/pi-xsettings` overrides through `configureTuiAppearance()`;
|
|
182
|
+
with @luan.sh/pi-xsettings installed they are edited live via `/xsettings`. Keys and
|
|
132
183
|
defaults:
|
|
133
184
|
|
|
134
185
|
| Key | Default | Values |
|
|
@@ -190,7 +241,7 @@ through `src/color/resolver.ts`. Feature code uses only the root color API:
|
|
|
190
241
|
## Troubleshooting
|
|
191
242
|
|
|
192
243
|
- A feature renders but clicks do nothing: the host extension is not loaded.
|
|
193
|
-
Install
|
|
244
|
+
Install `@luan.sh/pi-libtui` as a Pi package or list its `src/extension.ts`
|
|
194
245
|
in the feature package's `pi.extensions`.
|
|
195
246
|
- Nerd Font or Powerline glyphs are missing: set the icon pack to `unicode` and
|
|
196
247
|
disable Powerline in `/xsettings`. Those are also the compiled defaults.
|
|
@@ -203,5 +254,6 @@ Source: https://github.com/luan/agents, directory
|
|
|
203
254
|
harnesses/pi/agent/packages/pi-libtui. Run `bun run typecheck` and
|
|
204
255
|
`bun test test` in that directory. When running from that checkout,
|
|
205
256
|
`ensureNativeBinary` also looks for `target/{release,debug}/<name>` in the Cargo
|
|
206
|
-
workspace and reports an unbuilt checkout instead of building
|
|
207
|
-
|
|
257
|
+
workspace and reports an unbuilt checkout instead of building. `just pi-pack`
|
|
258
|
+
records the checkout commit in every bundled `@luan.sh/pi-libtui/native-revision` file,
|
|
259
|
+
so native builds do not depend on npm versions or repository-wide release tags.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
eace67b49e52950cb408c08f290f1ca9c409d68a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "pi-libtui",
|
|
3
|
-
"version": "0.3.
|
|
2
|
+
"name": "@luan.sh/pi-libtui",
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"themes": [
|
|
31
31
|
"./themes"
|
|
32
32
|
],
|
|
33
|
-
"image": "https://
|
|
34
|
-
"video": "https://
|
|
33
|
+
"image": "https://pi.luan.sh/media/previews/pi-libtui-1820a03ca387.png",
|
|
34
|
+
"video": "https://pi.luan.sh/media/previews/pi-libtui-e7ff85f140d3.mp4"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@earendil-works/pi-coding-agent": "*",
|
|
@@ -51,5 +51,8 @@
|
|
|
51
51
|
"typecheck": "tsc --build",
|
|
52
52
|
"test": "bun test --only-failures --timeout 15000 test"
|
|
53
53
|
},
|
|
54
|
-
"bundledDependencies": []
|
|
54
|
+
"bundledDependencies": [],
|
|
55
|
+
"publishAliases": [
|
|
56
|
+
"pi-libtui"
|
|
57
|
+
]
|
|
55
58
|
}
|
|
@@ -35,7 +35,7 @@ export type NativeBinaryLocation =
|
|
|
35
35
|
|
|
36
36
|
export const TERMINAL_BRIDGE: NativeBinary = {
|
|
37
37
|
crate: "terminal-bridge",
|
|
38
|
-
binaryName: "
|
|
38
|
+
binaryName: "terminal-bridge",
|
|
39
39
|
env: "PI_TERMINAL_BRIDGE_BINARY",
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -81,7 +81,8 @@ export interface EnsureNativeBinaryHooks {
|
|
|
81
81
|
* revision under Pi's agent directory and shared by every installed pi-libtui copy.
|
|
82
82
|
*/
|
|
83
83
|
export async function ensureNativeBinary(binary: NativeBinary, hooks: EnsureNativeBinaryHooks = {}): Promise<string> {
|
|
84
|
-
const
|
|
84
|
+
const options = processOptions();
|
|
85
|
+
const location = locateNativeBinary(binary, options);
|
|
85
86
|
if (location.kind === "found") return location.path;
|
|
86
87
|
if (location.kind === "unbuilt-checkout") {
|
|
87
88
|
throw new Error(
|
|
@@ -92,7 +93,7 @@ export async function ensureNativeBinary(binary: NativeBinary, hooks: EnsureNati
|
|
|
92
93
|
const existing = builds.get(location.path);
|
|
93
94
|
if (existing) return existing;
|
|
94
95
|
hooks.onBuild?.(`Building ${binary.binaryName} (first use); this takes a minute.`);
|
|
95
|
-
const build = runCargo(nativeBuildArguments(binary,
|
|
96
|
+
const build = runCargo(nativeBuildArguments(binary, options.rev, location.installRoot), location.installRoot)
|
|
96
97
|
.then(() => {
|
|
97
98
|
if (!isExecutable(location.path)) throw new Error(`cargo install did not produce ${location.path}`);
|
|
98
99
|
return location.path;
|
|
@@ -106,12 +107,11 @@ export function terminalBridgeBinaryPath(): Promise<string> {
|
|
|
106
107
|
return ensureNativeBinary(TERMINAL_BRIDGE);
|
|
107
108
|
}
|
|
108
109
|
|
|
109
|
-
/**
|
|
110
|
+
/** The pack step records the exact source commit independently of npm versions. */
|
|
110
111
|
export function nativeRevision(): string {
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return `v${manifest.version}`;
|
|
112
|
+
const revision = readFileSync(new URL("../native-revision", import.meta.url), "utf8").trim();
|
|
113
|
+
if (!/^[a-f0-9]{40}$/.test(revision)) throw new Error("Invalid native source revision; reinstall the package.");
|
|
114
|
+
return revision;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
function processOptions(): NativeBinaryOptions {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import type { Component, Focusable } from "@earendil-works/pi-tui";
|
|
3
|
-
import type { SplitPaneHost, TuiIconName } from "pi-libtui";
|
|
4
|
-
import type { TuiMouseEvent } from "pi-libtui/mouse";
|
|
3
|
+
import type { SplitPaneHost, TuiIconName } from "@luan.sh/pi-libtui";
|
|
4
|
+
import type { TuiMouseEvent } from "@luan.sh/pi-libtui/mouse";
|
|
5
5
|
|
|
6
6
|
export const SIDE_PANEL_REGISTRY_KEY = Symbol.for("pi-panels/registry/v1");
|
|
7
7
|
export const SIDE_PANEL_PROTOCOL = "pi-panels/registry/v1" as const;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
3
3
|
import { stripTerminalSequences, visibleWidth } from "@earendil-works/pi-tui";
|
|
4
|
-
import { tuiTheme } from "pi-libtui";
|
|
4
|
+
import { tuiTheme } from "@luan.sh/pi-libtui";
|
|
5
5
|
import {
|
|
6
6
|
type EditorCompositionStyle,
|
|
7
7
|
renderEditorComposition,
|
|
8
8
|
renderEditorCompositionPreview,
|
|
9
9
|
renderEditorCompositionStatus,
|
|
10
|
-
} from "pi-libtui/editor";
|
|
10
|
+
} from "@luan.sh/pi-libtui/editor";
|
|
11
11
|
|
|
12
12
|
const theme = {
|
|
13
13
|
name: "editor-chrome-test",
|
|
@@ -10,7 +10,7 @@ const options = (executables: readonly string[], environment: Record<string, str
|
|
|
10
10
|
rev: "v1.2.3",
|
|
11
11
|
isExecutable: (path: string) => executables.includes(path),
|
|
12
12
|
});
|
|
13
|
-
const managed = join("/agent/native", "terminal-bridge", "v1.2.3", "bin", "
|
|
13
|
+
const managed = join("/agent/native", "terminal-bridge", "v1.2.3", "bin", "terminal-bridge");
|
|
14
14
|
|
|
15
15
|
test("env override wins and must be executable", () => {
|
|
16
16
|
expect(locateNativeBinary(TERMINAL_BRIDGE, options(["/x/bridge"], { [ENV]: "/x/bridge" }))).toEqual({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
2
|
|
|
3
3
|
const PUBLIC_ENTRYPOINTS = [
|
|
4
|
-
"pi-libtui",
|
|
5
|
-
"pi-libtui/diff",
|
|
6
|
-
"pi-libtui/editor",
|
|
7
|
-
"pi-libtui/folding",
|
|
8
|
-
"pi-libtui/mouse",
|
|
9
|
-
"pi-libtui/selection",
|
|
10
|
-
"pi-libtui/stream",
|
|
11
|
-
"pi-libtui/terminal",
|
|
12
|
-
"pi-libtui/tool",
|
|
4
|
+
"@luan.sh/pi-libtui",
|
|
5
|
+
"@luan.sh/pi-libtui/diff",
|
|
6
|
+
"@luan.sh/pi-libtui/editor",
|
|
7
|
+
"@luan.sh/pi-libtui/folding",
|
|
8
|
+
"@luan.sh/pi-libtui/mouse",
|
|
9
|
+
"@luan.sh/pi-libtui/selection",
|
|
10
|
+
"@luan.sh/pi-libtui/stream",
|
|
11
|
+
"@luan.sh/pi-libtui/terminal",
|
|
12
|
+
"@luan.sh/pi-libtui/tool",
|
|
13
13
|
] as const;
|
|
14
14
|
|
|
15
15
|
const CAPABILITY_KEYS = [
|
|
@@ -30,7 +30,7 @@ describe("public module boundaries", () => {
|
|
|
30
30
|
}
|
|
31
31
|
const after = CAPABILITY_KEYS.map((key) => Object.hasOwn(globalThis, key));
|
|
32
32
|
expect(after).toEqual(before);
|
|
33
|
-
const mouse = await import("pi-libtui/mouse");
|
|
33
|
+
const mouse = await import("@luan.sh/pi-libtui/mouse");
|
|
34
34
|
expect(Object.keys(mouse).sort()).toEqual([
|
|
35
35
|
"FULLSCREEN_LAYOUT_CAPABILITY_KEY",
|
|
36
36
|
"FULLSCREEN_LAYOUT_PROTOCOL",
|
|
@@ -44,7 +44,7 @@ describe("public module boundaries", () => {
|
|
|
44
44
|
"registerModalPointerShield",
|
|
45
45
|
"resolveFullscreenLayout",
|
|
46
46
|
]);
|
|
47
|
-
const editor = await import("pi-libtui/editor");
|
|
47
|
+
const editor = await import("@luan.sh/pi-libtui/editor");
|
|
48
48
|
expect(Object.keys(editor).sort()).toEqual([
|
|
49
49
|
"EDITOR_PROTOCOL",
|
|
50
50
|
"EDITOR_REGISTRY_KEY",
|