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,943 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as fsSync from "node:fs";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
import { spawn } from "node:child_process";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import type { AgentTool, AgentToolResult, AgentToolUpdateCallback } from "@gsd/pi-agent-core";
|
|
7
|
+
import {
|
|
8
|
+
ensureFileOpen,
|
|
9
|
+
getActiveClients,
|
|
10
|
+
getOrCreateClient,
|
|
11
|
+
type LspServerStatus,
|
|
12
|
+
refreshFile,
|
|
13
|
+
sendRequest,
|
|
14
|
+
setIdleTimeout,
|
|
15
|
+
WARMUP_TIMEOUT_MS,
|
|
16
|
+
} from "./client.js";
|
|
17
|
+
import { getServersForFile, type LspConfig, loadConfig } from "./config.js";
|
|
18
|
+
import { applyWorkspaceEdit } from "./edits.js";
|
|
19
|
+
import { ToolAbortError, clampTimeout, throwIfAborted } from "./helpers.js";
|
|
20
|
+
import { detectLspmux } from "./lspmux.js";
|
|
21
|
+
import {
|
|
22
|
+
type CodeAction,
|
|
23
|
+
type CodeActionContext,
|
|
24
|
+
type Command,
|
|
25
|
+
type Diagnostic,
|
|
26
|
+
type DocumentSymbol,
|
|
27
|
+
type Hover,
|
|
28
|
+
type Location,
|
|
29
|
+
type LocationLink,
|
|
30
|
+
type LspClient,
|
|
31
|
+
type LspParams,
|
|
32
|
+
type LspToolDetails,
|
|
33
|
+
lspSchema,
|
|
34
|
+
type ServerConfig,
|
|
35
|
+
type SymbolInformation,
|
|
36
|
+
type WorkspaceEdit,
|
|
37
|
+
} from "./types.js";
|
|
38
|
+
import {
|
|
39
|
+
applyCodeAction,
|
|
40
|
+
collectGlobMatches,
|
|
41
|
+
dedupeWorkspaceSymbols,
|
|
42
|
+
extractHoverText,
|
|
43
|
+
fileToUri,
|
|
44
|
+
filterWorkspaceSymbols,
|
|
45
|
+
formatCodeAction,
|
|
46
|
+
formatDiagnostic,
|
|
47
|
+
formatDiagnosticsSummary,
|
|
48
|
+
formatDocumentSymbol,
|
|
49
|
+
formatGroupedDiagnosticMessages,
|
|
50
|
+
formatLocation,
|
|
51
|
+
formatSymbolInformation,
|
|
52
|
+
formatWorkspaceEdit,
|
|
53
|
+
hasGlobPattern,
|
|
54
|
+
readLocationContext,
|
|
55
|
+
resolveSymbolColumn,
|
|
56
|
+
sortDiagnostics,
|
|
57
|
+
symbolKindToIcon,
|
|
58
|
+
uriToFile,
|
|
59
|
+
} from "./utils.js";
|
|
60
|
+
|
|
61
|
+
export type { LspServerStatus } from "./client.js";
|
|
62
|
+
export type { LspToolDetails } from "./types.js";
|
|
63
|
+
export { lspSchema } from "./types.js";
|
|
64
|
+
|
|
65
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
66
|
+
const lspDescription = fsSync.readFileSync(path.join(__dirname, "lsp.md"), "utf-8");
|
|
67
|
+
|
|
68
|
+
// =============================================================================
|
|
69
|
+
// Warmup API
|
|
70
|
+
// =============================================================================
|
|
71
|
+
|
|
72
|
+
export interface LspWarmupResult {
|
|
73
|
+
servers: Array<{
|
|
74
|
+
name: string;
|
|
75
|
+
status: "ready" | "error";
|
|
76
|
+
fileTypes: string[];
|
|
77
|
+
error?: string;
|
|
78
|
+
}>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export async function warmupLspServers(cwd: string): Promise<LspWarmupResult> {
|
|
82
|
+
const config = loadConfig(cwd);
|
|
83
|
+
setIdleTimeout(config.idleTimeoutMs);
|
|
84
|
+
const servers: LspWarmupResult["servers"] = [];
|
|
85
|
+
const lspServers = getLspServers(config);
|
|
86
|
+
|
|
87
|
+
const results = await Promise.allSettled(
|
|
88
|
+
lspServers.map(async ([name, serverConfig]) => {
|
|
89
|
+
const client = await getOrCreateClient(serverConfig, cwd, serverConfig.warmupTimeoutMs ?? WARMUP_TIMEOUT_MS);
|
|
90
|
+
return { name, client, fileTypes: serverConfig.fileTypes };
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
for (let i = 0; i < results.length; i++) {
|
|
95
|
+
const result = results[i];
|
|
96
|
+
const [name, serverConfig] = lspServers[i];
|
|
97
|
+
if (result.status === "fulfilled") {
|
|
98
|
+
servers.push({
|
|
99
|
+
name: result.value.name,
|
|
100
|
+
status: "ready",
|
|
101
|
+
fileTypes: result.value.fileTypes,
|
|
102
|
+
});
|
|
103
|
+
} else {
|
|
104
|
+
servers.push({
|
|
105
|
+
name,
|
|
106
|
+
status: "error",
|
|
107
|
+
fileTypes: serverConfig.fileTypes,
|
|
108
|
+
error: result.reason?.message ?? String(result.reason),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return { servers };
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function getLspStatus(): LspServerStatus[] {
|
|
117
|
+
return getActiveClients();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// =============================================================================
|
|
121
|
+
// Internal Helpers
|
|
122
|
+
// =============================================================================
|
|
123
|
+
|
|
124
|
+
const configCache = new Map<string, LspConfig>();
|
|
125
|
+
|
|
126
|
+
function getConfig(cwd: string): LspConfig {
|
|
127
|
+
let config = configCache.get(cwd);
|
|
128
|
+
if (!config) {
|
|
129
|
+
config = loadConfig(cwd);
|
|
130
|
+
setIdleTimeout(config.idleTimeoutMs);
|
|
131
|
+
configCache.set(cwd, config);
|
|
132
|
+
}
|
|
133
|
+
return config;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function getLspServers(config: LspConfig): Array<[string, ServerConfig]> {
|
|
137
|
+
return Object.entries(config.servers) as Array<[string, ServerConfig]>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function getLspServersForFile(config: LspConfig, filePath: string): Array<[string, ServerConfig]> {
|
|
141
|
+
return getServersForFile(config, filePath);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function getLspServerForFile(config: LspConfig, filePath: string): [string, ServerConfig] | null {
|
|
145
|
+
const servers = getLspServersForFile(config, filePath);
|
|
146
|
+
return servers.length > 0 ? servers[0] : null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const DIAGNOSTIC_MESSAGE_LIMIT = 50;
|
|
150
|
+
const SINGLE_DIAGNOSTICS_WAIT_TIMEOUT_MS = 3000;
|
|
151
|
+
const BATCH_DIAGNOSTICS_WAIT_TIMEOUT_MS = 400;
|
|
152
|
+
const MAX_GLOB_DIAGNOSTIC_TARGETS = 20;
|
|
153
|
+
const WORKSPACE_SYMBOL_LIMIT = 200;
|
|
154
|
+
|
|
155
|
+
function limitDiagnosticMessages(messages: string[]): string[] {
|
|
156
|
+
if (messages.length <= DIAGNOSTIC_MESSAGE_LIMIT) {
|
|
157
|
+
return messages;
|
|
158
|
+
}
|
|
159
|
+
return messages.slice(0, DIAGNOSTIC_MESSAGE_LIMIT);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const LOCATION_CONTEXT_LINES = 1;
|
|
163
|
+
const REFERENCE_CONTEXT_LIMIT = 50;
|
|
164
|
+
|
|
165
|
+
function normalizeLocationResult(result: Location | Location[] | LocationLink | LocationLink[] | null): Location[] {
|
|
166
|
+
if (!result) return [];
|
|
167
|
+
const raw = Array.isArray(result) ? result : [result];
|
|
168
|
+
return raw.flatMap(loc => {
|
|
169
|
+
if ("uri" in loc) {
|
|
170
|
+
return [loc as Location];
|
|
171
|
+
}
|
|
172
|
+
if ("targetUri" in loc) {
|
|
173
|
+
const link = loc as LocationLink;
|
|
174
|
+
return [{ uri: link.targetUri, range: link.targetSelectionRange ?? link.targetRange }];
|
|
175
|
+
}
|
|
176
|
+
return [];
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
async function formatLocationWithContext(location: Location, cwd: string): Promise<string> {
|
|
181
|
+
const header = ` ${formatLocation(location, cwd)}`;
|
|
182
|
+
const context = await readLocationContext(
|
|
183
|
+
uriToFile(location.uri),
|
|
184
|
+
location.range.start.line + 1,
|
|
185
|
+
LOCATION_CONTEXT_LINES,
|
|
186
|
+
);
|
|
187
|
+
if (context.length === 0) {
|
|
188
|
+
return header;
|
|
189
|
+
}
|
|
190
|
+
return `${header}\n${context.map(lineText => ` ${lineText}`).join("\n")}`;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
async function reloadServer(client: LspClient, serverName: string, signal?: AbortSignal): Promise<string> {
|
|
194
|
+
let output = `Restarted ${serverName}`;
|
|
195
|
+
const reloadMethods = ["rust-analyzer/reloadWorkspace", "workspace/didChangeConfiguration"];
|
|
196
|
+
for (const method of reloadMethods) {
|
|
197
|
+
try {
|
|
198
|
+
await sendRequest(client, method, method.includes("Configuration") ? { settings: {} } : null, signal);
|
|
199
|
+
output = `Reloaded ${serverName}`;
|
|
200
|
+
break;
|
|
201
|
+
} catch {
|
|
202
|
+
// Method not supported, try next
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (output.startsWith("Restarted")) {
|
|
206
|
+
client.proc.kill();
|
|
207
|
+
}
|
|
208
|
+
return output;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
async function waitForDiagnostics(
|
|
212
|
+
client: LspClient,
|
|
213
|
+
uri: string,
|
|
214
|
+
timeoutMs = 3000,
|
|
215
|
+
signal?: AbortSignal,
|
|
216
|
+
minVersion?: number,
|
|
217
|
+
): Promise<Diagnostic[]> {
|
|
218
|
+
const start = Date.now();
|
|
219
|
+
while (Date.now() - start < timeoutMs) {
|
|
220
|
+
throwIfAborted(signal);
|
|
221
|
+
const diagnostics = client.diagnostics.get(uri);
|
|
222
|
+
const versionOk = minVersion === undefined || client.diagnosticsVersion > minVersion;
|
|
223
|
+
if (diagnostics !== undefined && versionOk) return diagnostics;
|
|
224
|
+
await new Promise<void>(resolve => setTimeout(resolve, 100));
|
|
225
|
+
}
|
|
226
|
+
return client.diagnostics.get(uri) ?? [];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// =============================================================================
|
|
230
|
+
// Workspace Diagnostics
|
|
231
|
+
// =============================================================================
|
|
232
|
+
|
|
233
|
+
interface ProjectType {
|
|
234
|
+
type: "rust" | "typescript" | "go" | "python" | "unknown";
|
|
235
|
+
command?: string[];
|
|
236
|
+
description: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function detectProjectType(cwd: string): ProjectType {
|
|
240
|
+
if (fs.existsSync(path.join(cwd, "Cargo.toml"))) {
|
|
241
|
+
return { type: "rust", command: ["cargo", "check", "--message-format=short"], description: "Rust (cargo check)" };
|
|
242
|
+
}
|
|
243
|
+
if (fs.existsSync(path.join(cwd, "tsconfig.json"))) {
|
|
244
|
+
return { type: "typescript", command: ["npx", "tsc", "--noEmit"], description: "TypeScript (tsc --noEmit)" };
|
|
245
|
+
}
|
|
246
|
+
if (fs.existsSync(path.join(cwd, "go.mod"))) {
|
|
247
|
+
return { type: "go", command: ["go", "build", "./..."], description: "Go (go build)" };
|
|
248
|
+
}
|
|
249
|
+
if (fs.existsSync(path.join(cwd, "pyproject.toml")) || fs.existsSync(path.join(cwd, "pyrightconfig.json"))) {
|
|
250
|
+
return { type: "python", command: ["pyright"], description: "Python (pyright)" };
|
|
251
|
+
}
|
|
252
|
+
return { type: "unknown", description: "Unknown project type" };
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
async function runWorkspaceDiagnostics(
|
|
256
|
+
cwd: string,
|
|
257
|
+
signal?: AbortSignal,
|
|
258
|
+
): Promise<{ output: string; projectType: ProjectType }> {
|
|
259
|
+
throwIfAborted(signal);
|
|
260
|
+
const projectType = detectProjectType(cwd);
|
|
261
|
+
if (!projectType.command) {
|
|
262
|
+
return {
|
|
263
|
+
output: "Cannot detect project type. Supported: Rust (Cargo.toml), TypeScript (tsconfig.json), Go (go.mod), Python (pyproject.toml)",
|
|
264
|
+
projectType,
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
const [cmd, ...cmdArgs] = projectType.command;
|
|
268
|
+
const proc = spawn(cmd, cmdArgs, {
|
|
269
|
+
cwd,
|
|
270
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
271
|
+
});
|
|
272
|
+
const abortHandler = () => {
|
|
273
|
+
proc.kill();
|
|
274
|
+
};
|
|
275
|
+
if (signal) {
|
|
276
|
+
signal.addEventListener("abort", abortHandler, { once: true });
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
try {
|
|
280
|
+
const stdoutChunks: Buffer[] = [];
|
|
281
|
+
const stderrChunks: Buffer[] = [];
|
|
282
|
+
|
|
283
|
+
proc.stdout?.on("data", (chunk: Buffer) => stdoutChunks.push(chunk));
|
|
284
|
+
proc.stderr?.on("data", (chunk: Buffer) => stderrChunks.push(chunk));
|
|
285
|
+
|
|
286
|
+
const exitCode = await new Promise<number>((resolve) => {
|
|
287
|
+
proc.on("exit", (code: number | null) => resolve(code ?? 1));
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
const stdout = Buffer.concat(stdoutChunks).toString("utf-8");
|
|
291
|
+
const stderr = Buffer.concat(stderrChunks).toString("utf-8");
|
|
292
|
+
|
|
293
|
+
throwIfAborted(signal);
|
|
294
|
+
const combined = (stdout + stderr).trim();
|
|
295
|
+
if (!combined) {
|
|
296
|
+
return { output: "No issues found", projectType };
|
|
297
|
+
}
|
|
298
|
+
const lines = combined.split("\n");
|
|
299
|
+
if (lines.length > 50) {
|
|
300
|
+
return { output: `${lines.slice(0, 50).join("\n")}\n... and ${lines.length - 50} more lines`, projectType };
|
|
301
|
+
}
|
|
302
|
+
return { output: combined, projectType };
|
|
303
|
+
} catch (e: unknown) {
|
|
304
|
+
if (signal?.aborted) {
|
|
305
|
+
throw new ToolAbortError();
|
|
306
|
+
}
|
|
307
|
+
return { output: `Failed to run ${projectType.command.join(" ")}: ${e}`, projectType };
|
|
308
|
+
} finally {
|
|
309
|
+
signal?.removeEventListener("abort", abortHandler);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// =============================================================================
|
|
314
|
+
// Path Resolution
|
|
315
|
+
// =============================================================================
|
|
316
|
+
|
|
317
|
+
function resolveToCwd(file: string, cwd: string): string {
|
|
318
|
+
return path.resolve(cwd, file);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// =============================================================================
|
|
322
|
+
// Tool Factory
|
|
323
|
+
// =============================================================================
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Create an LSP tool configured for a specific working directory.
|
|
327
|
+
*/
|
|
328
|
+
export function createLspTool(cwd: string): AgentTool<typeof lspSchema, LspToolDetails> {
|
|
329
|
+
return {
|
|
330
|
+
name: "lsp",
|
|
331
|
+
label: "LSP",
|
|
332
|
+
description: lspDescription,
|
|
333
|
+
parameters: lspSchema,
|
|
334
|
+
|
|
335
|
+
async execute(
|
|
336
|
+
_toolCallId: string,
|
|
337
|
+
params: LspParams,
|
|
338
|
+
signal?: AbortSignal,
|
|
339
|
+
_onUpdate?: AgentToolUpdateCallback<LspToolDetails>,
|
|
340
|
+
): Promise<AgentToolResult<LspToolDetails>> {
|
|
341
|
+
const { action, file, line, symbol, occurrence, query, new_name, apply, timeout } = params;
|
|
342
|
+
const timeoutSec = clampTimeout(timeout);
|
|
343
|
+
const timeoutSignal = AbortSignal.timeout(timeoutSec * 1000);
|
|
344
|
+
signal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
|
|
345
|
+
throwIfAborted(signal);
|
|
346
|
+
|
|
347
|
+
const config = getConfig(cwd);
|
|
348
|
+
|
|
349
|
+
// Status action doesn't need a file
|
|
350
|
+
if (action === "status") {
|
|
351
|
+
const servers = Object.keys(config.servers);
|
|
352
|
+
const lspmuxState = await detectLspmux();
|
|
353
|
+
const lspmuxStatus = lspmuxState.available
|
|
354
|
+
? lspmuxState.running
|
|
355
|
+
? "lspmux: active (multiplexing enabled)"
|
|
356
|
+
: "lspmux: installed but server not running"
|
|
357
|
+
: "";
|
|
358
|
+
|
|
359
|
+
const serverStatus =
|
|
360
|
+
servers.length > 0
|
|
361
|
+
? `Active language servers: ${servers.join(", ")}`
|
|
362
|
+
: "No language servers configured for this project";
|
|
363
|
+
|
|
364
|
+
const output = lspmuxStatus ? `${serverStatus}\n${lspmuxStatus}` : serverStatus;
|
|
365
|
+
return {
|
|
366
|
+
content: [{ type: "text", text: output }],
|
|
367
|
+
details: { action, success: true, request: params },
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// Diagnostics can be batch or single-file
|
|
372
|
+
if (action === "diagnostics") {
|
|
373
|
+
if (!file) {
|
|
374
|
+
const result = await runWorkspaceDiagnostics(cwd, signal);
|
|
375
|
+
return {
|
|
376
|
+
content: [
|
|
377
|
+
{
|
|
378
|
+
type: "text",
|
|
379
|
+
text: `Workspace diagnostics (${result.projectType.description}):\n${result.output}`,
|
|
380
|
+
},
|
|
381
|
+
],
|
|
382
|
+
details: { action, success: true, request: params },
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
let targets: string[];
|
|
387
|
+
let truncatedGlobTargets = false;
|
|
388
|
+
if (hasGlobPattern(file)) {
|
|
389
|
+
const globMatches = await collectGlobMatches(file, cwd, MAX_GLOB_DIAGNOSTIC_TARGETS);
|
|
390
|
+
targets = globMatches.matches;
|
|
391
|
+
truncatedGlobTargets = globMatches.truncated;
|
|
392
|
+
} else {
|
|
393
|
+
targets = [file];
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
if (targets.length === 0) {
|
|
397
|
+
return {
|
|
398
|
+
content: [{ type: "text", text: `No files matched pattern: ${file}` }],
|
|
399
|
+
details: { action, success: true, request: params },
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
const detailed = targets.length > 1 || truncatedGlobTargets;
|
|
404
|
+
const diagnosticsWaitTimeoutMs = detailed
|
|
405
|
+
? Math.min(BATCH_DIAGNOSTICS_WAIT_TIMEOUT_MS, timeoutSec * 1000)
|
|
406
|
+
: Math.min(SINGLE_DIAGNOSTICS_WAIT_TIMEOUT_MS, timeoutSec * 1000);
|
|
407
|
+
const results: string[] = [];
|
|
408
|
+
const allServerNames = new Set<string>();
|
|
409
|
+
if (truncatedGlobTargets) {
|
|
410
|
+
results.push(
|
|
411
|
+
`[W] Pattern matched more than ${MAX_GLOB_DIAGNOSTIC_TARGETS} files; showing first ${MAX_GLOB_DIAGNOSTIC_TARGETS}. Narrow the glob or use workspace diagnostics.`,
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
for (const target of targets) {
|
|
416
|
+
throwIfAborted(signal);
|
|
417
|
+
const resolved = resolveToCwd(target, cwd);
|
|
418
|
+
const servers = getServersForFile(config, resolved);
|
|
419
|
+
if (servers.length === 0) {
|
|
420
|
+
results.push(`[E] ${target}: No language server found`);
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
const uri = fileToUri(resolved);
|
|
425
|
+
const relPath = path.relative(cwd, resolved);
|
|
426
|
+
const allDiagnostics: Diagnostic[] = [];
|
|
427
|
+
|
|
428
|
+
for (const [serverName, serverConfig] of servers) {
|
|
429
|
+
allServerNames.add(serverName);
|
|
430
|
+
try {
|
|
431
|
+
throwIfAborted(signal);
|
|
432
|
+
const client = await getOrCreateClient(serverConfig, cwd);
|
|
433
|
+
const minVersion = client.diagnosticsVersion;
|
|
434
|
+
await refreshFile(client, resolved, signal);
|
|
435
|
+
const diagnostics = await waitForDiagnostics(
|
|
436
|
+
client,
|
|
437
|
+
uri,
|
|
438
|
+
diagnosticsWaitTimeoutMs,
|
|
439
|
+
signal,
|
|
440
|
+
minVersion,
|
|
441
|
+
);
|
|
442
|
+
allDiagnostics.push(...diagnostics);
|
|
443
|
+
} catch (err: unknown) {
|
|
444
|
+
if (err instanceof ToolAbortError || signal?.aborted) {
|
|
445
|
+
throw err;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// Deduplicate
|
|
451
|
+
const seen = new Set<string>();
|
|
452
|
+
const uniqueDiagnostics: Diagnostic[] = [];
|
|
453
|
+
for (const d of allDiagnostics) {
|
|
454
|
+
const key = `${d.range.start.line}:${d.range.start.character}:${d.range.end.line}:${d.range.end.character}:${d.message}`;
|
|
455
|
+
if (!seen.has(key)) {
|
|
456
|
+
seen.add(key);
|
|
457
|
+
uniqueDiagnostics.push(d);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
sortDiagnostics(uniqueDiagnostics);
|
|
462
|
+
|
|
463
|
+
if (!detailed && targets.length === 1) {
|
|
464
|
+
if (uniqueDiagnostics.length === 0) {
|
|
465
|
+
return {
|
|
466
|
+
content: [{ type: "text", text: "No diagnostics" }],
|
|
467
|
+
details: { action, serverName: Array.from(allServerNames).join(", "), success: true },
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
const summary = formatDiagnosticsSummary(uniqueDiagnostics);
|
|
472
|
+
const formatted = uniqueDiagnostics.map(d => formatDiagnostic(d, relPath));
|
|
473
|
+
const output = `${summary}:\n${formatGroupedDiagnosticMessages(formatted)}`;
|
|
474
|
+
return {
|
|
475
|
+
content: [{ type: "text", text: output }],
|
|
476
|
+
details: { action, serverName: Array.from(allServerNames).join(", "), success: true },
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
if (uniqueDiagnostics.length === 0) {
|
|
481
|
+
results.push(`OK ${relPath}: no issues`);
|
|
482
|
+
} else {
|
|
483
|
+
const summary = formatDiagnosticsSummary(uniqueDiagnostics);
|
|
484
|
+
results.push(`[E] ${relPath}: ${summary}`);
|
|
485
|
+
const formatted = uniqueDiagnostics.map(d => formatDiagnostic(d, relPath));
|
|
486
|
+
results.push(formatGroupedDiagnosticMessages(formatted));
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
return {
|
|
491
|
+
content: [{ type: "text", text: results.join("\n") }],
|
|
492
|
+
details: { action, serverName: Array.from(allServerNames).join(", "), success: true },
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
const requiresFile = !file && action !== "symbols" && action !== "reload";
|
|
497
|
+
|
|
498
|
+
if (requiresFile) {
|
|
499
|
+
return {
|
|
500
|
+
content: [{ type: "text", text: "Error: file parameter required for this action" }],
|
|
501
|
+
details: { action, success: false },
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
const resolvedFile = file ? resolveToCwd(file, cwd) : null;
|
|
506
|
+
|
|
507
|
+
// Workspace symbol search (no file)
|
|
508
|
+
if (action === "symbols" && !resolvedFile) {
|
|
509
|
+
const normalizedQuery = query?.trim();
|
|
510
|
+
if (!normalizedQuery) {
|
|
511
|
+
return {
|
|
512
|
+
content: [{ type: "text", text: "Error: query parameter required for workspace symbol search" }],
|
|
513
|
+
details: { action, success: false, request: params },
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
const servers = getLspServers(config);
|
|
517
|
+
if (servers.length === 0) {
|
|
518
|
+
return {
|
|
519
|
+
content: [{ type: "text", text: "No language server found for this action" }],
|
|
520
|
+
details: { action, success: false, request: params },
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
const aggregatedSymbols: SymbolInformation[] = [];
|
|
524
|
+
const respondingServers = new Set<string>();
|
|
525
|
+
for (const [workspaceServerName, workspaceServerConfig] of servers) {
|
|
526
|
+
throwIfAborted(signal);
|
|
527
|
+
try {
|
|
528
|
+
const workspaceClient = await getOrCreateClient(workspaceServerConfig, cwd);
|
|
529
|
+
const workspaceResult = (await sendRequest(
|
|
530
|
+
workspaceClient,
|
|
531
|
+
"workspace/symbol",
|
|
532
|
+
{ query: normalizedQuery },
|
|
533
|
+
signal,
|
|
534
|
+
)) as SymbolInformation[] | null;
|
|
535
|
+
if (!workspaceResult || workspaceResult.length === 0) {
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
respondingServers.add(workspaceServerName);
|
|
539
|
+
aggregatedSymbols.push(...filterWorkspaceSymbols(workspaceResult, normalizedQuery));
|
|
540
|
+
} catch (err: unknown) {
|
|
541
|
+
if (err instanceof ToolAbortError || signal?.aborted) {
|
|
542
|
+
throw err;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
const dedupedSymbols = dedupeWorkspaceSymbols(aggregatedSymbols);
|
|
547
|
+
if (dedupedSymbols.length === 0) {
|
|
548
|
+
return {
|
|
549
|
+
content: [{ type: "text", text: `No symbols matching "${normalizedQuery}"` }],
|
|
550
|
+
details: {
|
|
551
|
+
action,
|
|
552
|
+
serverName: Array.from(respondingServers).join(", "),
|
|
553
|
+
success: true,
|
|
554
|
+
request: params,
|
|
555
|
+
},
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
const limitedSymbols = dedupedSymbols.slice(0, WORKSPACE_SYMBOL_LIMIT);
|
|
559
|
+
const lines = limitedSymbols.map(s => formatSymbolInformation(s, cwd));
|
|
560
|
+
const truncationLine =
|
|
561
|
+
dedupedSymbols.length > WORKSPACE_SYMBOL_LIMIT
|
|
562
|
+
? `\n... ${dedupedSymbols.length - WORKSPACE_SYMBOL_LIMIT} additional symbol(s) omitted`
|
|
563
|
+
: "";
|
|
564
|
+
return {
|
|
565
|
+
content: [
|
|
566
|
+
{
|
|
567
|
+
type: "text",
|
|
568
|
+
text: `Found ${dedupedSymbols.length} symbol(s) matching "${normalizedQuery}":\n${lines.map(l => ` ${l}`).join("\n")}${truncationLine}`,
|
|
569
|
+
},
|
|
570
|
+
],
|
|
571
|
+
details: {
|
|
572
|
+
action,
|
|
573
|
+
serverName: Array.from(respondingServers).join(", "),
|
|
574
|
+
success: true,
|
|
575
|
+
request: params,
|
|
576
|
+
},
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// Reload all servers (no file)
|
|
581
|
+
if (action === "reload" && !resolvedFile) {
|
|
582
|
+
const servers = getLspServers(config);
|
|
583
|
+
if (servers.length === 0) {
|
|
584
|
+
return {
|
|
585
|
+
content: [{ type: "text", text: "No language server found for this action" }],
|
|
586
|
+
details: { action, success: false, request: params },
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
const outputs: string[] = [];
|
|
590
|
+
for (const [workspaceServerName, workspaceServerConfig] of servers) {
|
|
591
|
+
throwIfAborted(signal);
|
|
592
|
+
try {
|
|
593
|
+
const workspaceClient = await getOrCreateClient(workspaceServerConfig, cwd);
|
|
594
|
+
outputs.push(await reloadServer(workspaceClient, workspaceServerName, signal));
|
|
595
|
+
} catch (err: unknown) {
|
|
596
|
+
if (err instanceof ToolAbortError || signal?.aborted) {
|
|
597
|
+
throw err;
|
|
598
|
+
}
|
|
599
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
600
|
+
outputs.push(`Failed to reload ${workspaceServerName}: ${errorMessage}`);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return {
|
|
604
|
+
content: [{ type: "text", text: outputs.join("\n") }],
|
|
605
|
+
details: { action, serverName: servers.map(([name]) => name).join(", "), success: true, request: params },
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// File-specific actions
|
|
610
|
+
const serverInfo = resolvedFile ? getLspServerForFile(config, resolvedFile) : null;
|
|
611
|
+
if (!serverInfo) {
|
|
612
|
+
return {
|
|
613
|
+
content: [{ type: "text", text: "No language server found for this action" }],
|
|
614
|
+
details: { action, success: false },
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
const [serverName, serverConfig] = serverInfo;
|
|
619
|
+
|
|
620
|
+
try {
|
|
621
|
+
const client = await getOrCreateClient(serverConfig, cwd);
|
|
622
|
+
const targetFile = resolvedFile;
|
|
623
|
+
|
|
624
|
+
if (targetFile) {
|
|
625
|
+
await ensureFileOpen(client, targetFile, signal);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
const uri = targetFile ? fileToUri(targetFile) : "";
|
|
629
|
+
const resolvedLine = line ?? 1;
|
|
630
|
+
const resolvedCharacter = targetFile
|
|
631
|
+
? await resolveSymbolColumn(targetFile, resolvedLine, symbol, occurrence)
|
|
632
|
+
: 0;
|
|
633
|
+
const position = { line: resolvedLine - 1, character: resolvedCharacter };
|
|
634
|
+
|
|
635
|
+
let output: string;
|
|
636
|
+
|
|
637
|
+
switch (action) {
|
|
638
|
+
case "definition": {
|
|
639
|
+
const result = (await sendRequest(
|
|
640
|
+
client,
|
|
641
|
+
"textDocument/definition",
|
|
642
|
+
{
|
|
643
|
+
textDocument: { uri },
|
|
644
|
+
position,
|
|
645
|
+
},
|
|
646
|
+
signal,
|
|
647
|
+
)) as Location | Location[] | LocationLink | LocationLink[] | null;
|
|
648
|
+
|
|
649
|
+
const locations = normalizeLocationResult(result);
|
|
650
|
+
|
|
651
|
+
if (locations.length === 0) {
|
|
652
|
+
output = "No definition found";
|
|
653
|
+
} else {
|
|
654
|
+
const lines = await Promise.all(
|
|
655
|
+
locations.map(location => formatLocationWithContext(location, cwd)),
|
|
656
|
+
);
|
|
657
|
+
output = `Found ${locations.length} definition(s):\n${lines.join("\n")}`;
|
|
658
|
+
}
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
case "type_definition": {
|
|
663
|
+
const result = (await sendRequest(
|
|
664
|
+
client,
|
|
665
|
+
"textDocument/typeDefinition",
|
|
666
|
+
{
|
|
667
|
+
textDocument: { uri },
|
|
668
|
+
position,
|
|
669
|
+
},
|
|
670
|
+
signal,
|
|
671
|
+
)) as Location | Location[] | LocationLink | LocationLink[] | null;
|
|
672
|
+
|
|
673
|
+
const locations = normalizeLocationResult(result);
|
|
674
|
+
|
|
675
|
+
if (locations.length === 0) {
|
|
676
|
+
output = "No type definition found";
|
|
677
|
+
} else {
|
|
678
|
+
const lines = await Promise.all(
|
|
679
|
+
locations.map(location => formatLocationWithContext(location, cwd)),
|
|
680
|
+
);
|
|
681
|
+
output = `Found ${locations.length} type definition(s):\n${lines.join("\n")}`;
|
|
682
|
+
}
|
|
683
|
+
break;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
case "implementation": {
|
|
687
|
+
const result = (await sendRequest(
|
|
688
|
+
client,
|
|
689
|
+
"textDocument/implementation",
|
|
690
|
+
{
|
|
691
|
+
textDocument: { uri },
|
|
692
|
+
position,
|
|
693
|
+
},
|
|
694
|
+
signal,
|
|
695
|
+
)) as Location | Location[] | LocationLink | LocationLink[] | null;
|
|
696
|
+
|
|
697
|
+
const locations = normalizeLocationResult(result);
|
|
698
|
+
|
|
699
|
+
if (locations.length === 0) {
|
|
700
|
+
output = "No implementation found";
|
|
701
|
+
} else {
|
|
702
|
+
const lines = await Promise.all(
|
|
703
|
+
locations.map(location => formatLocationWithContext(location, cwd)),
|
|
704
|
+
);
|
|
705
|
+
output = `Found ${locations.length} implementation(s):\n${lines.join("\n")}`;
|
|
706
|
+
}
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
case "references": {
|
|
711
|
+
const result = (await sendRequest(
|
|
712
|
+
client,
|
|
713
|
+
"textDocument/references",
|
|
714
|
+
{
|
|
715
|
+
textDocument: { uri },
|
|
716
|
+
position,
|
|
717
|
+
context: { includeDeclaration: true },
|
|
718
|
+
},
|
|
719
|
+
signal,
|
|
720
|
+
)) as Location[] | null;
|
|
721
|
+
|
|
722
|
+
if (!result || result.length === 0) {
|
|
723
|
+
output = "No references found";
|
|
724
|
+
} else {
|
|
725
|
+
const contextualReferences = result.slice(0, REFERENCE_CONTEXT_LIMIT);
|
|
726
|
+
const plainReferences = result.slice(REFERENCE_CONTEXT_LIMIT);
|
|
727
|
+
const contextualLines = await Promise.all(
|
|
728
|
+
contextualReferences.map(location => formatLocationWithContext(location, cwd)),
|
|
729
|
+
);
|
|
730
|
+
const plainLines = plainReferences.map(location => ` ${formatLocation(location, cwd)}`);
|
|
731
|
+
const lines = plainLines.length
|
|
732
|
+
? [
|
|
733
|
+
...contextualLines,
|
|
734
|
+
` ... ${plainLines.length} additional reference(s) shown without context`,
|
|
735
|
+
...plainLines,
|
|
736
|
+
]
|
|
737
|
+
: contextualLines;
|
|
738
|
+
output = `Found ${result.length} reference(s):\n${lines.join("\n")}`;
|
|
739
|
+
}
|
|
740
|
+
break;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
case "hover": {
|
|
744
|
+
const result = (await sendRequest(
|
|
745
|
+
client,
|
|
746
|
+
"textDocument/hover",
|
|
747
|
+
{
|
|
748
|
+
textDocument: { uri },
|
|
749
|
+
position,
|
|
750
|
+
},
|
|
751
|
+
signal,
|
|
752
|
+
)) as Hover | null;
|
|
753
|
+
|
|
754
|
+
if (!result || !result.contents) {
|
|
755
|
+
output = "No hover information";
|
|
756
|
+
} else {
|
|
757
|
+
output = extractHoverText(result.contents);
|
|
758
|
+
}
|
|
759
|
+
break;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
case "code_actions": {
|
|
763
|
+
const diagnostics = client.diagnostics.get(uri) ?? [];
|
|
764
|
+
const context: CodeActionContext = {
|
|
765
|
+
diagnostics,
|
|
766
|
+
only: !apply && query ? [query] : undefined,
|
|
767
|
+
triggerKind: 1,
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
const result = (await sendRequest(
|
|
771
|
+
client,
|
|
772
|
+
"textDocument/codeAction",
|
|
773
|
+
{
|
|
774
|
+
textDocument: { uri },
|
|
775
|
+
range: { start: position, end: position },
|
|
776
|
+
context,
|
|
777
|
+
},
|
|
778
|
+
signal,
|
|
779
|
+
)) as (CodeAction | Command)[] | null;
|
|
780
|
+
|
|
781
|
+
if (!result || result.length === 0) {
|
|
782
|
+
output = "No code actions available";
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
if (apply === true && query) {
|
|
787
|
+
const normalizedQuery = query.trim();
|
|
788
|
+
if (normalizedQuery.length === 0) {
|
|
789
|
+
output = "Error: query parameter required when apply=true for code_actions";
|
|
790
|
+
break;
|
|
791
|
+
}
|
|
792
|
+
const parsedIndex = /^\d+$/.test(normalizedQuery) ? Number.parseInt(normalizedQuery, 10) : null;
|
|
793
|
+
const selectedAction = result.find(
|
|
794
|
+
(actionItem, index) =>
|
|
795
|
+
(parsedIndex !== null && index === parsedIndex) ||
|
|
796
|
+
actionItem.title.toLowerCase().includes(normalizedQuery.toLowerCase()),
|
|
797
|
+
);
|
|
798
|
+
|
|
799
|
+
if (!selectedAction) {
|
|
800
|
+
const actionLines = result.map((actionItem, index) => ` ${formatCodeAction(actionItem, index)}`);
|
|
801
|
+
output = `No code action matches "${normalizedQuery}". Available actions:\n${actionLines.join("\n")}`;
|
|
802
|
+
break;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
const appliedAction = await applyCodeAction(selectedAction, {
|
|
806
|
+
resolveCodeAction: async (actionItem: CodeAction) =>
|
|
807
|
+
(await sendRequest(client, "codeAction/resolve", actionItem, signal)) as CodeAction,
|
|
808
|
+
applyWorkspaceEdit: async (edit: WorkspaceEdit) => applyWorkspaceEdit(edit, cwd),
|
|
809
|
+
executeCommand: async (commandItem: Command) => {
|
|
810
|
+
await sendRequest(
|
|
811
|
+
client,
|
|
812
|
+
"workspace/executeCommand",
|
|
813
|
+
{
|
|
814
|
+
command: commandItem.command,
|
|
815
|
+
arguments: commandItem.arguments ?? [],
|
|
816
|
+
},
|
|
817
|
+
signal,
|
|
818
|
+
);
|
|
819
|
+
},
|
|
820
|
+
});
|
|
821
|
+
|
|
822
|
+
if (!appliedAction) {
|
|
823
|
+
output = `Action "${selectedAction.title}" has no workspace edit or command to apply`;
|
|
824
|
+
break;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
const summaryLines: string[] = [];
|
|
828
|
+
if (appliedAction.edits.length > 0) {
|
|
829
|
+
summaryLines.push(" Workspace edit:");
|
|
830
|
+
summaryLines.push(...appliedAction.edits.map(item => ` ${item}`));
|
|
831
|
+
}
|
|
832
|
+
if (appliedAction.executedCommands.length > 0) {
|
|
833
|
+
summaryLines.push(" Executed command(s):");
|
|
834
|
+
summaryLines.push(...appliedAction.executedCommands.map(commandName => ` ${commandName}`));
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
output = `Applied "${appliedAction.title}":\n${summaryLines.join("\n")}`;
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
const actionLines = result.map((actionItem, index) => ` ${formatCodeAction(actionItem, index)}`);
|
|
842
|
+
output = `${result.length} code action(s):\n${actionLines.join("\n")}`;
|
|
843
|
+
break;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
case "symbols": {
|
|
847
|
+
if (!targetFile) {
|
|
848
|
+
output = "Error: file parameter required for document symbols";
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
const result = (await sendRequest(
|
|
852
|
+
client,
|
|
853
|
+
"textDocument/documentSymbol",
|
|
854
|
+
{
|
|
855
|
+
textDocument: { uri },
|
|
856
|
+
},
|
|
857
|
+
signal,
|
|
858
|
+
)) as (DocumentSymbol | SymbolInformation)[] | null;
|
|
859
|
+
|
|
860
|
+
if (!result || result.length === 0) {
|
|
861
|
+
output = "No symbols found";
|
|
862
|
+
} else {
|
|
863
|
+
const relPath = path.relative(cwd, targetFile);
|
|
864
|
+
if ("selectionRange" in result[0]) {
|
|
865
|
+
const lines = (result as DocumentSymbol[]).flatMap(s => formatDocumentSymbol(s));
|
|
866
|
+
output = `Symbols in ${relPath}:\n${lines.join("\n")}`;
|
|
867
|
+
} else {
|
|
868
|
+
const lines = (result as SymbolInformation[]).map(s => {
|
|
869
|
+
const line = s.location.range.start.line + 1;
|
|
870
|
+
const icon = symbolKindToIcon(s.kind);
|
|
871
|
+
return `${icon} ${s.name} @ line ${line}`;
|
|
872
|
+
});
|
|
873
|
+
output = `Symbols in ${relPath}:\n${lines.join("\n")}`;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
break;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
case "rename": {
|
|
880
|
+
if (!new_name) {
|
|
881
|
+
return {
|
|
882
|
+
content: [{ type: "text", text: "Error: new_name parameter required for rename" }],
|
|
883
|
+
details: { action, serverName, success: false },
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
const result = (await sendRequest(
|
|
888
|
+
client,
|
|
889
|
+
"textDocument/rename",
|
|
890
|
+
{
|
|
891
|
+
textDocument: { uri },
|
|
892
|
+
position,
|
|
893
|
+
newName: new_name,
|
|
894
|
+
},
|
|
895
|
+
signal,
|
|
896
|
+
)) as WorkspaceEdit | null;
|
|
897
|
+
|
|
898
|
+
if (!result) {
|
|
899
|
+
output = "Rename returned no edits";
|
|
900
|
+
} else {
|
|
901
|
+
const shouldApply = apply !== false;
|
|
902
|
+
if (shouldApply) {
|
|
903
|
+
const applied = await applyWorkspaceEdit(result, cwd);
|
|
904
|
+
output = `Applied rename:\n${applied.map(a => ` ${a}`).join("\n")}`;
|
|
905
|
+
} else {
|
|
906
|
+
const preview = formatWorkspaceEdit(result, cwd);
|
|
907
|
+
output = `Rename preview:\n${preview.map(p => ` ${p}`).join("\n")}`;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
break;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
case "reload": {
|
|
914
|
+
output = await reloadServer(client, serverName, signal);
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
default:
|
|
919
|
+
output = `Unknown action: ${action}`;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
return {
|
|
923
|
+
content: [{ type: "text", text: output }],
|
|
924
|
+
details: { serverName, action, success: true, request: params },
|
|
925
|
+
};
|
|
926
|
+
} catch (err: unknown) {
|
|
927
|
+
if (err instanceof ToolAbortError || signal?.aborted) {
|
|
928
|
+
throw new ToolAbortError();
|
|
929
|
+
}
|
|
930
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
931
|
+
return {
|
|
932
|
+
content: [{ type: "text", text: `LSP error: ${errorMessage}` }],
|
|
933
|
+
details: { serverName, action, success: false, request: params },
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Default LSP tool using process.cwd().
|
|
942
|
+
*/
|
|
943
|
+
export const lspTool = createLspTool(process.cwd());
|