@mrclrchtr/supi-code-intelligence 1.7.0 → 1.8.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 +13 -2
- package/node_modules/@mrclrchtr/supi-core/package.json +13 -2
- package/node_modules/@mrclrchtr/supi-core/src/api.ts +26 -92
- package/node_modules/@mrclrchtr/supi-core/src/config.ts +11 -0
- package/node_modules/@mrclrchtr/supi-core/src/context.ts +16 -0
- package/node_modules/@mrclrchtr/supi-core/src/index.ts +26 -92
- package/node_modules/@mrclrchtr/supi-core/src/path.ts +2 -0
- package/node_modules/@mrclrchtr/supi-core/src/project.ts +15 -0
- package/node_modules/@mrclrchtr/supi-core/src/session.ts +4 -0
- package/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +2 -0
- package/node_modules/@mrclrchtr/supi-core/src/settings.ts +9 -0
- package/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +11 -0
- package/node_modules/@mrclrchtr/supi-core/src/types.ts +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/README.md +13 -8
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +13 -2
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/api.ts +26 -92
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/config.ts +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/context.ts +16 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/index.ts +26 -92
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/path.ts +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/project.ts +15 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/session.ts +4 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/settings.ts +9 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/src/types.ts +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/License.txt +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/README.md +69 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/browser.d.ts +6 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/browser.js +7 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/browser/main.d.ts +17 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/browser/main.js +76 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts +12 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/browser/ril.js +156 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/api.d.ts +14 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/api.js +81 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts +32 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/cancellation.js +96 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/connection.d.ts +358 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/connection.js +1214 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts +9 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/disposable.js +16 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts +52 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/encoding.js +70 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/events.d.ts +39 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/events.js +128 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/is.d.ts +7 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/is.js +35 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts +53 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +398 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts +18 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +152 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts +77 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/messageReader.js +197 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts +60 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +115 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/messages.d.ts +369 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/messages.js +306 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/ral.d.ts +74 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/ral.js +23 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts +10 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/semaphore.js +68 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +15 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +76 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/node/main.d.ts +63 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/node/main.js +257 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/node/ril.d.ts +13 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/lib/node/ril.js +161 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/node.cmd +5 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/node.d.ts +6 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/node.js +7 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/package.json +45 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/thirdpartynotices.txt +16 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-jsonrpc/typings/thenable.d.ts +5 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/License.txt +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/README.md +16 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/browser.d.ts +6 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/browser.js +7 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts +4 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/browser/main.js +28 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts +58 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/api.js +77 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts +187 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/connection.js +15 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts +51 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/messages.js +44 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts +1 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js +43 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts +86 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +42 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts +66 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +32 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts +35 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +24 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts +3252 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts +37 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts +341 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +74 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts +306 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +101 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts +109 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +30 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts +38 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts +110 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +43 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts +57 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts +86 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +30 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +943 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts +52 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +19 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts +106 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +68 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts +400 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +214 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts +107 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +37 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts +41 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +20 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts +223 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +57 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts +72 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +22 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts +38 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +21 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts +83 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +42 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts +74 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +27 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts +9 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +46 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts +6 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/lib/node/main.js +28 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/metaModel.schema.json +783 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node.cmd +5 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node.d.ts +6 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node.js +7 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/License.txt +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/README.md +69 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.d.ts +6 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js +7 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.d.ts +17 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js +76 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts +12 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js +156 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.d.ts +14 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js +81 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts +32 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js +96 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.d.ts +358 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js +1212 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts +9 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js +16 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts +52 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/encoding.js +70 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.d.ts +39 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js +128 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.d.ts +7 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js +35 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts +53 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +398 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts +18 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +152 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts +77 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js +197 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts +60 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +115 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.d.ts +369 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js +306 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.d.ts +74 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js +23 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts +10 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js +68 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +15 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +76 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.d.ts +63 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/main.js +257 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.d.ts +13 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/node/ril.js +161 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.cmd +5 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.d.ts +6 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/node.js +7 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/package.json +45 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/thirdpartynotices.txt +16 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/typings/thenable.d.ts +5 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-protocol/package.json +45 -0
- package/node_modules/@mrclrchtr/{supi-tree-sitter/node_modules/web-tree-sitter/LICENSE → supi-lsp/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt} +16 -6
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/License.txt +11 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/README.md +17 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/lib/esm/main.d.ts +3139 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/lib/esm/main.js +2222 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/lib/esm/package.json +3 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/lib/umd/main.d.ts +3139 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/lib/umd/main.js +2272 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/package.json +38 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/vscode-languageserver-types/thirdpartynotices.txt +16 -0
- package/node_modules/@mrclrchtr/supi-lsp/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/config/config.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/handlers/diagnostic-injection.ts +182 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/handlers/session-lifecycle.ts +139 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/handlers/status-command.ts +38 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/handlers/workspace-recovery.ts +92 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/lsp.ts +15 -413
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-helpers.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-symbol.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/session/scanner.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/session/service-registry.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/session/settings-registration.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/guidance.ts +5 -14
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/names.ts +12 -4
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/register-tools.ts +2 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/service-actions.ts +141 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/tool/tool-specs.ts +93 -93
- package/node_modules/@mrclrchtr/supi-lsp/src/utils.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/workspace-change.ts +40 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/README.md +26 -15
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +13 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/api.ts +26 -92
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/config.ts +11 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/context.ts +16 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/index.ts +26 -92
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/path.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/project.ts +15 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/session.ts +4 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings-ui.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/settings.ts +9 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/substrate-types.ts +11 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/src/types.ts +2 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/session/runtime.ts +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/session/service-registry.ts +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/guidance.ts +29 -25
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/handlers.ts +196 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/register-tools.ts +107 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/tool-specs.ts +117 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tree-sitter.ts +4 -300
- package/package.json +4 -4
- package/src/api.ts +15 -0
- package/src/architecture.ts +1 -1
- package/src/brief.ts +9 -53
- package/src/code-intelligence.ts +6 -2
- package/src/index.ts +15 -0
- package/src/pattern-structured.ts +26 -26
- package/src/presentation/markdown/affected.ts +170 -0
- package/src/presentation/markdown/brief.ts +174 -0
- package/src/presentation/markdown/map.ts +54 -0
- package/src/presentation/markdown/overview.ts +59 -0
- package/src/presentation/markdown/pattern.ts +239 -0
- package/src/presentation/markdown/relations.ts +121 -0
- package/src/prioritization-signals.ts +1 -1
- package/src/resolve-target.ts +58 -40
- package/src/search-helpers.ts +17 -4
- package/src/substrates/lsp-adapter.ts +197 -0
- package/src/substrates/tree-sitter-adapter.ts +173 -0
- package/src/substrates/types.ts +113 -0
- package/src/target-resolution.ts +35 -416
- package/src/targeting/query.ts +60 -0
- package/src/targeting/resolve-anchored.ts +80 -0
- package/src/targeting/resolve-file.ts +197 -0
- package/src/targeting/resolve-symbol.ts +110 -0
- package/src/targeting/types.ts +111 -0
- package/src/tool/execute-affected.ts +3 -3
- package/src/tool/execute-brief.ts +29 -3
- package/src/tool/execute-map.ts +5 -2
- package/src/tool/execute-pattern.ts +5 -3
- package/src/tool/execute-relations.ts +15 -23
- package/src/tool/guidance.ts +30 -1
- package/src/tool/tool-specs.ts +29 -48
- package/src/use-case/build-overview.ts +36 -0
- package/src/use-case/generate-affected.ts +279 -0
- package/src/use-case/generate-brief.ts +324 -0
- package/src/{actions/map-action.ts → use-case/generate-map.ts} +30 -60
- package/src/use-case/generate-pattern.ts +270 -0
- package/src/use-case/generate-relations.ts +392 -0
- package/src/use-case/support/semantic-references.ts +114 -0
- package/src/use-case/types.ts +43 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/README.md +0 -265
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs +0 -4661
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs.map +0 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js +0 -4605
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js.map +0 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm.map +0 -57
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/package.json +0 -100
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs +0 -4063
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs.map +0 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts +0 -1025
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts.map +0 -58
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts +0 -1025
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts.map +0 -58
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js +0 -4007
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js.map +0 -7
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm.map +0 -55
- package/node_modules/@mrclrchtr/supi-tree-sitter/src/tool/action-specs.ts +0 -92
- package/src/actions/affected-action.ts +0 -452
- package/src/actions/brief-action.ts +0 -378
- package/src/actions/callees-action.ts +0 -155
- package/src/actions/callers-action.ts +0 -253
- package/src/actions/implementations-action.ts +0 -172
- package/src/actions/pattern-action.ts +0 -392
- package/src/providers/semantic-provider.ts +0 -34
- package/src/providers/structural-provider.ts +0 -26
package/src/code-intelligence.ts
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
import type { BeforeAgentStartEventResult, ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
5
5
|
import { buildArchitectureModel } from "./architecture.ts";
|
|
6
|
-
import {
|
|
6
|
+
import { renderOverview } from "./presentation/markdown/overview.ts";
|
|
7
7
|
import { registerCodeIntelligenceTools } from "./tool/register-tools.ts";
|
|
8
|
+
import { buildOverviewData } from "./use-case/build-overview.ts";
|
|
8
9
|
|
|
9
10
|
const OVERVIEW_CUSTOM_TYPE = "code-intelligence-overview";
|
|
10
11
|
|
|
@@ -37,7 +38,10 @@ export default function codeIntelligenceExtension(pi: ExtensionAPI) {
|
|
|
37
38
|
const model = await buildArchitectureModel(ctx.cwd);
|
|
38
39
|
if (!model || model.modules.length === 0) return;
|
|
39
40
|
|
|
40
|
-
const
|
|
41
|
+
const data = buildOverviewData(model);
|
|
42
|
+
if (!data) return;
|
|
43
|
+
|
|
44
|
+
const overview = renderOverview(data);
|
|
41
45
|
if (!overview) return;
|
|
42
46
|
|
|
43
47
|
return {
|
package/src/index.ts
CHANGED
|
@@ -10,6 +10,21 @@ export {
|
|
|
10
10
|
} from "./architecture.ts";
|
|
11
11
|
|
|
12
12
|
export { generateFocusedBrief, generateOverview, generateProjectBrief } from "./brief.ts";
|
|
13
|
+
export { createSemanticSubstrate } from "./substrates/lsp-adapter.ts";
|
|
14
|
+
export { createStructuralSubstrate } from "./substrates/tree-sitter-adapter.ts";
|
|
15
|
+
|
|
16
|
+
// Substrate adapters
|
|
17
|
+
export type {
|
|
18
|
+
CalleesData,
|
|
19
|
+
CodeSymbol,
|
|
20
|
+
ExportData,
|
|
21
|
+
ImportData,
|
|
22
|
+
NodeAtData,
|
|
23
|
+
OutlineData,
|
|
24
|
+
SemanticSubstrate,
|
|
25
|
+
StructuralResult,
|
|
26
|
+
StructuralSubstrate,
|
|
27
|
+
} from "./substrates/types.ts";
|
|
13
28
|
export type { ResolvedTarget, TargetResolutionResult } from "./target-resolution.ts";
|
|
14
29
|
export {
|
|
15
30
|
normalizePath,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
|
-
import { withStructuralSession } from "./providers/structural-provider.ts";
|
|
4
3
|
import type { CodeQueryParams as ActionParams } from "./query-params.ts";
|
|
4
|
+
import type { StructuralSubstrate } from "./substrates/types.ts";
|
|
5
5
|
|
|
6
6
|
export const STRUCTURED_PATTERN_FILE_CAP = 200;
|
|
7
7
|
const STRUCTURED_PATTERN_TIMEOUT_MS = 10_000;
|
|
@@ -25,11 +25,13 @@ export function isStructuredPatternKind(kind: string | undefined): kind is Struc
|
|
|
25
25
|
return kind === "definition" || kind === "export" || kind === "import";
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
// biome-ignore lint/complexity/useMaxParams: substrate injection keeps related inputs explicit for readability
|
|
28
29
|
export async function getStructuredPatternMatches(
|
|
29
30
|
params: ActionParams & { pattern: string; kind: StructuredPatternKind },
|
|
30
31
|
scopePath: string,
|
|
31
32
|
cwd: string,
|
|
32
33
|
relScope: string,
|
|
34
|
+
structural: StructuralSubstrate,
|
|
33
35
|
): Promise<StructuredPatternResult | string | null> {
|
|
34
36
|
const deadline = Date.now() + STRUCTURED_PATTERN_TIMEOUT_MS;
|
|
35
37
|
const collected = collectStructuredFiles(scopePath, deadline);
|
|
@@ -43,26 +45,24 @@ export async function getStructuredPatternMatches(
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
try {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
const relFile = path.relative(cwd, file);
|
|
57
|
-
await collectMatchesForFile(matches, tsSession, relFile, params.kind, matcher);
|
|
48
|
+
const matches: StructuredMatch[] = [];
|
|
49
|
+
let timedOut = collected.timedOut;
|
|
50
|
+
|
|
51
|
+
for (const [index, file] of collected.files.entries()) {
|
|
52
|
+
if (Date.now() > deadline) {
|
|
53
|
+
collected.omittedCount += collected.files.length - index;
|
|
54
|
+
timedOut = true;
|
|
55
|
+
break;
|
|
58
56
|
}
|
|
57
|
+
const relFile = path.relative(cwd, file);
|
|
58
|
+
await collectMatchesForFile(matches, structural, relFile, params.kind, matcher);
|
|
59
|
+
}
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
61
|
+
return {
|
|
62
|
+
matches,
|
|
63
|
+
omittedCount: timedOut ? Math.max(1, collected.omittedCount) : collected.omittedCount,
|
|
64
|
+
partialReason: timedOut ? "timeout" : collected.omittedCount > 0 ? "file-cap" : null,
|
|
65
|
+
};
|
|
66
66
|
} catch {
|
|
67
67
|
return `No structured ${params.kind} search data available in \`${relScope}\`. Try omitting \`kind\` for plain text search.`;
|
|
68
68
|
}
|
|
@@ -72,32 +72,32 @@ export async function getStructuredPatternMatches(
|
|
|
72
72
|
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: kind-specific tree-sitter matching is clearest as one helper
|
|
73
73
|
async function collectMatchesForFile(
|
|
74
74
|
matches: StructuredMatch[],
|
|
75
|
-
|
|
75
|
+
structural: StructuralSubstrate,
|
|
76
76
|
relFile: string,
|
|
77
77
|
kind: StructuredPatternKind,
|
|
78
78
|
matcher: (value: string) => boolean,
|
|
79
79
|
): Promise<void> {
|
|
80
80
|
if (kind === "definition") {
|
|
81
|
-
const outline = await
|
|
81
|
+
const outline = await structural.outline(relFile);
|
|
82
82
|
if (outline.kind !== "success") return;
|
|
83
83
|
for (const item of outline.data) {
|
|
84
84
|
if (!matcher(item.name)) continue;
|
|
85
|
-
matches.push({ file: relFile, name: item.name, kind: item.kind, line: item.
|
|
85
|
+
matches.push({ file: relFile, name: item.name, kind: item.kind, line: item.startLine });
|
|
86
86
|
}
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
if (kind === "export") {
|
|
91
|
-
const exportsResult = await
|
|
91
|
+
const exportsResult = await structural.exports(relFile);
|
|
92
92
|
if (exportsResult.kind !== "success") return;
|
|
93
93
|
for (const item of exportsResult.data) {
|
|
94
94
|
if (!matcher(item.name)) continue;
|
|
95
|
-
matches.push({ file: relFile, name: item.name, kind: item.kind, line: item.
|
|
95
|
+
matches.push({ file: relFile, name: item.name, kind: item.kind, line: item.startLine });
|
|
96
96
|
}
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
const importsResult = await
|
|
100
|
+
const importsResult = await structural.imports(relFile);
|
|
101
101
|
if (importsResult.kind !== "success") return;
|
|
102
102
|
for (const item of importsResult.data) {
|
|
103
103
|
if (!matcher(item.moduleSpecifier)) continue;
|
|
@@ -105,7 +105,7 @@ async function collectMatchesForFile(
|
|
|
105
105
|
file: relFile,
|
|
106
106
|
name: item.moduleSpecifier,
|
|
107
107
|
kind: "import",
|
|
108
|
-
line: item.
|
|
108
|
+
line: item.startLine,
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// Affected markdown renderer — consumes analysis data and produces markdown content.
|
|
2
|
+
|
|
3
|
+
import type { PrioritySignalsSummary } from "../../prioritization-signals.ts";
|
|
4
|
+
import { appendPrioritySignalsSection } from "../../prioritization-signals.ts";
|
|
5
|
+
import type { ResolvedTarget, ResolvedTargetGroup } from "../../target-resolution.ts";
|
|
6
|
+
import type { ReferenceCollection } from "../../use-case/support/semantic-references.ts";
|
|
7
|
+
import { formatReferenceList } from "../../use-case/support/semantic-references.ts";
|
|
8
|
+
|
|
9
|
+
// ── Types ────────────────────────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
export interface ImpactAnalysis {
|
|
12
|
+
confidence: "semantic" | "structural" | "heuristic" | "unavailable";
|
|
13
|
+
affectedFiles: Set<string>;
|
|
14
|
+
affectedModules: Set<string>;
|
|
15
|
+
downstreamCount: number;
|
|
16
|
+
checkNext: string[];
|
|
17
|
+
likelyTests: string[];
|
|
18
|
+
riskLevel: "low" | "medium" | "high";
|
|
19
|
+
externalRefs: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface RenderSingleParams {
|
|
23
|
+
symbolName: string;
|
|
24
|
+
refs: ReferenceCollection;
|
|
25
|
+
analysis: ImpactAnalysis;
|
|
26
|
+
maxResults: number;
|
|
27
|
+
prioritySignals: PrioritySignalsSummary | null;
|
|
28
|
+
target: ResolvedTarget;
|
|
29
|
+
cwd: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ── Single target renderer ───────────────────────────────────────────
|
|
33
|
+
|
|
34
|
+
export function renderAffectedSingle(params: RenderSingleParams): string {
|
|
35
|
+
const { symbolName, refs, analysis, maxResults, prioritySignals, target, cwd } = params;
|
|
36
|
+
const totalRefs = refs.refs.length + analysis.externalRefs;
|
|
37
|
+
const lines: string[] = [];
|
|
38
|
+
|
|
39
|
+
lines.push(`# Affected: \`${symbolName}\``);
|
|
40
|
+
lines.push("");
|
|
41
|
+
|
|
42
|
+
const refSummary =
|
|
43
|
+
analysis.externalRefs > 0
|
|
44
|
+
? `${totalRefs} refs (${refs.refs.length} direct + ${analysis.externalRefs} external)`
|
|
45
|
+
: `${totalRefs} ref${totalRefs !== 1 ? "s" : ""}`;
|
|
46
|
+
lines.push(
|
|
47
|
+
`**Risk: ${analysis.riskLevel.toUpperCase()}** | ${refSummary} | ${analysis.affectedFiles.size} file${analysis.affectedFiles.size !== 1 ? "s" : ""} | ${analysis.affectedModules.size} module${analysis.affectedModules.size !== 1 ? "s" : ""} | ${analysis.downstreamCount} downstream (${analysis.confidence})`,
|
|
48
|
+
);
|
|
49
|
+
if (analysis.externalRefs > 0) {
|
|
50
|
+
lines.push(
|
|
51
|
+
"_External references are not listed individually (node_modules, .pnpm, or out-of-tree)_",
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
lines.push("");
|
|
55
|
+
|
|
56
|
+
addRiskSection(lines, analysis, totalRefs);
|
|
57
|
+
formatReferenceList(lines, refs.refs, maxResults, cwd);
|
|
58
|
+
appendPrioritySignalsSection(lines, prioritySignals);
|
|
59
|
+
addCheckNextSection(lines, analysis.checkNext);
|
|
60
|
+
addTestsSection(lines, analysis.likelyTests);
|
|
61
|
+
|
|
62
|
+
const relPath = target.file ? pathRelative(cwd, target.file) : "";
|
|
63
|
+
lines.push("## Next");
|
|
64
|
+
lines.push(
|
|
65
|
+
`- \`code_brief\` with \`file: "${relPath}"\`, \`line: ${target.displayLine}\`, and \`character: ${target.displayCharacter}\` for deeper context around ${symbolName}`,
|
|
66
|
+
);
|
|
67
|
+
lines.push(
|
|
68
|
+
`- \`code_relations\` with \`kind: "callers"\`, \`file: "${relPath}"\`, \`line: ${target.displayLine}\`, and \`character: ${target.displayCharacter}\` for call sites`,
|
|
69
|
+
);
|
|
70
|
+
lines.push("");
|
|
71
|
+
|
|
72
|
+
return lines.join("\n");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// ── File-level target group renderer ─────────────────────────────────
|
|
76
|
+
|
|
77
|
+
interface RenderFileLevelParams {
|
|
78
|
+
targetGroup: ResolvedTargetGroup;
|
|
79
|
+
perTarget: Array<{ target: ResolvedTarget; refs: ReferenceCollection }>;
|
|
80
|
+
aggregated: ReferenceCollection;
|
|
81
|
+
analysis: ImpactAnalysis;
|
|
82
|
+
maxResults: number;
|
|
83
|
+
prioritySignals: PrioritySignalsSummary | null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function renderAffectedFileLevel(params: RenderFileLevelParams): string {
|
|
87
|
+
const { targetGroup, perTarget, aggregated, analysis, maxResults, prioritySignals } = params;
|
|
88
|
+
const totalRefs = aggregated.refs.length + aggregated.externalCount;
|
|
89
|
+
const refSummary =
|
|
90
|
+
aggregated.externalCount > 0
|
|
91
|
+
? `${totalRefs} refs (${aggregated.refs.length} direct + ${aggregated.externalCount} external)`
|
|
92
|
+
: `${totalRefs} ref${totalRefs !== 1 ? "s" : ""}`;
|
|
93
|
+
|
|
94
|
+
const lines: string[] = [];
|
|
95
|
+
lines.push(`# Affected: \`${targetGroup.displayName}\``);
|
|
96
|
+
lines.push("");
|
|
97
|
+
lines.push(
|
|
98
|
+
`**Risk: ${analysis.riskLevel.toUpperCase()}** | ${targetGroup.targets.length} exported target${targetGroup.targets.length !== 1 ? "s" : ""} | ${refSummary} | ${analysis.affectedFiles.size} file${analysis.affectedFiles.size !== 1 ? "s" : ""} | ${analysis.affectedModules.size} module${analysis.affectedModules.size !== 1 ? "s" : ""} | ${analysis.downstreamCount} downstream (${analysis.confidence})`,
|
|
99
|
+
);
|
|
100
|
+
lines.push("");
|
|
101
|
+
|
|
102
|
+
lines.push("## Exported Targets");
|
|
103
|
+
for (const entry of perTarget) {
|
|
104
|
+
lines.push(
|
|
105
|
+
`- \`${entry.target.name ?? "symbol"}\` — ${entry.refs.refs.length} ref${entry.refs.refs.length !== 1 ? "s" : ""}`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
lines.push("");
|
|
109
|
+
|
|
110
|
+
addRiskSection(lines, analysis, totalRefs);
|
|
111
|
+
formatReferenceList(lines, aggregated.refs, maxResults, "");
|
|
112
|
+
appendPrioritySignalsSection(lines, prioritySignals);
|
|
113
|
+
addCheckNextSection(lines, analysis.checkNext);
|
|
114
|
+
addTestsSection(lines, analysis.likelyTests);
|
|
115
|
+
lines.push("## Next");
|
|
116
|
+
lines.push("- `code_brief` on the most-affected module for deeper context");
|
|
117
|
+
lines.push("- Use `file` + coordinates to inspect one exported target precisely");
|
|
118
|
+
lines.push("");
|
|
119
|
+
|
|
120
|
+
return lines.join("\n");
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// ── Shared formatting helpers ────────────────────────────────────────
|
|
124
|
+
|
|
125
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: risk-level formatting with branching per level is clearer as one function
|
|
126
|
+
function addRiskSection(lines: string[], analysis: ImpactAnalysis, directCount: number): void {
|
|
127
|
+
lines.push("## Risk Assessment");
|
|
128
|
+
const { riskLevel, affectedFiles, affectedModules, downstreamCount } = analysis;
|
|
129
|
+
if (riskLevel === "low") {
|
|
130
|
+
lines.push(
|
|
131
|
+
`\`low\` — ${directCount} ref${directCount !== 1 ? "s" : ""}, local, no downstream dependents.`,
|
|
132
|
+
);
|
|
133
|
+
} else if (riskLevel === "medium") {
|
|
134
|
+
lines.push(
|
|
135
|
+
`\`medium\` — ${directCount} ref${directCount !== 1 ? "s" : ""} across ${affectedFiles.size} file${affectedFiles.size !== 1 ? "s" : ""}${downstreamCount > 0 ? `, ${downstreamCount} downstream` : ""}.`,
|
|
136
|
+
);
|
|
137
|
+
} else {
|
|
138
|
+
lines.push(
|
|
139
|
+
`\`high\` — ${directCount} ref${directCount !== 1 ? "s" : ""} across ${affectedFiles.size} file${affectedFiles.size !== 1 ? "s" : ""} in ${affectedModules.size} module${affectedModules.size !== 1 ? "s" : ""}${downstreamCount > 0 ? `, ${downstreamCount} downstream` : ""}.`,
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
lines.push("");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function addCheckNextSection(lines: string[], checkNext: string[]): void {
|
|
146
|
+
if (checkNext.length === 0) return;
|
|
147
|
+
lines.push("## Check Next");
|
|
148
|
+
for (const item of checkNext.slice(0, 3)) {
|
|
149
|
+
lines.push(`- ${item}`);
|
|
150
|
+
}
|
|
151
|
+
lines.push("");
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function addTestsSection(lines: string[], tests: string[]): void {
|
|
155
|
+
if (tests.length === 0) return;
|
|
156
|
+
lines.push("## Likely Tests");
|
|
157
|
+
for (const t of tests.slice(0, 3)) {
|
|
158
|
+
lines.push(`- \`${t}\``);
|
|
159
|
+
}
|
|
160
|
+
lines.push("");
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function pathRelative(cwd: string, file: string): string {
|
|
164
|
+
// Simple relative path computation
|
|
165
|
+
if (file.startsWith(cwd)) {
|
|
166
|
+
const rel = file.slice(cwd.length).replace(/^[/\\]/, "");
|
|
167
|
+
return rel || ".";
|
|
168
|
+
}
|
|
169
|
+
return file;
|
|
170
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// Brief markdown renderer — consumes use-case data and produces markdown content + details metadata.
|
|
2
|
+
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
import type { ArchitectureModel } from "../../architecture.ts";
|
|
5
|
+
import { findModuleForPath } from "../../architecture.ts";
|
|
6
|
+
import type { BriefDetails } from "../../types.ts";
|
|
7
|
+
|
|
8
|
+
// ── Anchored brief ───────────────────────────────────────────────────
|
|
9
|
+
|
|
10
|
+
interface TreeSitterContext {
|
|
11
|
+
nodeInfo: { type: string; text: string; startLine: number; startCharacter: number } | null;
|
|
12
|
+
outline: Array<{ name: string; kind: string; startLine: number; endLine: number }>;
|
|
13
|
+
imports: Array<{ moduleSpecifier: string }>;
|
|
14
|
+
exports: Array<{ name: string; kind: string }>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function renderAnchoredBrief(params: {
|
|
18
|
+
relPath: string;
|
|
19
|
+
line: number;
|
|
20
|
+
character: number;
|
|
21
|
+
context: TreeSitterContext;
|
|
22
|
+
model: ArchitectureModel | null;
|
|
23
|
+
details: BriefDetails;
|
|
24
|
+
cwd: string;
|
|
25
|
+
}): { content: string; details: BriefDetails } {
|
|
26
|
+
const lines: string[] = [];
|
|
27
|
+
lines.push(`# Anchored Brief: ${params.relPath}:${params.line}:${params.character}`);
|
|
28
|
+
lines.push("");
|
|
29
|
+
|
|
30
|
+
appendTreeSitterContext(lines, params.context, params.relPath, params.line, params.cwd);
|
|
31
|
+
|
|
32
|
+
if (params.model) {
|
|
33
|
+
const resolvedFile = path.resolve(params.cwd, params.relPath);
|
|
34
|
+
const mod = findModuleForPath(params.model, resolvedFile);
|
|
35
|
+
if (mod) {
|
|
36
|
+
const shortName = mod.name.replace(/^@[^/]+\//, "");
|
|
37
|
+
lines.push(`_Module: ${shortName} (\`${mod.relativePath}\`)_`);
|
|
38
|
+
lines.push("");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
appendNextQueries(lines, params.relPath, params.line, params.character);
|
|
43
|
+
|
|
44
|
+
return { content: lines.join("\n"), details: params.details };
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ── Symbol brief ──────────────────────────────────────────────────────
|
|
48
|
+
|
|
49
|
+
export function renderSymbolBrief(params: {
|
|
50
|
+
relPath: string;
|
|
51
|
+
symbolName: string;
|
|
52
|
+
targetLine: number;
|
|
53
|
+
targetCharacter: number;
|
|
54
|
+
targetKind: string | null;
|
|
55
|
+
context: TreeSitterContext;
|
|
56
|
+
model: ArchitectureModel | null;
|
|
57
|
+
details: BriefDetails;
|
|
58
|
+
cwd: string;
|
|
59
|
+
}): { content: string; details: BriefDetails } {
|
|
60
|
+
const lines: string[] = [];
|
|
61
|
+
lines.push(`# Symbol Brief: ${params.symbolName || params.relPath}`);
|
|
62
|
+
lines.push("");
|
|
63
|
+
lines.push(
|
|
64
|
+
`**Resolved to:** \`${params.relPath}:${params.targetLine}:${params.targetCharacter}\`${params.targetKind ? ` (${params.targetKind})` : ""}`,
|
|
65
|
+
);
|
|
66
|
+
lines.push("");
|
|
67
|
+
|
|
68
|
+
appendTreeSitterContext(lines, params.context, params.relPath, params.targetLine, params.cwd);
|
|
69
|
+
|
|
70
|
+
if (params.model) {
|
|
71
|
+
const resolvedFile = path.resolve(params.cwd, params.relPath);
|
|
72
|
+
const mod = findModuleForPath(params.model, resolvedFile);
|
|
73
|
+
if (mod) {
|
|
74
|
+
const shortName = mod.name.replace(/^@[^/]+\//, "");
|
|
75
|
+
lines.push(`_Module: ${shortName} (\`${mod.relativePath}\`)_`);
|
|
76
|
+
lines.push("");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
appendNextQueries(lines, params.relPath, params.targetLine, params.targetCharacter);
|
|
81
|
+
|
|
82
|
+
return { content: lines.join("\n"), details: params.details };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ── Tree-sitter context rendering ─────────────────────────────────────
|
|
86
|
+
|
|
87
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: tree-sitter context rendering with node/outline/imports/exports sections kept together for readability
|
|
88
|
+
// biome-ignore lint/complexity/useMaxParams: options-object refactor would reduce clarity for this rendering helper
|
|
89
|
+
function appendTreeSitterContext(
|
|
90
|
+
lines: string[],
|
|
91
|
+
context: TreeSitterContext,
|
|
92
|
+
relPath: string,
|
|
93
|
+
line: number,
|
|
94
|
+
_cwd: string,
|
|
95
|
+
): void {
|
|
96
|
+
if (context.nodeInfo) {
|
|
97
|
+
const node = context.nodeInfo;
|
|
98
|
+
lines.push(`**Node:** \`${node.type}\` at ${relPath}:${node.startLine}:${node.startCharacter}`);
|
|
99
|
+
if (node.text && node.text.length <= 200) {
|
|
100
|
+
lines.push("```");
|
|
101
|
+
lines.push(node.text);
|
|
102
|
+
lines.push("```");
|
|
103
|
+
}
|
|
104
|
+
lines.push("");
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (context.outline.length > 0) {
|
|
108
|
+
const enclosing = context.outline.find(
|
|
109
|
+
(item) => item.startLine <= line && item.endLine >= line,
|
|
110
|
+
);
|
|
111
|
+
if (enclosing) {
|
|
112
|
+
lines.push(`**Enclosing symbol:** \`${enclosing.name}\` (${enclosing.kind})`);
|
|
113
|
+
lines.push(`- Range: ${relPath}:${enclosing.startLine}–${enclosing.endLine}`);
|
|
114
|
+
lines.push("");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
lines.push("## File Outline");
|
|
118
|
+
const shown = context.outline.slice(0, 15);
|
|
119
|
+
for (const item of shown) {
|
|
120
|
+
const prefix = getOutlinePrefix(item.kind);
|
|
121
|
+
lines.push(`- ${prefix} \`${item.name}\` (${item.kind}) L${item.startLine}`);
|
|
122
|
+
}
|
|
123
|
+
if (context.outline.length > 15) {
|
|
124
|
+
lines.push(`- _+${context.outline.length - 15} more declarations_`);
|
|
125
|
+
}
|
|
126
|
+
lines.push("");
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (context.imports.length > 0) {
|
|
130
|
+
lines.push("## Imports");
|
|
131
|
+
const shown = context.imports.slice(0, 10);
|
|
132
|
+
for (const imp of shown) {
|
|
133
|
+
lines.push(`- \`${imp.moduleSpecifier}\``);
|
|
134
|
+
}
|
|
135
|
+
if (context.imports.length > 10) {
|
|
136
|
+
lines.push(`- _+${context.imports.length - 10} more_`);
|
|
137
|
+
}
|
|
138
|
+
lines.push("");
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (context.exports.length > 0) {
|
|
142
|
+
lines.push("## Exports");
|
|
143
|
+
const shown = context.exports.slice(0, 10);
|
|
144
|
+
for (const exp of shown) {
|
|
145
|
+
lines.push(`- \`${exp.name}\` (${exp.kind})`);
|
|
146
|
+
}
|
|
147
|
+
if (context.exports.length > 10) {
|
|
148
|
+
lines.push(`- _+${context.exports.length - 10} more_`);
|
|
149
|
+
}
|
|
150
|
+
lines.push("");
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function getOutlinePrefix(kind: string): string {
|
|
155
|
+
if (kind === "function" || kind === "method") return "ƒ";
|
|
156
|
+
if (kind === "class") return "◆";
|
|
157
|
+
return "·";
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function appendNextQueries(
|
|
161
|
+
lines: string[],
|
|
162
|
+
relPath: string,
|
|
163
|
+
line: number,
|
|
164
|
+
character: number,
|
|
165
|
+
): void {
|
|
166
|
+
lines.push("## Next");
|
|
167
|
+
lines.push(
|
|
168
|
+
`- \`code_relations\` with \`kind: "callers"\`, \`file: "${relPath}"\`, \`line: ${line}\`, and \`character: ${character}\` for call sites`,
|
|
169
|
+
);
|
|
170
|
+
lines.push(
|
|
171
|
+
`- \`code_affected\` with \`file: "${relPath}"\`, \`line: ${line}\`, and \`character: ${character}\` for impact analysis`,
|
|
172
|
+
);
|
|
173
|
+
lines.push("");
|
|
174
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Map markdown renderer — consumes MapData and produces markdown content + details metadata.
|
|
2
|
+
|
|
3
|
+
import type { MapDetails } from "../../types.ts";
|
|
4
|
+
import type { MapData, MapStats } from "../../use-case/generate-map.ts";
|
|
5
|
+
import { SOURCE_EXTENSIONS } from "../../use-case/generate-map.ts";
|
|
6
|
+
|
|
7
|
+
export function renderMap(data: MapData): { content: string; details: MapDetails } {
|
|
8
|
+
const content = formatMap(data.scope, data.stats);
|
|
9
|
+
const details: MapDetails = {
|
|
10
|
+
scope: data.scope,
|
|
11
|
+
totalFiles: data.stats.total,
|
|
12
|
+
childDirectoryCount: data.stats.byChildDir.size,
|
|
13
|
+
landmarkCount: data.stats.landmarkFiles.length,
|
|
14
|
+
nextQueries: ["`code_brief` for prioritized context on this scope"],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return { content, details };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function formatMap(scope: string, stats: MapStats): string {
|
|
21
|
+
const lines: string[] = [];
|
|
22
|
+
|
|
23
|
+
lines.push(`# Code Map: ${scope}`);
|
|
24
|
+
lines.push("");
|
|
25
|
+
lines.push(`**Files:** ${stats.total} total`);
|
|
26
|
+
for (const [ext, count] of [...stats.byExtension.entries()]
|
|
27
|
+
.sort((a, b) => b[1] - a[1])
|
|
28
|
+
.slice(0, 10)) {
|
|
29
|
+
const label = SOURCE_EXTENSIONS.get(ext) ?? (ext || "(no extension)");
|
|
30
|
+
lines.push(`- ${label}: ${count}`);
|
|
31
|
+
}
|
|
32
|
+
if (stats.byExtension.size > 10) {
|
|
33
|
+
lines.push(`- _+${stats.byExtension.size - 10} more extensions_`);
|
|
34
|
+
}
|
|
35
|
+
lines.push("");
|
|
36
|
+
|
|
37
|
+
if (stats.byChildDir.size > 0) {
|
|
38
|
+
lines.push("**Child directories:**");
|
|
39
|
+
for (const [dir, count] of [...stats.byChildDir.entries()].sort((a, b) => b[1] - a[1])) {
|
|
40
|
+
lines.push(`- ${dir}/ (${count} file${count !== 1 ? "s" : ""})`);
|
|
41
|
+
}
|
|
42
|
+
lines.push("");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (stats.landmarkFiles.length > 0) {
|
|
46
|
+
lines.push("**Landmark files:**");
|
|
47
|
+
for (const file of stats.landmarkFiles) {
|
|
48
|
+
lines.push(`- \`${file}\``);
|
|
49
|
+
}
|
|
50
|
+
lines.push("");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return lines.join("\n");
|
|
54
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Hidden overview markdown renderer for the first-turn session injection.
|
|
2
|
+
// Consumes OverviewData produced by the overview use-case.
|
|
3
|
+
|
|
4
|
+
import type { OverviewData } from "../../use-case/types.ts";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Render the compact architecture overview for first-turn session injection.
|
|
8
|
+
* Targets roughly 500 tokens.
|
|
9
|
+
*/
|
|
10
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: module-edge overview rendering with multiple formatting paths is clearer as one function
|
|
11
|
+
export function renderOverview(data: OverviewData): string {
|
|
12
|
+
const lines: string[] = [];
|
|
13
|
+
|
|
14
|
+
lines.push("# Project: Code Intelligence Overview");
|
|
15
|
+
lines.push("");
|
|
16
|
+
|
|
17
|
+
if (data.projectName) {
|
|
18
|
+
lines.push(
|
|
19
|
+
`**${data.projectName}**${data.projectDescription ? ` — ${data.projectDescription}` : ""}`,
|
|
20
|
+
);
|
|
21
|
+
lines.push("");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
lines.push("## Modules");
|
|
25
|
+
lines.push("");
|
|
26
|
+
|
|
27
|
+
for (const mod of data.modules) {
|
|
28
|
+
const deps = mod.internalDeps.filter((d) =>
|
|
29
|
+
data.modules.some((m) => m.name === d || m.shortName === d),
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
if (deps.length === 0) {
|
|
33
|
+
lines.push(
|
|
34
|
+
`- **${mod.shortName}**${mod.isLeaf ? " (leaf)" : ""}${mod.description ? ` — ${mod.description}` : ""}`,
|
|
35
|
+
);
|
|
36
|
+
} else {
|
|
37
|
+
const depNames = deps.slice(0, 4).map((d) => d.replace(/^@[^/]+\//, ""));
|
|
38
|
+
const depStr = depNames.join(", ");
|
|
39
|
+
const suffix = deps.length > 4 ? ` +${deps.length - 4} more` : "";
|
|
40
|
+
lines.push(
|
|
41
|
+
`- **${mod.shortName}** → ${depStr}${suffix}${mod.description ? ` — ${mod.description}` : ""}`,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (data.omittedModuleCount > 0) {
|
|
47
|
+
lines.push(`- _+${data.omittedModuleCount} more modules omitted_`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
lines.push("");
|
|
51
|
+
|
|
52
|
+
if (data.gitContextOverview) {
|
|
53
|
+
lines.push(data.gitContextOverview);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
lines.push("_Use `code_brief` for deeper context on any module or file._");
|
|
57
|
+
|
|
58
|
+
return lines.join("\n");
|
|
59
|
+
}
|