gsd-pi 2.8.3 → 2.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 +2 -1
- package/dist/cli.js +5 -0
- package/dist/loader.js +1 -1
- package/dist/update-check.d.ts +24 -0
- package/dist/update-check.js +93 -0
- package/node_modules/@gsd/native/package.json +59 -0
- package/node_modules/@gsd/native/src/__tests__/clipboard.test.mjs +79 -0
- package/node_modules/@gsd/native/src/__tests__/fd.test.mjs +164 -0
- package/node_modules/@gsd/native/src/__tests__/glob.test.mjs +237 -0
- package/node_modules/@gsd/native/src/__tests__/grep.test.mjs +162 -0
- package/node_modules/@gsd/native/src/__tests__/highlight.test.mjs +156 -0
- package/node_modules/@gsd/native/src/__tests__/html.test.mjs +98 -0
- package/node_modules/@gsd/native/src/__tests__/image.test.mjs +137 -0
- package/node_modules/@gsd/native/src/__tests__/ps.test.mjs +109 -0
- package/node_modules/@gsd/native/src/__tests__/text.test.mjs +262 -0
- package/node_modules/@gsd/native/src/ast/index.ts +12 -0
- package/node_modules/@gsd/native/src/ast/types.ts +75 -0
- package/node_modules/@gsd/native/src/clipboard/index.ts +40 -0
- package/node_modules/@gsd/native/src/clipboard/types.ts +7 -0
- package/node_modules/@gsd/native/src/fd/index.ts +35 -0
- package/node_modules/@gsd/native/src/fd/types.ts +31 -0
- package/node_modules/@gsd/native/src/glob/index.ts +44 -0
- package/node_modules/@gsd/native/src/glob/types.ts +53 -0
- package/node_modules/@gsd/native/src/grep/index.ts +48 -0
- package/node_modules/@gsd/native/src/grep/types.ts +105 -0
- package/node_modules/@gsd/native/src/highlight/index.ts +44 -0
- package/node_modules/@gsd/native/src/highlight/types.ts +25 -0
- package/node_modules/@gsd/native/src/html/index.ts +24 -0
- package/node_modules/@gsd/native/src/html/types.ts +7 -0
- package/node_modules/@gsd/native/src/image/index.ts +28 -0
- package/node_modules/@gsd/native/src/image/types.ts +41 -0
- package/node_modules/@gsd/native/src/index.ts +88 -0
- package/node_modules/@gsd/native/src/native.ts +94 -0
- package/node_modules/@gsd/native/src/ps/index.ts +52 -0
- package/node_modules/@gsd/native/src/ps/types.ts +5 -0
- package/node_modules/@gsd/native/src/text/index.ts +125 -0
- package/node_modules/@gsd/native/src/text/types.ts +29 -0
- package/node_modules/@gsd/native/src/ttsr/index.ts +39 -0
- package/node_modules/@gsd/native/src/ttsr/types.ts +10 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.d.ts +46 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.js +758 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/client.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.d.ts +23 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.js +267 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/config.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/defaults.json +456 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.d.ts +17 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.js +101 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/edits.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.d.ts +15 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.js +46 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/helpers.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.d.ts +35 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.js +709 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/index.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts +2 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.js +308 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp-integration.test.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lsp.md +33 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.d.ts +34 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.js +136 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.d.ts +262 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.js +64 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/types.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.d.ts +50 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.js +574 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/lsp/utils.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.d.ts +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.js +12 -77
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/find.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.d.ts +60 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.js +247 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-edit.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.d.ts +43 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.js +146 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline-read.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.d.ts +114 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.js +522 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.d.ts +2 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.d.ts.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.js +376 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/hashline.test.js.map +1 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.d.ts +38 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.js +27 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/tools/index.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +10 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +2 -2
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +6 -3
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +2 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.js +54 -10
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/theme/theme.js +25 -40
- package/node_modules/@gsd/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-image.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-image.js +17 -21
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-image.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.d.ts +7 -6
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.js +7 -13
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard-native.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard.js +3 -56
- package/node_modules/@gsd/pi-coding-agent/dist/utils/clipboard.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-convert.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-convert.js +7 -17
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-convert.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.d.ts +1 -2
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.js +21 -29
- package/node_modules/@gsd/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/package.json +2 -5
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/client.ts +880 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/config.ts +325 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/defaults.json +456 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/edits.ts +109 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/helpers.ts +54 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/index.ts +943 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/lsp-integration.test.ts +407 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/lsp.md +33 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/lspmux.ts +199 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/types.ts +421 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/lsp/utils.ts +682 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/slash-commands.ts +1 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/find.ts +13 -88
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline-edit.ts +318 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline-read.ts +196 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline.test.ts +456 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/hashline.ts +594 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/tools/index.ts +63 -0
- package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +2 -2
- package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +5 -3
- package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/interactive-mode.ts +66 -12
- package/node_modules/@gsd/pi-coding-agent/src/modes/interactive/theme/theme.ts +26 -42
- package/node_modules/@gsd/pi-coding-agent/src/utils/clipboard-image.ts +17 -24
- package/node_modules/@gsd/pi-coding-agent/src/utils/clipboard-native.ts +11 -21
- package/node_modules/@gsd/pi-coding-agent/src/utils/clipboard.ts +3 -51
- package/node_modules/@gsd/pi-coding-agent/src/utils/image-convert.ts +7 -17
- package/node_modules/@gsd/pi-coding-agent/src/utils/image-resize.ts +28 -34
- package/node_modules/@gsd/pi-tui/dist/autocomplete.d.ts +1 -3
- package/node_modules/@gsd/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/autocomplete.js +16 -95
- package/node_modules/@gsd/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/components/image.d.ts +7 -0
- package/node_modules/@gsd/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/components/image.js +20 -1
- package/node_modules/@gsd/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/index.d.ts +1 -1
- package/node_modules/@gsd/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/index.js +1 -1
- package/node_modules/@gsd/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/terminal-image.d.ts +5 -5
- package/node_modules/@gsd/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/terminal-image.js +9 -120
- package/node_modules/@gsd/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/utils.d.ts +23 -26
- package/node_modules/@gsd/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/utils.js +47 -716
- package/node_modules/@gsd/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@gsd/pi-tui/package.json +1 -0
- package/node_modules/@gsd/pi-tui/src/autocomplete.ts +17 -112
- package/node_modules/@gsd/pi-tui/src/components/image.ts +23 -1
- package/node_modules/@gsd/pi-tui/src/index.ts +0 -4
- package/node_modules/@gsd/pi-tui/src/terminal-image.ts +9 -135
- package/node_modules/@gsd/pi-tui/src/utils.ts +51 -775
- package/package.json +4 -1
- package/packages/native/package.json +59 -0
- package/packages/native/src/__tests__/clipboard.test.mjs +79 -0
- package/packages/native/src/__tests__/fd.test.mjs +164 -0
- package/packages/native/src/__tests__/glob.test.mjs +237 -0
- package/packages/native/src/__tests__/grep.test.mjs +162 -0
- package/packages/native/src/__tests__/highlight.test.mjs +156 -0
- package/packages/native/src/__tests__/html.test.mjs +98 -0
- package/packages/native/src/__tests__/image.test.mjs +137 -0
- package/packages/native/src/__tests__/ps.test.mjs +109 -0
- package/packages/native/src/__tests__/text.test.mjs +262 -0
- package/packages/native/src/ast/index.ts +12 -0
- package/packages/native/src/ast/types.ts +75 -0
- package/packages/native/src/clipboard/index.ts +40 -0
- package/packages/native/src/clipboard/types.ts +7 -0
- package/packages/native/src/fd/index.ts +35 -0
- package/packages/native/src/fd/types.ts +31 -0
- package/packages/native/src/glob/index.ts +44 -0
- package/packages/native/src/glob/types.ts +53 -0
- package/packages/native/src/grep/index.ts +48 -0
- package/packages/native/src/grep/types.ts +105 -0
- package/packages/native/src/highlight/index.ts +44 -0
- package/packages/native/src/highlight/types.ts +25 -0
- package/packages/native/src/html/index.ts +24 -0
- package/packages/native/src/html/types.ts +7 -0
- package/packages/native/src/image/index.ts +28 -0
- package/packages/native/src/image/types.ts +41 -0
- package/packages/native/src/index.ts +88 -0
- package/packages/native/src/native.ts +94 -0
- package/packages/native/src/ps/index.ts +52 -0
- package/packages/native/src/ps/types.ts +5 -0
- package/packages/native/src/text/index.ts +125 -0
- package/packages/native/src/text/types.ts +29 -0
- package/packages/native/src/ttsr/index.ts +39 -0
- package/packages/native/src/ttsr/types.ts +10 -0
- package/packages/native/tsconfig.json +8 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts +46 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.js +758 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/config.d.ts +23 -0
- package/packages/pi-coding-agent/dist/core/lsp/config.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/config.js +267 -0
- package/packages/pi-coding-agent/dist/core/lsp/config.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/defaults.json +456 -0
- package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts +17 -0
- package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/edits.js +101 -0
- package/packages/pi-coding-agent/dist/core/lsp/edits.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/helpers.d.ts +15 -0
- package/packages/pi-coding-agent/dist/core/lsp/helpers.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/helpers.js +46 -0
- package/packages/pi-coding-agent/dist/core/lsp/helpers.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/index.d.ts +35 -0
- package/packages/pi-coding-agent/dist/core/lsp/index.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/index.js +709 -0
- package/packages/pi-coding-agent/dist/core/lsp/index.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js +308 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp.md +33 -0
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts +34 -0
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js +136 -0
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.d.ts +262 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.js +64 -0
- package/packages/pi-coding-agent/dist/core/lsp/types.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts +50 -0
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lsp/utils.js +574 -0
- package/packages/pi-coding-agent/dist/core/lsp/utils.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/find.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/find.js +12 -77
- package/packages/pi-coding-agent/dist/core/tools/find.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/hashline-edit.d.ts +60 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-edit.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-edit.js +247 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-edit.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.d.ts +43 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.js +146 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline-read.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.d.ts +114 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.js +522 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.test.js +376 -0
- package/packages/pi-coding-agent/dist/core/tools/hashline.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts +38 -0
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/index.js +27 -0
- package/packages/pi-coding-agent/dist/core/tools/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +10 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +2 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +6 -3
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +2 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +54 -10
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +25 -40
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.js +17 -21
- package/packages/pi-coding-agent/dist/utils/clipboard-image.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-native.d.ts +7 -6
- package/packages/pi-coding-agent/dist/utils/clipboard-native.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-native.js +7 -13
- package/packages/pi-coding-agent/dist/utils/clipboard-native.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard.js +3 -56
- package/packages/pi-coding-agent/dist/utils/clipboard.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/image-convert.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/image-convert.js +7 -17
- package/packages/pi-coding-agent/dist/utils/image-convert.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/image-resize.d.ts +1 -2
- package/packages/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/image-resize.js +21 -29
- package/packages/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
- package/packages/pi-coding-agent/package.json +2 -5
- package/packages/pi-coding-agent/src/core/lsp/client.ts +880 -0
- package/packages/pi-coding-agent/src/core/lsp/config.ts +325 -0
- package/packages/pi-coding-agent/src/core/lsp/defaults.json +456 -0
- package/packages/pi-coding-agent/src/core/lsp/edits.ts +109 -0
- package/packages/pi-coding-agent/src/core/lsp/helpers.ts +54 -0
- package/packages/pi-coding-agent/src/core/lsp/index.ts +943 -0
- package/packages/pi-coding-agent/src/core/lsp/lsp-integration.test.ts +407 -0
- package/packages/pi-coding-agent/src/core/lsp/lsp.md +33 -0
- package/packages/pi-coding-agent/src/core/lsp/lspmux.ts +199 -0
- package/packages/pi-coding-agent/src/core/lsp/types.ts +421 -0
- package/packages/pi-coding-agent/src/core/lsp/utils.ts +682 -0
- package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -0
- package/packages/pi-coding-agent/src/core/tools/find.ts +13 -88
- package/packages/pi-coding-agent/src/core/tools/hashline-edit.ts +318 -0
- package/packages/pi-coding-agent/src/core/tools/hashline-read.ts +196 -0
- package/packages/pi-coding-agent/src/core/tools/hashline.test.ts +456 -0
- package/packages/pi-coding-agent/src/core/tools/hashline.ts +594 -0
- package/packages/pi-coding-agent/src/core/tools/index.ts +63 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +5 -3
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +66 -12
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +26 -42
- package/packages/pi-coding-agent/src/utils/clipboard-image.ts +17 -24
- package/packages/pi-coding-agent/src/utils/clipboard-native.ts +11 -21
- package/packages/pi-coding-agent/src/utils/clipboard.ts +3 -51
- package/packages/pi-coding-agent/src/utils/image-convert.ts +7 -17
- package/packages/pi-coding-agent/src/utils/image-resize.ts +28 -34
- package/packages/pi-tui/dist/autocomplete.d.ts +1 -3
- package/packages/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/packages/pi-tui/dist/autocomplete.js +16 -95
- package/packages/pi-tui/dist/autocomplete.js.map +1 -1
- package/packages/pi-tui/dist/components/image.d.ts +7 -0
- package/packages/pi-tui/dist/components/image.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/image.js +20 -1
- package/packages/pi-tui/dist/components/image.js.map +1 -1
- package/packages/pi-tui/dist/index.d.ts +1 -1
- package/packages/pi-tui/dist/index.d.ts.map +1 -1
- package/packages/pi-tui/dist/index.js +1 -1
- package/packages/pi-tui/dist/index.js.map +1 -1
- package/packages/pi-tui/dist/terminal-image.d.ts +5 -5
- package/packages/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/packages/pi-tui/dist/terminal-image.js +9 -120
- package/packages/pi-tui/dist/terminal-image.js.map +1 -1
- package/packages/pi-tui/dist/utils.d.ts +23 -26
- package/packages/pi-tui/dist/utils.d.ts.map +1 -1
- package/packages/pi-tui/dist/utils.js +47 -716
- package/packages/pi-tui/dist/utils.js.map +1 -1
- package/packages/pi-tui/package.json +1 -0
- package/packages/pi-tui/src/autocomplete.ts +17 -112
- package/packages/pi-tui/src/components/image.ts +23 -1
- package/packages/pi-tui/src/index.ts +0 -4
- package/packages/pi-tui/src/terminal-image.ts +9 -135
- package/packages/pi-tui/src/utils.ts +51 -775
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +25 -40
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/src/resources/extensions/ask-user-questions.ts +2 -2
- package/src/resources/extensions/bg-shell/index.ts +377 -51
- package/src/resources/extensions/browser-tools/core.d.ts +205 -0
- package/src/resources/extensions/browser-tools/index.ts +2 -2
- package/src/resources/extensions/browser-tools/refs.ts +1 -1
- package/src/resources/extensions/browser-tools/tools/session.ts +1 -1
- package/src/resources/extensions/context7/index.ts +2 -2
- package/src/resources/extensions/get-secrets-from-user.ts +3 -2
- package/src/resources/extensions/google-search/index.ts +1 -1
- package/src/resources/extensions/gsd/auto.ts +41 -4
- package/src/resources/extensions/gsd/commands.ts +218 -3
- package/src/resources/extensions/gsd/doctor.ts +1 -1
- package/src/resources/extensions/gsd/git-service.ts +129 -5
- package/src/resources/extensions/gsd/guided-flow.ts +19 -9
- package/src/resources/extensions/gsd/index.ts +17 -7
- package/src/resources/extensions/gsd/preferences.ts +1 -1
- package/src/resources/extensions/gsd/tests/git-service.test.ts +226 -0
- package/src/resources/extensions/gsd/tests/migrate-command.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/migrate-transformer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/migrate-writer-integration.test.ts +10 -10
- package/src/resources/extensions/gsd/tests/next-milestone-id.test.ts +87 -0
- package/src/resources/extensions/gsd/tests/worktree.test.ts +352 -0
- package/src/resources/extensions/gsd/types.ts +1 -0
- package/src/resources/extensions/gsd/worktree.ts +20 -1
- package/src/resources/extensions/mac-tools/index.ts +1 -1
- package/src/resources/extensions/search-the-web/format.ts +1 -1
- package/src/resources/extensions/search-the-web/index.ts +5 -5
- package/src/resources/extensions/search-the-web/tool-fetch-page.ts +7 -7
- package/src/resources/extensions/search-the-web/tool-llm-context.ts +11 -11
- package/src/resources/extensions/search-the-web/tool-search.ts +10 -10
- package/src/resources/extensions/shared/interview-ui.ts +2 -2
- package/src/resources/extensions/universal-config/discovery.ts +78 -0
- package/src/resources/extensions/universal-config/format.ts +160 -0
- package/src/resources/extensions/universal-config/index.ts +118 -0
- package/src/resources/extensions/universal-config/package.json +11 -0
- package/src/resources/extensions/universal-config/scanners.ts +579 -0
- package/src/resources/extensions/universal-config/tests/discovery.test.ts +111 -0
- package/src/resources/extensions/universal-config/tests/format.test.ts +111 -0
- package/src/resources/extensions/universal-config/tests/scanners.test.ts +438 -0
- package/src/resources/extensions/universal-config/tools.ts +60 -0
- package/src/resources/extensions/universal-config/types.ts +116 -0
- package/node_modules/@mariozechner/clipboard/.yarnrc.yml +0 -1
- package/node_modules/@mariozechner/clipboard/Cargo.toml +0 -26
- package/node_modules/@mariozechner/clipboard/README.md +0 -58
- package/node_modules/@mariozechner/clipboard/build.rs +0 -5
- package/node_modules/@mariozechner/clipboard/exp.ts +0 -12
- package/node_modules/@mariozechner/clipboard/index.d.ts +0 -23
- package/node_modules/@mariozechner/clipboard/index.js +0 -317
- package/node_modules/@mariozechner/clipboard/package.json +0 -56
- package/node_modules/@mariozechner/clipboard/src/lib.rs +0 -191
- package/node_modules/@mariozechner/clipboard-darwin-arm64/README.md +0 -3
- package/node_modules/@mariozechner/clipboard-darwin-arm64/clipboard.darwin-arm64.node +0 -0
- package/node_modules/@mariozechner/clipboard-darwin-arm64/package.json +0 -22
- package/node_modules/@mariozechner/clipboard-darwin-universal/README.md +0 -3
- package/node_modules/@mariozechner/clipboard-darwin-universal/clipboard.darwin-universal.node +0 -0
- package/node_modules/@mariozechner/clipboard-darwin-universal/package.json +0 -19
- package/node_modules/ansi-styles/index.d.ts +0 -345
- package/node_modules/ansi-styles/index.js +0 -163
- package/node_modules/ansi-styles/license +0 -9
- package/node_modules/ansi-styles/package.json +0 -56
- package/node_modules/ansi-styles/readme.md +0 -152
- package/node_modules/any-promise/.jshintrc +0 -4
- package/node_modules/any-promise/.npmignore +0 -7
- package/node_modules/any-promise/LICENSE +0 -19
- package/node_modules/any-promise/README.md +0 -161
- package/node_modules/any-promise/implementation.d.ts +0 -3
- package/node_modules/any-promise/implementation.js +0 -1
- package/node_modules/any-promise/index.d.ts +0 -73
- package/node_modules/any-promise/index.js +0 -1
- package/node_modules/any-promise/loader.js +0 -78
- package/node_modules/any-promise/optional.js +0 -6
- package/node_modules/any-promise/package.json +0 -45
- package/node_modules/any-promise/register/bluebird.d.ts +0 -1
- package/node_modules/any-promise/register/bluebird.js +0 -2
- package/node_modules/any-promise/register/es6-promise.d.ts +0 -1
- package/node_modules/any-promise/register/es6-promise.js +0 -2
- package/node_modules/any-promise/register/lie.d.ts +0 -1
- package/node_modules/any-promise/register/lie.js +0 -2
- package/node_modules/any-promise/register/native-promise-only.d.ts +0 -1
- package/node_modules/any-promise/register/native-promise-only.js +0 -2
- package/node_modules/any-promise/register/pinkie.d.ts +0 -1
- package/node_modules/any-promise/register/pinkie.js +0 -2
- package/node_modules/any-promise/register/promise.d.ts +0 -1
- package/node_modules/any-promise/register/promise.js +0 -2
- package/node_modules/any-promise/register/q.d.ts +0 -1
- package/node_modules/any-promise/register/q.js +0 -2
- package/node_modules/any-promise/register/rsvp.d.ts +0 -1
- package/node_modules/any-promise/register/rsvp.js +0 -2
- package/node_modules/any-promise/register/vow.d.ts +0 -1
- package/node_modules/any-promise/register/vow.js +0 -2
- package/node_modules/any-promise/register/when.d.ts +0 -1
- package/node_modules/any-promise/register/when.js +0 -2
- package/node_modules/any-promise/register-shim.js +0 -18
- package/node_modules/any-promise/register.d.ts +0 -17
- package/node_modules/any-promise/register.js +0 -94
- package/node_modules/cli-highlight/LICENSE.txt +0 -15
- package/node_modules/cli-highlight/README.md +0 -88
- package/node_modules/cli-highlight/bin/highlight +0 -2
- package/node_modules/cli-highlight/dist/cli.d.ts +0 -1
- package/node_modules/cli-highlight/dist/cli.js +0 -102
- package/node_modules/cli-highlight/dist/cli.js.map +0 -1
- package/node_modules/cli-highlight/dist/index.d.ts +0 -53
- package/node_modules/cli-highlight/dist/index.js +0 -112
- package/node_modules/cli-highlight/dist/index.js.map +0 -1
- package/node_modules/cli-highlight/dist/test/test.d.ts +0 -1
- package/node_modules/cli-highlight/dist/test/test.js +0 -62
- package/node_modules/cli-highlight/dist/test/test.js.map +0 -1
- package/node_modules/cli-highlight/dist/theme.d.ts +0 -270
- package/node_modules/cli-highlight/dist/theme.js +0 -265
- package/node_modules/cli-highlight/dist/theme.js.map +0 -1
- package/node_modules/cli-highlight/node_modules/chalk/index.d.ts +0 -415
- package/node_modules/cli-highlight/node_modules/chalk/license +0 -9
- package/node_modules/cli-highlight/node_modules/chalk/package.json +0 -68
- package/node_modules/cli-highlight/node_modules/chalk/readme.md +0 -341
- package/node_modules/cli-highlight/node_modules/chalk/source/index.js +0 -229
- package/node_modules/cli-highlight/node_modules/chalk/source/templates.js +0 -134
- package/node_modules/cli-highlight/node_modules/chalk/source/util.js +0 -39
- package/node_modules/cli-highlight/package.json +0 -129
- package/node_modules/cliui/CHANGELOG.md +0 -121
- package/node_modules/cliui/LICENSE.txt +0 -14
- package/node_modules/cliui/README.md +0 -141
- package/node_modules/cliui/build/index.cjs +0 -302
- package/node_modules/cliui/build/lib/index.js +0 -287
- package/node_modules/cliui/build/lib/string-utils.js +0 -27
- package/node_modules/cliui/index.mjs +0 -13
- package/node_modules/cliui/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/cliui/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/cliui/node_modules/ansi-regex/license +0 -9
- package/node_modules/cliui/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/cliui/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/cliui/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/cliui/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/cliui/node_modules/strip-ansi/license +0 -9
- package/node_modules/cliui/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/cliui/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/cliui/package.json +0 -83
- package/node_modules/color-convert/CHANGELOG.md +0 -54
- package/node_modules/color-convert/LICENSE +0 -21
- package/node_modules/color-convert/README.md +0 -68
- package/node_modules/color-convert/conversions.js +0 -839
- package/node_modules/color-convert/index.js +0 -81
- package/node_modules/color-convert/package.json +0 -48
- package/node_modules/color-convert/route.js +0 -97
- package/node_modules/color-name/LICENSE +0 -8
- package/node_modules/color-name/README.md +0 -11
- package/node_modules/color-name/index.js +0 -152
- package/node_modules/color-name/package.json +0 -28
- package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/node_modules/emoji-regex/README.md +0 -73
- package/node_modules/emoji-regex/es2015/index.js +0 -6
- package/node_modules/emoji-regex/es2015/text.js +0 -6
- package/node_modules/emoji-regex/index.d.ts +0 -23
- package/node_modules/emoji-regex/index.js +0 -6
- package/node_modules/emoji-regex/package.json +0 -50
- package/node_modules/emoji-regex/text.js +0 -6
- package/node_modules/escalade/dist/index.js +0 -22
- package/node_modules/escalade/dist/index.mjs +0 -22
- package/node_modules/escalade/index.d.mts +0 -11
- package/node_modules/escalade/index.d.ts +0 -15
- package/node_modules/escalade/license +0 -9
- package/node_modules/escalade/package.json +0 -74
- package/node_modules/escalade/readme.md +0 -211
- package/node_modules/escalade/sync/index.d.mts +0 -9
- package/node_modules/escalade/sync/index.d.ts +0 -13
- package/node_modules/escalade/sync/index.js +0 -18
- package/node_modules/escalade/sync/index.mjs +0 -18
- package/node_modules/esprima/ChangeLog +0 -235
- package/node_modules/get-caller-file/LICENSE.md +0 -6
- package/node_modules/get-caller-file/README.md +0 -41
- package/node_modules/get-caller-file/index.d.ts +0 -2
- package/node_modules/get-caller-file/index.js +0 -22
- package/node_modules/get-caller-file/index.js.map +0 -1
- package/node_modules/get-caller-file/package.json +0 -42
- package/node_modules/has-flag/index.d.ts +0 -39
- package/node_modules/has-flag/index.js +0 -8
- package/node_modules/has-flag/license +0 -9
- package/node_modules/has-flag/package.json +0 -46
- package/node_modules/has-flag/readme.md +0 -89
- package/node_modules/highlight.js/LICENSE +0 -29
- package/node_modules/highlight.js/README.md +0 -371
- package/node_modules/highlight.js/lib/core.js +0 -2517
- package/node_modules/highlight.js/lib/highlight.js +0 -2
- package/node_modules/highlight.js/lib/index.js +0 -195
- package/node_modules/highlight.js/lib/languages/1c.js +0 -521
- package/node_modules/highlight.js/lib/languages/abnf.js +0 -103
- package/node_modules/highlight.js/lib/languages/accesslog.js +0 -127
- package/node_modules/highlight.js/lib/languages/actionscript.js +0 -113
- package/node_modules/highlight.js/lib/languages/ada.js +0 -194
- package/node_modules/highlight.js/lib/languages/angelscript.js +0 -123
- package/node_modules/highlight.js/lib/languages/apache.js +0 -89
- package/node_modules/highlight.js/lib/languages/applescript.js +0 -189
- package/node_modules/highlight.js/lib/languages/arcade.js +0 -165
- package/node_modules/highlight.js/lib/languages/arduino.js +0 -576
- package/node_modules/highlight.js/lib/languages/armasm.js +0 -131
- package/node_modules/highlight.js/lib/languages/asciidoc.js +0 -303
- package/node_modules/highlight.js/lib/languages/aspectj.js +0 -186
- package/node_modules/highlight.js/lib/languages/autohotkey.js +0 -84
- package/node_modules/highlight.js/lib/languages/autoit.js +0 -183
- package/node_modules/highlight.js/lib/languages/avrasm.js +0 -80
- package/node_modules/highlight.js/lib/languages/awk.js +0 -73
- package/node_modules/highlight.js/lib/languages/axapta.js +0 -179
- package/node_modules/highlight.js/lib/languages/bash.js +0 -169
- package/node_modules/highlight.js/lib/languages/basic.js +0 -65
- package/node_modules/highlight.js/lib/languages/bnf.js +0 -38
- package/node_modules/highlight.js/lib/languages/brainfuck.js +0 -46
- package/node_modules/highlight.js/lib/languages/c-like.js +0 -501
- package/node_modules/highlight.js/lib/languages/c.js +0 -309
- package/node_modules/highlight.js/lib/languages/cal.js +0 -104
- package/node_modules/highlight.js/lib/languages/capnproto.js +0 -64
- package/node_modules/highlight.js/lib/languages/ceylon.js +0 -82
- package/node_modules/highlight.js/lib/languages/clean.js +0 -40
- package/node_modules/highlight.js/lib/languages/clojure-repl.js +0 -27
- package/node_modules/highlight.js/lib/languages/clojure.js +0 -158
- package/node_modules/highlight.js/lib/languages/cmake.js +0 -64
- package/node_modules/highlight.js/lib/languages/coffeescript.js +0 -356
- package/node_modules/highlight.js/lib/languages/coq.js +0 -79
- package/node_modules/highlight.js/lib/languages/cos.js +0 -138
- package/node_modules/highlight.js/lib/languages/cpp.js +0 -464
- package/node_modules/highlight.js/lib/languages/crmsh.js +0 -102
- package/node_modules/highlight.js/lib/languages/crystal.js +0 -326
- package/node_modules/highlight.js/lib/languages/csharp.js +0 -441
- package/node_modules/highlight.js/lib/languages/csp.js +0 -37
- package/node_modules/highlight.js/lib/languages/css.js +0 -608
- package/node_modules/highlight.js/lib/languages/d.js +0 -271
- package/node_modules/highlight.js/lib/languages/dart.js +0 -199
- package/node_modules/highlight.js/lib/languages/delphi.js +0 -126
- package/node_modules/highlight.js/lib/languages/diff.js +0 -85
- package/node_modules/highlight.js/lib/languages/django.js +0 -77
- package/node_modules/highlight.js/lib/languages/dns.js +0 -46
- package/node_modules/highlight.js/lib/languages/dockerfile.js +0 -34
- package/node_modules/highlight.js/lib/languages/dos.js +0 -70
- package/node_modules/highlight.js/lib/languages/dsconfig.js +0 -66
- package/node_modules/highlight.js/lib/languages/dts.js +0 -153
- package/node_modules/highlight.js/lib/languages/dust.js +0 -45
- package/node_modules/highlight.js/lib/languages/ebnf.js +0 -53
- package/node_modules/highlight.js/lib/languages/elixir.js +0 -259
- package/node_modules/highlight.js/lib/languages/elm.js +0 -129
- package/node_modules/highlight.js/lib/languages/erb.js +0 -29
- package/node_modules/highlight.js/lib/languages/erlang-repl.js +0 -86
- package/node_modules/highlight.js/lib/languages/erlang.js +0 -199
- package/node_modules/highlight.js/lib/languages/excel.js +0 -64
- package/node_modules/highlight.js/lib/languages/fix.js +0 -37
- package/node_modules/highlight.js/lib/languages/flix.js +0 -54
- package/node_modules/highlight.js/lib/languages/fortran.js +0 -159
- package/node_modules/highlight.js/lib/languages/fsharp.js +0 -86
- package/node_modules/highlight.js/lib/languages/gams.js +0 -208
- package/node_modules/highlight.js/lib/languages/gauss.js +0 -316
- package/node_modules/highlight.js/lib/languages/gcode.js +0 -88
- package/node_modules/highlight.js/lib/languages/gherkin.js +0 -49
- package/node_modules/highlight.js/lib/languages/glsl.js +0 -128
- package/node_modules/highlight.js/lib/languages/gml.js +0 -885
- package/node_modules/highlight.js/lib/languages/go.js +0 -74
- package/node_modules/highlight.js/lib/languages/golo.js +0 -33
- package/node_modules/highlight.js/lib/languages/gradle.js +0 -44
- package/node_modules/highlight.js/lib/languages/groovy.js +0 -174
- package/node_modules/highlight.js/lib/languages/haml.js +0 -117
- package/node_modules/highlight.js/lib/languages/handlebars.js +0 -324
- package/node_modules/highlight.js/lib/languages/haskell.js +0 -173
- package/node_modules/highlight.js/lib/languages/haxe.js +0 -157
- package/node_modules/highlight.js/lib/languages/hsp.js +0 -65
- package/node_modules/highlight.js/lib/languages/htmlbars.js +0 -352
- package/node_modules/highlight.js/lib/languages/http.js +0 -121
- package/node_modules/highlight.js/lib/languages/hy.js +0 -109
- package/node_modules/highlight.js/lib/languages/inform7.js +0 -70
- package/node_modules/highlight.js/lib/languages/ini.js +0 -173
- package/node_modules/highlight.js/lib/languages/irpf90.js +0 -141
- package/node_modules/highlight.js/lib/languages/isbl.js +0 -3207
- package/node_modules/highlight.js/lib/languages/java.js +0 -181
- package/node_modules/highlight.js/lib/languages/javascript.js +0 -604
- package/node_modules/highlight.js/lib/languages/jboss-cli.js +0 -63
- package/node_modules/highlight.js/lib/languages/json.js +0 -63
- package/node_modules/highlight.js/lib/languages/julia-repl.js +0 -50
- package/node_modules/highlight.js/lib/languages/julia.js +0 -416
- package/node_modules/highlight.js/lib/languages/kotlin.js +0 -284
- package/node_modules/highlight.js/lib/languages/lasso.js +0 -187
- package/node_modules/highlight.js/lib/languages/latex.js +0 -276
- package/node_modules/highlight.js/lib/languages/ldif.js +0 -42
- package/node_modules/highlight.js/lib/languages/leaf.js +0 -49
- package/node_modules/highlight.js/lib/languages/less.js +0 -666
- package/node_modules/highlight.js/lib/languages/lisp.js +0 -111
- package/node_modules/highlight.js/lib/languages/livecodeserver.js +0 -189
- package/node_modules/highlight.js/lib/languages/livescript.js +0 -374
- package/node_modules/highlight.js/lib/languages/llvm.js +0 -154
- package/node_modules/highlight.js/lib/languages/lsl.js +0 -95
- package/node_modules/highlight.js/lib/languages/lua.js +0 -82
- package/node_modules/highlight.js/lib/languages/makefile.js +0 -92
- package/node_modules/highlight.js/lib/languages/markdown.js +0 -258
- package/node_modules/highlight.js/lib/languages/mathematica.js +0 -6797
- package/node_modules/highlight.js/lib/languages/matlab.js +0 -106
- package/node_modules/highlight.js/lib/languages/maxima.js +0 -417
- package/node_modules/highlight.js/lib/languages/mel.js +0 -236
- package/node_modules/highlight.js/lib/languages/mercury.js +0 -121
- package/node_modules/highlight.js/lib/languages/mipsasm.js +0 -109
- package/node_modules/highlight.js/lib/languages/mizar.js +0 -29
- package/node_modules/highlight.js/lib/languages/mojolicious.js +0 -36
- package/node_modules/highlight.js/lib/languages/monkey.js +0 -89
- package/node_modules/highlight.js/lib/languages/moonscript.js +0 -147
- package/node_modules/highlight.js/lib/languages/n1ql.js +0 -77
- package/node_modules/highlight.js/lib/languages/nginx.js +0 -140
- package/node_modules/highlight.js/lib/languages/nim.js +0 -79
- package/node_modules/highlight.js/lib/languages/nix.js +0 -65
- package/node_modules/highlight.js/lib/languages/node-repl.js +0 -37
- package/node_modules/highlight.js/lib/languages/nsis.js +0 -119
- package/node_modules/highlight.js/lib/languages/objectivec.js +0 -121
- package/node_modules/highlight.js/lib/languages/ocaml.js +0 -82
- package/node_modules/highlight.js/lib/languages/openscad.js +0 -81
- package/node_modules/highlight.js/lib/languages/oxygene.js +0 -101
- package/node_modules/highlight.js/lib/languages/parser3.js +0 -57
- package/node_modules/highlight.js/lib/languages/perl.js +0 -515
- package/node_modules/highlight.js/lib/languages/pf.js +0 -59
- package/node_modules/highlight.js/lib/languages/pgsql.js +0 -630
- package/node_modules/highlight.js/lib/languages/php-template.js +0 -54
- package/node_modules/highlight.js/lib/languages/php.js +0 -204
- package/node_modules/highlight.js/lib/languages/plaintext.js +0 -19
- package/node_modules/highlight.js/lib/languages/pony.js +0 -89
- package/node_modules/highlight.js/lib/languages/powershell.js +0 -331
- package/node_modules/highlight.js/lib/languages/processing.js +0 -58
- package/node_modules/highlight.js/lib/languages/profile.js +0 -43
- package/node_modules/highlight.js/lib/languages/prolog.js +0 -102
- package/node_modules/highlight.js/lib/languages/properties.js +0 -85
- package/node_modules/highlight.js/lib/languages/protobuf.js +0 -47
- package/node_modules/highlight.js/lib/languages/puppet.js +0 -147
- package/node_modules/highlight.js/lib/languages/purebasic.js +0 -101
- package/node_modules/highlight.js/lib/languages/python-repl.js +0 -36
- package/node_modules/highlight.js/lib/languages/python.js +0 -446
- package/node_modules/highlight.js/lib/languages/q.js +0 -37
- package/node_modules/highlight.js/lib/languages/qml.js +0 -225
- package/node_modules/highlight.js/lib/languages/r.js +0 -231
- package/node_modules/highlight.js/lib/languages/reasonml.js +0 -321
- package/node_modules/highlight.js/lib/languages/rib.js +0 -37
- package/node_modules/highlight.js/lib/languages/roboconf.js +0 -82
- package/node_modules/highlight.js/lib/languages/routeros.js +0 -172
- package/node_modules/highlight.js/lib/languages/rsl.js +0 -49
- package/node_modules/highlight.js/lib/languages/ruby.js +0 -387
- package/node_modules/highlight.js/lib/languages/ruleslanguage.js +0 -78
- package/node_modules/highlight.js/lib/languages/rust.js +0 -146
- package/node_modules/highlight.js/lib/languages/sas.js +0 -133
- package/node_modules/highlight.js/lib/languages/scala.js +0 -140
- package/node_modules/highlight.js/lib/languages/scheme.js +0 -207
- package/node_modules/highlight.js/lib/languages/scilab.js +0 -73
- package/node_modules/highlight.js/lib/languages/scss.js +0 -545
- package/node_modules/highlight.js/lib/languages/shell.js +0 -30
- package/node_modules/highlight.js/lib/languages/smali.js +0 -135
- package/node_modules/highlight.js/lib/languages/smalltalk.js +0 -63
- package/node_modules/highlight.js/lib/languages/sml.js +0 -81
- package/node_modules/highlight.js/lib/languages/sqf.js +0 -448
- package/node_modules/highlight.js/lib/languages/sql.js +0 -699
- package/node_modules/highlight.js/lib/languages/sql_more.js +0 -183
- package/node_modules/highlight.js/lib/languages/stan.js +0 -548
- package/node_modules/highlight.js/lib/languages/stata.js +0 -60
- package/node_modules/highlight.js/lib/languages/step21.js +0 -66
- package/node_modules/highlight.js/lib/languages/stylus.js +0 -609
- package/node_modules/highlight.js/lib/languages/subunit.js +0 -51
- package/node_modules/highlight.js/lib/languages/swift.js +0 -873
- package/node_modules/highlight.js/lib/languages/taggerscript.js +0 -52
- package/node_modules/highlight.js/lib/languages/tap.js +0 -55
- package/node_modules/highlight.js/lib/languages/tcl.js +0 -115
- package/node_modules/highlight.js/lib/languages/thrift.js +0 -51
- package/node_modules/highlight.js/lib/languages/tp.js +0 -95
- package/node_modules/highlight.js/lib/languages/twig.js +0 -77
- package/node_modules/highlight.js/lib/languages/typescript.js +0 -697
- package/node_modules/highlight.js/lib/languages/vala.js +0 -61
- package/node_modules/highlight.js/lib/languages/vbnet.js +0 -214
- package/node_modules/highlight.js/lib/languages/vbscript-html.js +0 -24
- package/node_modules/highlight.js/lib/languages/vbscript.js +0 -109
- package/node_modules/highlight.js/lib/languages/verilog.js +0 -131
- package/node_modules/highlight.js/lib/languages/vhdl.js +0 -71
- package/node_modules/highlight.js/lib/languages/vim.js +0 -123
- package/node_modules/highlight.js/lib/languages/x86asm.js +0 -163
- package/node_modules/highlight.js/lib/languages/xl.js +0 -92
- package/node_modules/highlight.js/lib/languages/xml.js +0 -287
- package/node_modules/highlight.js/lib/languages/xquery.js +0 -197
- package/node_modules/highlight.js/lib/languages/yaml.js +0 -176
- package/node_modules/highlight.js/lib/languages/zephir.js +0 -140
- package/node_modules/highlight.js/package.json +0 -86
- package/node_modules/highlight.js/scss/a11y-dark.scss +0 -99
- package/node_modules/highlight.js/scss/a11y-light.scss +0 -99
- package/node_modules/highlight.js/scss/agate.scss +0 -108
- package/node_modules/highlight.js/scss/an-old-hope.scss +0 -89
- package/node_modules/highlight.js/scss/androidstudio.scss +0 -66
- package/node_modules/highlight.js/scss/arduino-light.scss +0 -87
- package/node_modules/highlight.js/scss/arta.scss +0 -73
- package/node_modules/highlight.js/scss/ascetic.scss +0 -45
- package/node_modules/highlight.js/scss/atelier-cave-dark.scss +0 -83
- package/node_modules/highlight.js/scss/atelier-cave-light.scss +0 -85
- package/node_modules/highlight.js/scss/atelier-dune-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-dune-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-estuary-dark.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-estuary-light.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-forest-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-forest-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-heath-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-heath-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-lakeside-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-lakeside-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-plateau-dark.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-plateau-light.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-savanna-dark.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-savanna-light.scss +0 -84
- package/node_modules/highlight.js/scss/atelier-seaside-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-seaside-light.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-sulphurpool-dark.scss +0 -69
- package/node_modules/highlight.js/scss/atelier-sulphurpool-light.scss +0 -69
- package/node_modules/highlight.js/scss/atom-one-dark-reasonable.scss +0 -75
- package/node_modules/highlight.js/scss/atom-one-dark.scss +0 -96
- package/node_modules/highlight.js/scss/atom-one-light.scss +0 -96
- package/node_modules/highlight.js/scss/brown-paper.scss +0 -64
- package/node_modules/highlight.js/scss/brown-papersq.png +0 -0
- package/node_modules/highlight.js/scss/codepen-embed.scss +0 -60
- package/node_modules/highlight.js/scss/color-brewer.scss +0 -71
- package/node_modules/highlight.js/scss/darcula.scss +0 -74
- package/node_modules/highlight.js/scss/dark.scss +0 -63
- package/node_modules/highlight.js/scss/default.scss +0 -99
- package/node_modules/highlight.js/scss/docco.scss +0 -97
- package/node_modules/highlight.js/scss/dracula.scss +0 -76
- package/node_modules/highlight.js/scss/far.scss +0 -71
- package/node_modules/highlight.js/scss/foundation.scss +0 -89
- package/node_modules/highlight.js/scss/github-gist.scss +0 -79
- package/node_modules/highlight.js/scss/github.scss +0 -99
- package/node_modules/highlight.js/scss/gml.scss +0 -78
- package/node_modules/highlight.js/scss/googlecode.scss +0 -89
- package/node_modules/highlight.js/scss/gradient-dark.scss +0 -122
- package/node_modules/highlight.js/scss/gradient-light.scss +0 -130
- package/node_modules/highlight.js/scss/grayscale.scss +0 -101
- package/node_modules/highlight.js/scss/gruvbox-dark.scss +0 -108
- package/node_modules/highlight.js/scss/gruvbox-light.scss +0 -108
- package/node_modules/highlight.js/scss/hopscotch.scss +0 -84
- package/node_modules/highlight.js/scss/hybrid.scss +0 -102
- package/node_modules/highlight.js/scss/idea.scss +0 -97
- package/node_modules/highlight.js/scss/ir-black.scss +0 -73
- package/node_modules/highlight.js/scss/isbl-editor-dark.scss +0 -112
- package/node_modules/highlight.js/scss/isbl-editor-light.scss +0 -111
- package/node_modules/highlight.js/scss/kimbie.dark.scss +0 -74
- package/node_modules/highlight.js/scss/kimbie.light.scss +0 -74
- package/node_modules/highlight.js/scss/lightfair.scss +0 -88
- package/node_modules/highlight.js/scss/lioshi.scss +0 -88
- package/node_modules/highlight.js/scss/magula.scss +0 -70
- package/node_modules/highlight.js/scss/mono-blue.scss +0 -56
- package/node_modules/highlight.js/scss/monokai-sublime.scss +0 -83
- package/node_modules/highlight.js/scss/monokai.scss +0 -71
- package/node_modules/highlight.js/scss/night-owl.scss +0 -182
- package/node_modules/highlight.js/scss/nnfx-dark.scss +0 -106
- package/node_modules/highlight.js/scss/nnfx.scss +0 -106
- package/node_modules/highlight.js/scss/nord.scss +0 -309
- package/node_modules/highlight.js/scss/obsidian.scss +0 -88
- package/node_modules/highlight.js/scss/ocean.scss +0 -74
- package/node_modules/highlight.js/scss/paraiso-dark.scss +0 -72
- package/node_modules/highlight.js/scss/paraiso-light.scss +0 -72
- package/node_modules/highlight.js/scss/pojoaque.jpg +0 -0
- package/node_modules/highlight.js/scss/pojoaque.scss +0 -83
- package/node_modules/highlight.js/scss/purebasic.scss +0 -96
- package/node_modules/highlight.js/scss/qtcreator_dark.scss +0 -83
- package/node_modules/highlight.js/scss/qtcreator_light.scss +0 -83
- package/node_modules/highlight.js/scss/railscasts.scss +0 -106
- package/node_modules/highlight.js/scss/rainbow.scss +0 -85
- package/node_modules/highlight.js/scss/routeros.scss +0 -108
- package/node_modules/highlight.js/scss/school-book.png +0 -0
- package/node_modules/highlight.js/scss/school-book.scss +0 -69
- package/node_modules/highlight.js/scss/shades-of-purple.scss +0 -96
- package/node_modules/highlight.js/scss/solarized-dark.scss +0 -84
- package/node_modules/highlight.js/scss/solarized-light.scss +0 -84
- package/node_modules/highlight.js/scss/srcery.scss +0 -78
- package/node_modules/highlight.js/scss/stackoverflow-dark.scss +0 -78
- package/node_modules/highlight.js/scss/stackoverflow-light.scss +0 -78
- package/node_modules/highlight.js/scss/sunburst.scss +0 -102
- package/node_modules/highlight.js/scss/tomorrow-night-blue.scss +0 -75
- package/node_modules/highlight.js/scss/tomorrow-night-bright.scss +0 -74
- package/node_modules/highlight.js/scss/tomorrow-night-eighties.scss +0 -74
- package/node_modules/highlight.js/scss/tomorrow-night.scss +0 -75
- package/node_modules/highlight.js/scss/tomorrow.scss +0 -72
- package/node_modules/highlight.js/scss/vs.scss +0 -68
- package/node_modules/highlight.js/scss/vs2015.scss +0 -115
- package/node_modules/highlight.js/scss/xcode.scss +0 -104
- package/node_modules/highlight.js/scss/xt256.scss +0 -92
- package/node_modules/highlight.js/scss/zenburn.scss +0 -80
- package/node_modules/highlight.js/styles/a11y-dark.css +0 -99
- package/node_modules/highlight.js/styles/a11y-light.css +0 -99
- package/node_modules/highlight.js/styles/agate.css +0 -108
- package/node_modules/highlight.js/styles/an-old-hope.css +0 -89
- package/node_modules/highlight.js/styles/androidstudio.css +0 -66
- package/node_modules/highlight.js/styles/arduino-light.css +0 -87
- package/node_modules/highlight.js/styles/arta.css +0 -73
- package/node_modules/highlight.js/styles/ascetic.css +0 -45
- package/node_modules/highlight.js/styles/atelier-cave-dark.css +0 -83
- package/node_modules/highlight.js/styles/atelier-cave-light.css +0 -85
- package/node_modules/highlight.js/styles/atelier-dune-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-dune-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-estuary-dark.css +0 -84
- package/node_modules/highlight.js/styles/atelier-estuary-light.css +0 -84
- package/node_modules/highlight.js/styles/atelier-forest-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-forest-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-heath-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-heath-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-lakeside-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-lakeside-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-plateau-dark.css +0 -84
- package/node_modules/highlight.js/styles/atelier-plateau-light.css +0 -84
- package/node_modules/highlight.js/styles/atelier-savanna-dark.css +0 -84
- package/node_modules/highlight.js/styles/atelier-savanna-light.css +0 -84
- package/node_modules/highlight.js/styles/atelier-seaside-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-seaside-light.css +0 -69
- package/node_modules/highlight.js/styles/atelier-sulphurpool-dark.css +0 -69
- package/node_modules/highlight.js/styles/atelier-sulphurpool-light.css +0 -69
- package/node_modules/highlight.js/styles/atom-one-dark-reasonable.css +0 -75
- package/node_modules/highlight.js/styles/atom-one-dark.css +0 -96
- package/node_modules/highlight.js/styles/atom-one-light.css +0 -96
- package/node_modules/highlight.js/styles/brown-paper.css +0 -64
- package/node_modules/highlight.js/styles/brown-papersq.png +0 -0
- package/node_modules/highlight.js/styles/codepen-embed.css +0 -60
- package/node_modules/highlight.js/styles/color-brewer.css +0 -71
- package/node_modules/highlight.js/styles/darcula.css +0 -74
- package/node_modules/highlight.js/styles/dark.css +0 -63
- package/node_modules/highlight.js/styles/default.css +0 -99
- package/node_modules/highlight.js/styles/docco.css +0 -97
- package/node_modules/highlight.js/styles/dracula.css +0 -76
- package/node_modules/highlight.js/styles/far.css +0 -71
- package/node_modules/highlight.js/styles/foundation.css +0 -89
- package/node_modules/highlight.js/styles/github-gist.css +0 -79
- package/node_modules/highlight.js/styles/github.css +0 -99
- package/node_modules/highlight.js/styles/gml.css +0 -78
- package/node_modules/highlight.js/styles/googlecode.css +0 -89
- package/node_modules/highlight.js/styles/gradient-dark.css +0 -122
- package/node_modules/highlight.js/styles/gradient-light.css +0 -130
- package/node_modules/highlight.js/styles/grayscale.css +0 -101
- package/node_modules/highlight.js/styles/gruvbox-dark.css +0 -108
- package/node_modules/highlight.js/styles/gruvbox-light.css +0 -108
- package/node_modules/highlight.js/styles/hopscotch.css +0 -84
- package/node_modules/highlight.js/styles/hybrid.css +0 -102
- package/node_modules/highlight.js/styles/idea.css +0 -97
- package/node_modules/highlight.js/styles/ir-black.css +0 -73
- package/node_modules/highlight.js/styles/isbl-editor-dark.css +0 -112
- package/node_modules/highlight.js/styles/isbl-editor-light.css +0 -111
- package/node_modules/highlight.js/styles/kimbie.dark.css +0 -74
- package/node_modules/highlight.js/styles/kimbie.light.css +0 -74
- package/node_modules/highlight.js/styles/lightfair.css +0 -88
- package/node_modules/highlight.js/styles/lioshi.css +0 -88
- package/node_modules/highlight.js/styles/magula.css +0 -70
- package/node_modules/highlight.js/styles/mono-blue.css +0 -56
- package/node_modules/highlight.js/styles/monokai-sublime.css +0 -83
- package/node_modules/highlight.js/styles/monokai.css +0 -71
- package/node_modules/highlight.js/styles/night-owl.css +0 -182
- package/node_modules/highlight.js/styles/nnfx-dark.css +0 -106
- package/node_modules/highlight.js/styles/nnfx.css +0 -106
- package/node_modules/highlight.js/styles/nord.css +0 -309
- package/node_modules/highlight.js/styles/obsidian.css +0 -88
- package/node_modules/highlight.js/styles/ocean.css +0 -74
- package/node_modules/highlight.js/styles/paraiso-dark.css +0 -72
- package/node_modules/highlight.js/styles/paraiso-light.css +0 -72
- package/node_modules/highlight.js/styles/pojoaque.css +0 -83
- package/node_modules/highlight.js/styles/pojoaque.jpg +0 -0
- package/node_modules/highlight.js/styles/purebasic.css +0 -96
- package/node_modules/highlight.js/styles/qtcreator_dark.css +0 -83
- package/node_modules/highlight.js/styles/qtcreator_light.css +0 -83
- package/node_modules/highlight.js/styles/railscasts.css +0 -106
- package/node_modules/highlight.js/styles/rainbow.css +0 -85
- package/node_modules/highlight.js/styles/routeros.css +0 -108
- package/node_modules/highlight.js/styles/school-book.css +0 -69
- package/node_modules/highlight.js/styles/school-book.png +0 -0
- package/node_modules/highlight.js/styles/shades-of-purple.css +0 -96
- package/node_modules/highlight.js/styles/solarized-dark.css +0 -84
- package/node_modules/highlight.js/styles/solarized-light.css +0 -84
- package/node_modules/highlight.js/styles/srcery.css +0 -78
- package/node_modules/highlight.js/styles/stackoverflow-dark.css +0 -78
- package/node_modules/highlight.js/styles/stackoverflow-light.css +0 -78
- package/node_modules/highlight.js/styles/sunburst.css +0 -102
- package/node_modules/highlight.js/styles/tomorrow-night-blue.css +0 -75
- package/node_modules/highlight.js/styles/tomorrow-night-bright.css +0 -74
- package/node_modules/highlight.js/styles/tomorrow-night-eighties.css +0 -74
- package/node_modules/highlight.js/styles/tomorrow-night.css +0 -75
- package/node_modules/highlight.js/styles/tomorrow.css +0 -72
- package/node_modules/highlight.js/styles/vs.css +0 -68
- package/node_modules/highlight.js/styles/vs2015.css +0 -115
- package/node_modules/highlight.js/styles/xcode.css +0 -104
- package/node_modules/highlight.js/styles/xt256.css +0 -92
- package/node_modules/highlight.js/styles/zenburn.css +0 -80
- package/node_modules/highlight.js/types/index.d.ts +0 -261
- package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/node_modules/is-fullwidth-code-point/license +0 -9
- package/node_modules/is-fullwidth-code-point/package.json +0 -42
- package/node_modules/is-fullwidth-code-point/readme.md +0 -39
- package/node_modules/mz/HISTORY.md +0 -66
- package/node_modules/mz/LICENSE +0 -22
- package/node_modules/mz/README.md +0 -106
- package/node_modules/mz/child_process.js +0 -8
- package/node_modules/mz/crypto.js +0 -9
- package/node_modules/mz/dns.js +0 -16
- package/node_modules/mz/fs.js +0 -62
- package/node_modules/mz/index.js +0 -8
- package/node_modules/mz/package.json +0 -44
- package/node_modules/mz/readline.js +0 -64
- package/node_modules/mz/zlib.js +0 -13
- package/node_modules/object-assign/index.js +0 -90
- package/node_modules/object-assign/license +0 -21
- package/node_modules/object-assign/package.json +0 -42
- package/node_modules/object-assign/readme.md +0 -61
- package/node_modules/parse5/LICENSE +0 -19
- package/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5/lib/common/doctype.js +0 -162
- package/node_modules/parse5/lib/common/error-codes.js +0 -65
- package/node_modules/parse5/lib/common/foreign-content.js +0 -265
- package/node_modules/parse5/lib/common/html.js +0 -272
- package/node_modules/parse5/lib/common/unicode.js +0 -109
- package/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
- package/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
- package/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
- package/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
- package/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
- package/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -222
- package/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
- package/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
- package/node_modules/parse5/lib/index.js +0 -29
- package/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
- package/node_modules/parse5/lib/parser/index.js +0 -2956
- package/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
- package/node_modules/parse5/lib/serializer/index.js +0 -176
- package/node_modules/parse5/lib/tokenizer/index.js +0 -2196
- package/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
- package/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
- package/node_modules/parse5/lib/tree-adapters/default.js +0 -217
- package/node_modules/parse5/lib/utils/merge-options.js +0 -13
- package/node_modules/parse5/lib/utils/mixin.js +0 -39
- package/node_modules/parse5/package.json +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/LICENSE +0 -19
- package/node_modules/parse5-htmlparser2-tree-adapter/README.md +0 -34
- package/node_modules/parse5-htmlparser2-tree-adapter/lib/index.js +0 -348
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/LICENSE +0 -19
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/README.md +0 -38
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/doctype.js +0 -162
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/error-codes.js +0 -65
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/foreign-content.js +0 -265
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/html.js +0 -272
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/common/unicode.js +0 -109
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +0 -223
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/index.js +0 -29
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/formatting-element-list.js +0 -181
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/index.js +0 -2956
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/parser/open-element-stack.js +0 -482
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/serializer/index.js +0 -176
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/index.js +0 -2196
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/named-entity-data.js +0 -5
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tokenizer/preprocessor.js +0 -159
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/tree-adapters/default.js +0 -221
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/merge-options.js +0 -13
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/lib/utils/mixin.js +0 -39
- package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/package.json +0 -35
- package/node_modules/parse5-htmlparser2-tree-adapter/package.json +0 -27
- package/node_modules/proper-lockfile/CHANGELOG.md +0 -108
- package/node_modules/require-directory/.jshintrc +0 -67
- package/node_modules/require-directory/.npmignore +0 -1
- package/node_modules/require-directory/.travis.yml +0 -3
- package/node_modules/require-directory/LICENSE +0 -22
- package/node_modules/require-directory/README.markdown +0 -184
- package/node_modules/require-directory/index.js +0 -86
- package/node_modules/require-directory/package.json +0 -40
- package/node_modules/source-map/CHANGELOG.md +0 -301
- package/node_modules/string-width/index.d.ts +0 -29
- package/node_modules/string-width/index.js +0 -47
- package/node_modules/string-width/license +0 -9
- package/node_modules/string-width/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/string-width/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/string-width/node_modules/ansi-regex/license +0 -9
- package/node_modules/string-width/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/string-width/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/string-width/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/string-width/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/string-width/node_modules/strip-ansi/license +0 -9
- package/node_modules/string-width/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/string-width/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/string-width/package.json +0 -56
- package/node_modules/string-width/readme.md +0 -50
- package/node_modules/supports-color/browser.js +0 -5
- package/node_modules/supports-color/index.js +0 -135
- package/node_modules/supports-color/license +0 -9
- package/node_modules/supports-color/package.json +0 -53
- package/node_modules/supports-color/readme.md +0 -76
- package/node_modules/thenify/History.md +0 -11
- package/node_modules/thenify/LICENSE +0 -22
- package/node_modules/thenify/README.md +0 -120
- package/node_modules/thenify/index.js +0 -77
- package/node_modules/thenify/package.json +0 -31
- package/node_modules/thenify-all/History.md +0 -11
- package/node_modules/thenify-all/LICENSE +0 -22
- package/node_modules/thenify-all/README.md +0 -66
- package/node_modules/thenify-all/index.js +0 -73
- package/node_modules/thenify-all/package.json +0 -34
- package/node_modules/wrap-ansi/index.js +0 -216
- package/node_modules/wrap-ansi/license +0 -9
- package/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/wrap-ansi/node_modules/ansi-regex/license +0 -9
- package/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/wrap-ansi/node_modules/strip-ansi/license +0 -9
- package/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/wrap-ansi/package.json +0 -62
- package/node_modules/wrap-ansi/readme.md +0 -91
- package/node_modules/y18n/CHANGELOG.md +0 -100
- package/node_modules/y18n/LICENSE +0 -13
- package/node_modules/y18n/README.md +0 -127
- package/node_modules/y18n/build/index.cjs +0 -203
- package/node_modules/y18n/build/lib/cjs.js +0 -6
- package/node_modules/y18n/build/lib/index.js +0 -174
- package/node_modules/y18n/build/lib/platform-shims/node.js +0 -19
- package/node_modules/y18n/index.mjs +0 -8
- package/node_modules/y18n/package.json +0 -70
- package/node_modules/yargs/CHANGELOG.md +0 -88
- package/node_modules/yargs/LICENSE +0 -21
- package/node_modules/yargs/README.md +0 -202
- package/node_modules/yargs/browser.mjs +0 -7
- package/node_modules/yargs/build/index.cjs +0 -2920
- package/node_modules/yargs/build/lib/argsert.js +0 -62
- package/node_modules/yargs/build/lib/command.js +0 -382
- package/node_modules/yargs/build/lib/completion-templates.js +0 -47
- package/node_modules/yargs/build/lib/completion.js +0 -128
- package/node_modules/yargs/build/lib/middleware.js +0 -53
- package/node_modules/yargs/build/lib/parse-command.js +0 -32
- package/node_modules/yargs/build/lib/typings/common-types.js +0 -9
- package/node_modules/yargs/build/lib/typings/yargs-parser-types.js +0 -1
- package/node_modules/yargs/build/lib/usage.js +0 -548
- package/node_modules/yargs/build/lib/utils/apply-extends.js +0 -59
- package/node_modules/yargs/build/lib/utils/is-promise.js +0 -5
- package/node_modules/yargs/build/lib/utils/levenshtein.js +0 -26
- package/node_modules/yargs/build/lib/utils/obj-filter.js +0 -10
- package/node_modules/yargs/build/lib/utils/process-argv.js +0 -17
- package/node_modules/yargs/build/lib/utils/set-blocking.js +0 -12
- package/node_modules/yargs/build/lib/utils/which-module.js +0 -10
- package/node_modules/yargs/build/lib/validation.js +0 -308
- package/node_modules/yargs/build/lib/yargs-factory.js +0 -1143
- package/node_modules/yargs/build/lib/yerror.js +0 -7
- package/node_modules/yargs/helpers/helpers.mjs +0 -10
- package/node_modules/yargs/helpers/index.js +0 -14
- package/node_modules/yargs/helpers/package.json +0 -3
- package/node_modules/yargs/index.cjs +0 -39
- package/node_modules/yargs/index.mjs +0 -8
- package/node_modules/yargs/lib/platform-shims/browser.mjs +0 -92
- package/node_modules/yargs/lib/platform-shims/esm.mjs +0 -67
- package/node_modules/yargs/locales/be.json +0 -46
- package/node_modules/yargs/locales/de.json +0 -46
- package/node_modules/yargs/locales/en.json +0 -51
- package/node_modules/yargs/locales/es.json +0 -46
- package/node_modules/yargs/locales/fi.json +0 -49
- package/node_modules/yargs/locales/fr.json +0 -53
- package/node_modules/yargs/locales/hi.json +0 -49
- package/node_modules/yargs/locales/hu.json +0 -46
- package/node_modules/yargs/locales/id.json +0 -50
- package/node_modules/yargs/locales/it.json +0 -46
- package/node_modules/yargs/locales/ja.json +0 -51
- package/node_modules/yargs/locales/ko.json +0 -49
- package/node_modules/yargs/locales/nb.json +0 -44
- package/node_modules/yargs/locales/nl.json +0 -49
- package/node_modules/yargs/locales/nn.json +0 -44
- package/node_modules/yargs/locales/pirate.json +0 -13
- package/node_modules/yargs/locales/pl.json +0 -49
- package/node_modules/yargs/locales/pt.json +0 -45
- package/node_modules/yargs/locales/pt_BR.json +0 -48
- package/node_modules/yargs/locales/ru.json +0 -46
- package/node_modules/yargs/locales/th.json +0 -46
- package/node_modules/yargs/locales/tr.json +0 -48
- package/node_modules/yargs/locales/zh_CN.json +0 -48
- package/node_modules/yargs/locales/zh_TW.json +0 -47
- package/node_modules/yargs/package.json +0 -122
- package/node_modules/yargs/yargs +0 -9
- package/node_modules/yargs-parser/CHANGELOG.md +0 -263
- package/node_modules/yargs-parser/LICENSE.txt +0 -14
- package/node_modules/yargs-parser/README.md +0 -518
- package/node_modules/yargs-parser/browser.js +0 -29
- package/node_modules/yargs-parser/build/index.cjs +0 -1042
- package/node_modules/yargs-parser/build/lib/index.js +0 -59
- package/node_modules/yargs-parser/build/lib/string-utils.js +0 -65
- package/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +0 -40
- package/node_modules/yargs-parser/build/lib/yargs-parser-types.js +0 -12
- package/node_modules/yargs-parser/build/lib/yargs-parser.js +0 -1037
- package/node_modules/yargs-parser/package.json +0 -87
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hashline edit mode — a line-addressable edit format using content-hash anchors.
|
|
3
|
+
*
|
|
4
|
+
* Each line in a file is identified by its 1-indexed line number and a short
|
|
5
|
+
* hash derived from the normalized line text (xxHash32, truncated to 2 chars
|
|
6
|
+
* from a custom nibble alphabet).
|
|
7
|
+
*
|
|
8
|
+
* The combined `LINE#ID` reference acts as both an address and a staleness check:
|
|
9
|
+
* if the file has changed since the caller last read it, hash mismatches are caught
|
|
10
|
+
* before any mutation occurs.
|
|
11
|
+
*
|
|
12
|
+
* Displayed format: `LINENUM#HASH:TEXT`
|
|
13
|
+
* Reference format: `"LINENUM#HASH"` (e.g. `"5#QQ"`)
|
|
14
|
+
*
|
|
15
|
+
* Adapted from Oh My Pi's hashline implementation for Node.js (no Bun dependency).
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
19
|
+
// xxHash32 — pure JS implementation (no native dependencies)
|
|
20
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
21
|
+
|
|
22
|
+
const PRIME32_1 = 0x9e3779b1;
|
|
23
|
+
const PRIME32_2 = 0x85ebca77;
|
|
24
|
+
const PRIME32_3 = 0xc2b2ae3d;
|
|
25
|
+
const PRIME32_4 = 0x27d4eb2f;
|
|
26
|
+
const PRIME32_5 = 0x165667b1;
|
|
27
|
+
|
|
28
|
+
function rotl32(val: number, bits: number): number {
|
|
29
|
+
return ((val << bits) | (val >>> (32 - bits))) >>> 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function imul32(a: number, b: number): number {
|
|
33
|
+
return Math.imul(a, b) >>> 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Pure JS xxHash32 operating on a UTF-8 encoded string.
|
|
38
|
+
* Matches Bun.hash.xxHash32(str, seed) behavior.
|
|
39
|
+
*/
|
|
40
|
+
function xxHash32(input: string, seed: number): number {
|
|
41
|
+
const buf = Buffer.from(input, "utf-8");
|
|
42
|
+
const len = buf.length;
|
|
43
|
+
let h32: number;
|
|
44
|
+
let i = 0;
|
|
45
|
+
|
|
46
|
+
if (len >= 16) {
|
|
47
|
+
let v1 = (seed + PRIME32_1 + PRIME32_2) >>> 0;
|
|
48
|
+
let v2 = (seed + PRIME32_2) >>> 0;
|
|
49
|
+
let v3 = (seed + 0) >>> 0;
|
|
50
|
+
let v4 = (seed - PRIME32_1) >>> 0;
|
|
51
|
+
|
|
52
|
+
while (i <= len - 16) {
|
|
53
|
+
v1 = (imul32(rotl32((v1 + imul32(buf.readUInt32LE(i), PRIME32_2)) >>> 0, 13), PRIME32_1)) >>> 0;
|
|
54
|
+
i += 4;
|
|
55
|
+
v2 = (imul32(rotl32((v2 + imul32(buf.readUInt32LE(i), PRIME32_2)) >>> 0, 13), PRIME32_1)) >>> 0;
|
|
56
|
+
i += 4;
|
|
57
|
+
v3 = (imul32(rotl32((v3 + imul32(buf.readUInt32LE(i), PRIME32_2)) >>> 0, 13), PRIME32_1)) >>> 0;
|
|
58
|
+
i += 4;
|
|
59
|
+
v4 = (imul32(rotl32((v4 + imul32(buf.readUInt32LE(i), PRIME32_2)) >>> 0, 13), PRIME32_1)) >>> 0;
|
|
60
|
+
i += 4;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
h32 = (rotl32(v1, 1) + rotl32(v2, 7) + rotl32(v3, 12) + rotl32(v4, 18)) >>> 0;
|
|
64
|
+
} else {
|
|
65
|
+
h32 = (seed + PRIME32_5) >>> 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
h32 = (h32 + len) >>> 0;
|
|
69
|
+
|
|
70
|
+
while (i <= len - 4) {
|
|
71
|
+
h32 = (h32 + imul32(buf.readUInt32LE(i), PRIME32_3)) >>> 0;
|
|
72
|
+
h32 = imul32(rotl32(h32, 17), PRIME32_4);
|
|
73
|
+
i += 4;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
while (i < len) {
|
|
77
|
+
h32 = (h32 + imul32(buf[i], PRIME32_5)) >>> 0;
|
|
78
|
+
h32 = imul32(rotl32(h32, 11), PRIME32_1);
|
|
79
|
+
i += 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
h32 = imul32(h32 ^ (h32 >>> 15), PRIME32_2);
|
|
83
|
+
h32 = imul32(h32 ^ (h32 >>> 13), PRIME32_3);
|
|
84
|
+
h32 = (h32 ^ (h32 >>> 16)) >>> 0;
|
|
85
|
+
|
|
86
|
+
return h32;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
90
|
+
// Hash Computation
|
|
91
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
92
|
+
|
|
93
|
+
export type Anchor = { line: number; hash: string };
|
|
94
|
+
export type HashlineEdit =
|
|
95
|
+
| { op: "replace"; pos: Anchor; end?: Anchor; lines: string[] }
|
|
96
|
+
| { op: "append"; pos?: Anchor; lines: string[] }
|
|
97
|
+
| { op: "prepend"; pos?: Anchor; lines: string[] };
|
|
98
|
+
|
|
99
|
+
const NIBBLE_STR = "ZPMQVRWSNKTXJBYH";
|
|
100
|
+
|
|
101
|
+
const DICT = Array.from({ length: 256 }, (_, i) => {
|
|
102
|
+
const h = i >>> 4;
|
|
103
|
+
const l = i & 0x0f;
|
|
104
|
+
return `${NIBBLE_STR[h]}${NIBBLE_STR[l]}`;
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const RE_SIGNIFICANT = /[\p{L}\p{N}]/u;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Compute a short hash of a single line.
|
|
111
|
+
*
|
|
112
|
+
* Uses xxHash32 on a trailing-whitespace-trimmed, CR-stripped line, truncated to 2 chars
|
|
113
|
+
* from the nibble alphabet. For lines containing no alphanumeric characters (only
|
|
114
|
+
* punctuation/symbols/whitespace), the line number is mixed in to reduce hash collisions.
|
|
115
|
+
*/
|
|
116
|
+
export function computeLineHash(idx: number, line: string): string {
|
|
117
|
+
line = line.replace(/\r/g, "").trimEnd();
|
|
118
|
+
|
|
119
|
+
let seed = 0;
|
|
120
|
+
if (!RE_SIGNIFICANT.test(line)) {
|
|
121
|
+
seed = idx;
|
|
122
|
+
}
|
|
123
|
+
return DICT[xxHash32(line, seed) & 0xff];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Formats a tag given the line number and text.
|
|
128
|
+
*/
|
|
129
|
+
export function formatLineTag(line: number, text: string): string {
|
|
130
|
+
return `${line}#${computeLineHash(line, text)}`;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Format file text with hashline prefixes for display.
|
|
135
|
+
*
|
|
136
|
+
* Each line becomes `LINENUM#HASH:TEXT` where LINENUM is 1-indexed.
|
|
137
|
+
*/
|
|
138
|
+
export function formatHashLines(text: string, startLine = 1): string {
|
|
139
|
+
const lines = text.split("\n");
|
|
140
|
+
return lines
|
|
141
|
+
.map((line, i) => {
|
|
142
|
+
const num = startLine + i;
|
|
143
|
+
return `${formatLineTag(num, line)}:${line}`;
|
|
144
|
+
})
|
|
145
|
+
.join("\n");
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Parse a line reference string like `"5#QQ"` into structured form.
|
|
150
|
+
*
|
|
151
|
+
* @throws Error if the format is invalid
|
|
152
|
+
*/
|
|
153
|
+
export function parseTag(ref: string): Anchor {
|
|
154
|
+
const match = ref.match(/^\s*[>+-]*\s*(\d+)\s*#\s*([ZPMQVRWSNKTXJBYH]{2})/);
|
|
155
|
+
if (!match) {
|
|
156
|
+
throw new Error(`Invalid line reference "${ref}". Expected format "LINE#ID" (e.g. "5#QQ").`);
|
|
157
|
+
}
|
|
158
|
+
const line = Number.parseInt(match[1], 10);
|
|
159
|
+
if (line < 1) {
|
|
160
|
+
throw new Error(`Line number must be >= 1, got ${line} in "${ref}".`);
|
|
161
|
+
}
|
|
162
|
+
return { line, hash: match[2] };
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
166
|
+
// Hash Mismatch Error
|
|
167
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
168
|
+
|
|
169
|
+
export interface HashMismatch {
|
|
170
|
+
line: number;
|
|
171
|
+
expected: string;
|
|
172
|
+
actual: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const MISMATCH_CONTEXT = 2;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Error thrown when one or more hashline references have stale hashes.
|
|
179
|
+
* Displays grep-style output with `>>>` markers on mismatched lines,
|
|
180
|
+
* showing the correct `LINE#ID` so the caller can fix all refs at once.
|
|
181
|
+
*/
|
|
182
|
+
export class HashlineMismatchError extends Error {
|
|
183
|
+
readonly mismatches: HashMismatch[];
|
|
184
|
+
readonly fileLines: string[];
|
|
185
|
+
readonly remaps: ReadonlyMap<string, string>;
|
|
186
|
+
constructor(
|
|
187
|
+
mismatches: HashMismatch[],
|
|
188
|
+
fileLines: string[],
|
|
189
|
+
) {
|
|
190
|
+
super(HashlineMismatchError.formatMessage(mismatches, fileLines));
|
|
191
|
+
this.name = "HashlineMismatchError";
|
|
192
|
+
this.mismatches = mismatches;
|
|
193
|
+
this.fileLines = fileLines;
|
|
194
|
+
const remaps = new Map<string, string>();
|
|
195
|
+
for (const m of mismatches) {
|
|
196
|
+
const actual = computeLineHash(m.line, fileLines[m.line - 1]);
|
|
197
|
+
remaps.set(`${m.line}#${m.expected}`, `${m.line}#${actual}`);
|
|
198
|
+
}
|
|
199
|
+
this.remaps = remaps;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
static formatMessage(mismatches: HashMismatch[], fileLines: string[]): string {
|
|
203
|
+
const mismatchSet = new Map<number, HashMismatch>();
|
|
204
|
+
for (const m of mismatches) {
|
|
205
|
+
mismatchSet.set(m.line, m);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const displayLines = new Set<number>();
|
|
209
|
+
for (const m of mismatches) {
|
|
210
|
+
const lo = Math.max(1, m.line - MISMATCH_CONTEXT);
|
|
211
|
+
const hi = Math.min(fileLines.length, m.line + MISMATCH_CONTEXT);
|
|
212
|
+
for (let i = lo; i <= hi; i++) {
|
|
213
|
+
displayLines.add(i);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const sorted = [...displayLines].sort((a, b) => a - b);
|
|
218
|
+
const lines: string[] = [];
|
|
219
|
+
|
|
220
|
+
lines.push(
|
|
221
|
+
`${mismatches.length} line${mismatches.length > 1 ? "s have" : " has"} changed since last read. Use the updated LINE#ID references shown below (>>> marks changed lines).`,
|
|
222
|
+
);
|
|
223
|
+
lines.push("");
|
|
224
|
+
|
|
225
|
+
let prevLine = -1;
|
|
226
|
+
for (const lineNum of sorted) {
|
|
227
|
+
if (prevLine !== -1 && lineNum > prevLine + 1) {
|
|
228
|
+
lines.push(" ...");
|
|
229
|
+
}
|
|
230
|
+
prevLine = lineNum;
|
|
231
|
+
|
|
232
|
+
const text = fileLines[lineNum - 1];
|
|
233
|
+
const hash = computeLineHash(lineNum, text);
|
|
234
|
+
const prefix = `${lineNum}#${hash}`;
|
|
235
|
+
|
|
236
|
+
if (mismatchSet.has(lineNum)) {
|
|
237
|
+
lines.push(`>>> ${prefix}:${text}`);
|
|
238
|
+
} else {
|
|
239
|
+
lines.push(` ${prefix}:${text}`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return lines.join("\n");
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Validate that a line reference points to an existing line with a matching hash.
|
|
248
|
+
*/
|
|
249
|
+
export function validateLineRef(ref: Anchor, fileLines: string[]): void {
|
|
250
|
+
if (ref.line < 1 || ref.line > fileLines.length) {
|
|
251
|
+
throw new Error(`Line ${ref.line} does not exist (file has ${fileLines.length} lines)`);
|
|
252
|
+
}
|
|
253
|
+
const actualHash = computeLineHash(ref.line, fileLines[ref.line - 1]);
|
|
254
|
+
if (actualHash !== ref.hash) {
|
|
255
|
+
throw new HashlineMismatchError([{ line: ref.line, expected: ref.hash, actual: actualHash }], fileLines);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
260
|
+
// Prefix Stripping
|
|
261
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
262
|
+
|
|
263
|
+
/** Pattern matching hashline display format prefixes: `LINE#ID:CONTENT` and `#ID:CONTENT` */
|
|
264
|
+
const HASHLINE_PREFIX_RE = /^\s*(?:>>>|>>)?\s*(?:\d+\s*#\s*|#\s*)[ZPMQVRWSNKTXJBYH]{2}:/;
|
|
265
|
+
|
|
266
|
+
/** Pattern matching a unified-diff added-line `+` prefix (but not `++`). */
|
|
267
|
+
const DIFF_PLUS_RE = /^[+](?![+])/;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Strip hashline display prefixes and diff `+` markers from replacement lines.
|
|
271
|
+
*
|
|
272
|
+
* Models frequently copy the `LINE#ID` prefix from read output into their
|
|
273
|
+
* replacement content. This strips them heuristically before application.
|
|
274
|
+
*/
|
|
275
|
+
export function stripNewLinePrefixes(lines: string[]): string[] {
|
|
276
|
+
let hashPrefixCount = 0;
|
|
277
|
+
let diffPlusCount = 0;
|
|
278
|
+
let nonEmpty = 0;
|
|
279
|
+
for (const l of lines) {
|
|
280
|
+
if (l.length === 0) continue;
|
|
281
|
+
nonEmpty++;
|
|
282
|
+
if (HASHLINE_PREFIX_RE.test(l)) hashPrefixCount++;
|
|
283
|
+
if (DIFF_PLUS_RE.test(l)) diffPlusCount++;
|
|
284
|
+
}
|
|
285
|
+
if (nonEmpty === 0) return lines;
|
|
286
|
+
|
|
287
|
+
const stripHash = hashPrefixCount > 0 && hashPrefixCount === nonEmpty;
|
|
288
|
+
const stripPlus = !stripHash && diffPlusCount > 0 && diffPlusCount >= nonEmpty * 0.5;
|
|
289
|
+
if (!stripHash && !stripPlus) return lines;
|
|
290
|
+
|
|
291
|
+
return lines.map(l => {
|
|
292
|
+
if (stripHash) return l.replace(HASHLINE_PREFIX_RE, "");
|
|
293
|
+
if (stripPlus) return l.replace(DIFF_PLUS_RE, "");
|
|
294
|
+
return l;
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Parse edit content — handles string, array, or null input.
|
|
300
|
+
* Strips hashline prefixes and diff markers from model output.
|
|
301
|
+
*/
|
|
302
|
+
export function hashlineParseText(edit: string[] | string | null): string[] {
|
|
303
|
+
if (edit === null) return [];
|
|
304
|
+
if (typeof edit === "string") {
|
|
305
|
+
const normalizedEdit = edit.endsWith("\n") ? edit.slice(0, -1) : edit;
|
|
306
|
+
edit = normalizedEdit.replaceAll("\r", "").split("\n");
|
|
307
|
+
}
|
|
308
|
+
return stripNewLinePrefixes(edit);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
312
|
+
// Auto-correction Heuristics
|
|
313
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
314
|
+
|
|
315
|
+
function maybeAutocorrectEscapedTabIndentation(edits: HashlineEdit[], warnings: string[]): void {
|
|
316
|
+
for (const edit of edits) {
|
|
317
|
+
if (edit.lines.length === 0) continue;
|
|
318
|
+
const hasEscapedTabs = edit.lines.some(line => line.includes("\\t"));
|
|
319
|
+
if (!hasEscapedTabs) continue;
|
|
320
|
+
const hasRealTabs = edit.lines.some(line => line.includes("\t"));
|
|
321
|
+
if (hasRealTabs) continue;
|
|
322
|
+
let correctedCount = 0;
|
|
323
|
+
const corrected = edit.lines.map(line =>
|
|
324
|
+
line.replace(/^((?:\\t)+)/, escaped => {
|
|
325
|
+
correctedCount += escaped.length / 2;
|
|
326
|
+
return "\t".repeat(escaped.length / 2);
|
|
327
|
+
}),
|
|
328
|
+
);
|
|
329
|
+
if (correctedCount === 0) continue;
|
|
330
|
+
edit.lines = corrected;
|
|
331
|
+
warnings.push(
|
|
332
|
+
`Auto-corrected escaped tab indentation in edit: converted leading \\t sequence(s) to real tab characters`,
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const MIN_AUTOCORRECT_LENGTH = 2;
|
|
338
|
+
|
|
339
|
+
function shouldAutocorrect(line: string, otherLine: string): boolean {
|
|
340
|
+
if (!line || line !== otherLine) return false;
|
|
341
|
+
line = line.trim();
|
|
342
|
+
if (line.length < MIN_AUTOCORRECT_LENGTH) {
|
|
343
|
+
return line.endsWith("}") || line.endsWith(")");
|
|
344
|
+
}
|
|
345
|
+
return true;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
349
|
+
// Edit Application
|
|
350
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Apply an array of hashline edits to file content.
|
|
354
|
+
*
|
|
355
|
+
* Each edit operation identifies target lines directly (`replace`,
|
|
356
|
+
* `append`, `prepend`). Line references are resolved via parseTag
|
|
357
|
+
* and hashes validated before any mutation.
|
|
358
|
+
*
|
|
359
|
+
* Edits are sorted bottom-up (highest effective line first) so earlier
|
|
360
|
+
* splices don't invalidate later line numbers.
|
|
361
|
+
*
|
|
362
|
+
* @returns The modified content and the 1-indexed first changed line number
|
|
363
|
+
*/
|
|
364
|
+
export function applyHashlineEdits(
|
|
365
|
+
text: string,
|
|
366
|
+
edits: HashlineEdit[],
|
|
367
|
+
): {
|
|
368
|
+
lines: string;
|
|
369
|
+
firstChangedLine: number | undefined;
|
|
370
|
+
warnings?: string[];
|
|
371
|
+
noopEdits?: Array<{ editIndex: number; loc: string; current: string }>;
|
|
372
|
+
} {
|
|
373
|
+
if (edits.length === 0) {
|
|
374
|
+
return { lines: text, firstChangedLine: undefined };
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const fileLines = text.split("\n");
|
|
378
|
+
const originalFileLines = [...fileLines];
|
|
379
|
+
let firstChangedLine: number | undefined;
|
|
380
|
+
const noopEdits: Array<{ editIndex: number; loc: string; current: string }> = [];
|
|
381
|
+
const warnings: string[] = [];
|
|
382
|
+
|
|
383
|
+
// Pre-validate: collect all hash mismatches before mutating
|
|
384
|
+
const mismatches: HashMismatch[] = [];
|
|
385
|
+
function validateRef(ref: Anchor): boolean {
|
|
386
|
+
if (ref.line < 1 || ref.line > fileLines.length) {
|
|
387
|
+
throw new Error(`Line ${ref.line} does not exist (file has ${fileLines.length} lines)`);
|
|
388
|
+
}
|
|
389
|
+
const actualHash = computeLineHash(ref.line, fileLines[ref.line - 1]);
|
|
390
|
+
if (actualHash === ref.hash) {
|
|
391
|
+
return true;
|
|
392
|
+
}
|
|
393
|
+
mismatches.push({ line: ref.line, expected: ref.hash, actual: actualHash });
|
|
394
|
+
return false;
|
|
395
|
+
}
|
|
396
|
+
for (const edit of edits) {
|
|
397
|
+
switch (edit.op) {
|
|
398
|
+
case "replace": {
|
|
399
|
+
if (edit.end) {
|
|
400
|
+
const startValid = validateRef(edit.pos);
|
|
401
|
+
const endValid = validateRef(edit.end);
|
|
402
|
+
if (!startValid || !endValid) continue;
|
|
403
|
+
if (edit.pos.line > edit.end.line) {
|
|
404
|
+
throw new Error(`Range start line ${edit.pos.line} must be <= end line ${edit.end.line}`);
|
|
405
|
+
}
|
|
406
|
+
} else {
|
|
407
|
+
if (!validateRef(edit.pos)) continue;
|
|
408
|
+
}
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
case "append": {
|
|
412
|
+
if (edit.pos && !validateRef(edit.pos)) continue;
|
|
413
|
+
if (edit.lines.length === 0) {
|
|
414
|
+
edit.lines = [""];
|
|
415
|
+
}
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
case "prepend": {
|
|
419
|
+
if (edit.pos && !validateRef(edit.pos)) continue;
|
|
420
|
+
if (edit.lines.length === 0) {
|
|
421
|
+
edit.lines = [""];
|
|
422
|
+
}
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
if (mismatches.length > 0) {
|
|
428
|
+
throw new HashlineMismatchError(mismatches, fileLines);
|
|
429
|
+
}
|
|
430
|
+
maybeAutocorrectEscapedTabIndentation(edits, warnings);
|
|
431
|
+
|
|
432
|
+
// Deduplicate identical edits targeting the same line(s)
|
|
433
|
+
const seenEditKeys = new Map<string, number>();
|
|
434
|
+
const dedupIndices = new Set<number>();
|
|
435
|
+
for (let i = 0; i < edits.length; i++) {
|
|
436
|
+
const edit = edits[i];
|
|
437
|
+
let lineKey: string;
|
|
438
|
+
switch (edit.op) {
|
|
439
|
+
case "replace":
|
|
440
|
+
lineKey = edit.end ? `r:${edit.pos.line}:${edit.end.line}` : `s:${edit.pos.line}`;
|
|
441
|
+
break;
|
|
442
|
+
case "append":
|
|
443
|
+
lineKey = edit.pos ? `i:${edit.pos.line}` : "ieof";
|
|
444
|
+
break;
|
|
445
|
+
case "prepend":
|
|
446
|
+
lineKey = edit.pos ? `ib:${edit.pos.line}` : "ibef";
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
const dstKey = `${lineKey}:${edit.lines.join("\n")}`;
|
|
450
|
+
if (seenEditKeys.has(dstKey)) {
|
|
451
|
+
dedupIndices.add(i);
|
|
452
|
+
} else {
|
|
453
|
+
seenEditKeys.set(dstKey, i);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
if (dedupIndices.size > 0) {
|
|
457
|
+
for (let i = edits.length - 1; i >= 0; i--) {
|
|
458
|
+
if (dedupIndices.has(i)) edits.splice(i, 1);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// Compute sort key (descending) — bottom-up application
|
|
463
|
+
const annotated = edits.map((edit, idx) => {
|
|
464
|
+
let sortLine: number;
|
|
465
|
+
let precedence: number;
|
|
466
|
+
switch (edit.op) {
|
|
467
|
+
case "replace":
|
|
468
|
+
sortLine = edit.end ? edit.end.line : edit.pos.line;
|
|
469
|
+
precedence = 0;
|
|
470
|
+
break;
|
|
471
|
+
case "append":
|
|
472
|
+
sortLine = edit.pos ? edit.pos.line : fileLines.length + 1;
|
|
473
|
+
precedence = 1;
|
|
474
|
+
break;
|
|
475
|
+
case "prepend":
|
|
476
|
+
sortLine = edit.pos ? edit.pos.line : 0;
|
|
477
|
+
precedence = 2;
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
return { edit, idx, sortLine, precedence };
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
annotated.sort((a, b) => b.sortLine - a.sortLine || a.precedence - b.precedence || a.idx - b.idx);
|
|
484
|
+
|
|
485
|
+
function trackFirstChanged(line: number): void {
|
|
486
|
+
if (firstChangedLine === undefined || line < firstChangedLine) {
|
|
487
|
+
firstChangedLine = line;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// Apply edits bottom-up
|
|
492
|
+
for (const { edit, idx } of annotated) {
|
|
493
|
+
switch (edit.op) {
|
|
494
|
+
case "replace": {
|
|
495
|
+
if (!edit.end) {
|
|
496
|
+
const origLines = originalFileLines.slice(edit.pos.line - 1, edit.pos.line);
|
|
497
|
+
const newLines = edit.lines;
|
|
498
|
+
if (origLines.length === newLines.length && origLines.every((line, i) => line === newLines[i])) {
|
|
499
|
+
noopEdits.push({
|
|
500
|
+
editIndex: idx,
|
|
501
|
+
loc: `${edit.pos.line}#${edit.pos.hash}`,
|
|
502
|
+
current: origLines.join("\n"),
|
|
503
|
+
});
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
fileLines.splice(edit.pos.line - 1, 1, ...newLines);
|
|
507
|
+
trackFirstChanged(edit.pos.line);
|
|
508
|
+
} else {
|
|
509
|
+
const count = edit.end.line - edit.pos.line + 1;
|
|
510
|
+
const newLines = [...edit.lines];
|
|
511
|
+
const trailingReplacementLine = newLines[newLines.length - 1]?.trimEnd();
|
|
512
|
+
const nextSurvivingLine = fileLines[edit.end.line]?.trimEnd();
|
|
513
|
+
if (
|
|
514
|
+
shouldAutocorrect(trailingReplacementLine, nextSurvivingLine) &&
|
|
515
|
+
fileLines[edit.end.line - 1]?.trimEnd() !== trailingReplacementLine
|
|
516
|
+
) {
|
|
517
|
+
newLines.pop();
|
|
518
|
+
warnings.push(
|
|
519
|
+
`Auto-corrected range replace ${edit.pos.line}#${edit.pos.hash}-${edit.end.line}#${edit.end.hash}: removed trailing replacement line "${trailingReplacementLine}" that duplicated next surviving line`,
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
const leadingReplacementLine = newLines[0]?.trimEnd();
|
|
523
|
+
const prevSurvivingLine = fileLines[edit.pos.line - 2]?.trimEnd();
|
|
524
|
+
if (
|
|
525
|
+
shouldAutocorrect(leadingReplacementLine, prevSurvivingLine) &&
|
|
526
|
+
fileLines[edit.pos.line - 1]?.trimEnd() !== leadingReplacementLine
|
|
527
|
+
) {
|
|
528
|
+
newLines.shift();
|
|
529
|
+
warnings.push(
|
|
530
|
+
`Auto-corrected range replace ${edit.pos.line}#${edit.pos.hash}-${edit.end.line}#${edit.end.hash}: removed leading replacement line "${leadingReplacementLine}" that duplicated preceding surviving line`,
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
fileLines.splice(edit.pos.line - 1, count, ...newLines);
|
|
534
|
+
trackFirstChanged(edit.pos.line);
|
|
535
|
+
}
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
case "append": {
|
|
539
|
+
const inserted = edit.lines;
|
|
540
|
+
if (inserted.length === 0) {
|
|
541
|
+
noopEdits.push({
|
|
542
|
+
editIndex: idx,
|
|
543
|
+
loc: edit.pos ? `${edit.pos.line}#${edit.pos.hash}` : "EOF",
|
|
544
|
+
current: edit.pos ? originalFileLines[edit.pos.line - 1] : "",
|
|
545
|
+
});
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
if (edit.pos) {
|
|
549
|
+
fileLines.splice(edit.pos.line, 0, ...inserted);
|
|
550
|
+
trackFirstChanged(edit.pos.line + 1);
|
|
551
|
+
} else {
|
|
552
|
+
if (fileLines.length === 1 && fileLines[0] === "") {
|
|
553
|
+
fileLines.splice(0, 1, ...inserted);
|
|
554
|
+
trackFirstChanged(1);
|
|
555
|
+
} else {
|
|
556
|
+
fileLines.splice(fileLines.length, 0, ...inserted);
|
|
557
|
+
trackFirstChanged(fileLines.length - inserted.length + 1);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
break;
|
|
561
|
+
}
|
|
562
|
+
case "prepend": {
|
|
563
|
+
const inserted = edit.lines;
|
|
564
|
+
if (inserted.length === 0) {
|
|
565
|
+
noopEdits.push({
|
|
566
|
+
editIndex: idx,
|
|
567
|
+
loc: edit.pos ? `${edit.pos.line}#${edit.pos.hash}` : "BOF",
|
|
568
|
+
current: edit.pos ? originalFileLines[edit.pos.line - 1] : "",
|
|
569
|
+
});
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
if (edit.pos) {
|
|
573
|
+
fileLines.splice(edit.pos.line - 1, 0, ...inserted);
|
|
574
|
+
trackFirstChanged(edit.pos.line);
|
|
575
|
+
} else {
|
|
576
|
+
if (fileLines.length === 1 && fileLines[0] === "") {
|
|
577
|
+
fileLines.splice(0, 1, ...inserted);
|
|
578
|
+
} else {
|
|
579
|
+
fileLines.splice(0, 0, ...inserted);
|
|
580
|
+
}
|
|
581
|
+
trackFirstChanged(1);
|
|
582
|
+
}
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
return {
|
|
589
|
+
lines: fileLines.join("\n"),
|
|
590
|
+
firstChangedLine,
|
|
591
|
+
...(warnings.length > 0 ? { warnings } : {}),
|
|
592
|
+
...(noopEdits.length > 0 ? { noopEdits } : {}),
|
|
593
|
+
};
|
|
594
|
+
}
|
|
@@ -65,15 +65,56 @@ export {
|
|
|
65
65
|
type WriteToolOptions,
|
|
66
66
|
writeTool,
|
|
67
67
|
} from "./write.js";
|
|
68
|
+
export {
|
|
69
|
+
createHashlineEditTool,
|
|
70
|
+
type HashlineEditInput,
|
|
71
|
+
type HashlineEditItem,
|
|
72
|
+
type HashlineEditOperations,
|
|
73
|
+
type HashlineEditToolDetails,
|
|
74
|
+
type HashlineEditToolOptions,
|
|
75
|
+
hashlineEditTool,
|
|
76
|
+
} from "./hashline-edit.js";
|
|
77
|
+
export {
|
|
78
|
+
createHashlineReadTool,
|
|
79
|
+
type HashlineReadOperations,
|
|
80
|
+
type HashlineReadToolDetails,
|
|
81
|
+
type HashlineReadToolInput,
|
|
82
|
+
type HashlineReadToolOptions,
|
|
83
|
+
hashlineReadTool,
|
|
84
|
+
} from "./hashline-read.js";
|
|
85
|
+
export {
|
|
86
|
+
type Anchor,
|
|
87
|
+
applyHashlineEdits,
|
|
88
|
+
computeLineHash,
|
|
89
|
+
formatHashLines,
|
|
90
|
+
formatLineTag,
|
|
91
|
+
type HashlineEdit,
|
|
92
|
+
HashlineMismatchError,
|
|
93
|
+
hashlineParseText,
|
|
94
|
+
type HashMismatch,
|
|
95
|
+
parseTag,
|
|
96
|
+
stripNewLinePrefixes,
|
|
97
|
+
validateLineRef,
|
|
98
|
+
} from "./hashline.js";
|
|
99
|
+
export {
|
|
100
|
+
createLspTool,
|
|
101
|
+
type LspToolDetails,
|
|
102
|
+
lspSchema,
|
|
103
|
+
lspTool,
|
|
104
|
+
} from "../lsp/index.js";
|
|
105
|
+
export type { LspServerStatus } from "../lsp/client.js";
|
|
68
106
|
|
|
69
107
|
import type { AgentTool } from "@gsd/pi-agent-core";
|
|
70
108
|
import { type BashToolOptions, bashTool, createBashTool } from "./bash.js";
|
|
71
109
|
import { createEditTool, editTool } from "./edit.js";
|
|
72
110
|
import { createFindTool, findTool } from "./find.js";
|
|
73
111
|
import { createGrepTool, grepTool } from "./grep.js";
|
|
112
|
+
import { createHashlineEditTool, hashlineEditTool } from "./hashline-edit.js";
|
|
113
|
+
import { createHashlineReadTool, hashlineReadTool } from "./hashline-read.js";
|
|
74
114
|
import { createLsTool, lsTool } from "./ls.js";
|
|
75
115
|
import { createReadTool, type ReadToolOptions, readTool } from "./read.js";
|
|
76
116
|
import { createWriteTool, writeTool } from "./write.js";
|
|
117
|
+
import { createLspTool, lspTool } from "../lsp/index.js";
|
|
77
118
|
|
|
78
119
|
/** Tool type (AgentTool from pi-ai) */
|
|
79
120
|
export type Tool = AgentTool<any>;
|
|
@@ -93,8 +134,14 @@ export const allTools = {
|
|
|
93
134
|
grep: grepTool,
|
|
94
135
|
find: findTool,
|
|
95
136
|
ls: lsTool,
|
|
137
|
+
lsp: lspTool,
|
|
138
|
+
hashline_edit: hashlineEditTool,
|
|
139
|
+
hashline_read: hashlineReadTool,
|
|
96
140
|
};
|
|
97
141
|
|
|
142
|
+
// Hashline-mode coding tools — read with hash anchors, edit with hash references
|
|
143
|
+
export const hashlineCodingTools: Tool[] = [hashlineReadTool, bashTool, hashlineEditTool, writeTool];
|
|
144
|
+
|
|
98
145
|
export type ToolName = keyof typeof allTools;
|
|
99
146
|
|
|
100
147
|
export interface ToolsOptions {
|
|
@@ -135,5 +182,21 @@ export function createAllTools(cwd: string, options?: ToolsOptions): Record<Tool
|
|
|
135
182
|
grep: createGrepTool(cwd),
|
|
136
183
|
find: createFindTool(cwd),
|
|
137
184
|
ls: createLsTool(cwd),
|
|
185
|
+
lsp: createLspTool(cwd),
|
|
186
|
+
hashline_edit: createHashlineEditTool(cwd),
|
|
187
|
+
hashline_read: createHashlineReadTool(cwd, options?.read),
|
|
138
188
|
};
|
|
139
189
|
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Create hashline-mode coding tools configured for a specific working directory.
|
|
193
|
+
* Uses hashline read (LINE#ID prefixed output) and hashline edit (hash-anchor based edits).
|
|
194
|
+
*/
|
|
195
|
+
export function createHashlineCodingTools(cwd: string, options?: ToolsOptions): Tool[] {
|
|
196
|
+
return [
|
|
197
|
+
createHashlineReadTool(cwd, options?.read),
|
|
198
|
+
createBashTool(cwd, options?.bash),
|
|
199
|
+
createHashlineEditTool(cwd),
|
|
200
|
+
createWriteTool(cwd),
|
|
201
|
+
];
|
|
202
|
+
}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import { getSelectListTheme, getSettingsListTheme, theme } from "../theme/theme.js";
|
|
14
14
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
15
15
|
|
|
16
|
-
const THINKING_DESCRIPTIONS: Record<ThinkingLevel, string> = {
|
|
16
|
+
export const THINKING_DESCRIPTIONS: Record<ThinkingLevel, string> = {
|
|
17
17
|
off: "No reasoning",
|
|
18
18
|
minimal: "Very brief reasoning (~1k tokens)",
|
|
19
19
|
low: "Light reasoning (~2k tokens)",
|
|
@@ -73,7 +73,7 @@ export interface SettingsCallbacks {
|
|
|
73
73
|
/**
|
|
74
74
|
* A submenu component for selecting from a list of options.
|
|
75
75
|
*/
|
|
76
|
-
class SelectSubmenu extends Container {
|
|
76
|
+
export class SelectSubmenu extends Container {
|
|
77
77
|
private selectList: SelectList;
|
|
78
78
|
|
|
79
79
|
constructor(
|