onbuzz 4.8.3 → 4.9.1
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/bin/cli.js +27 -1
- package/bin/composio-cli.js +431 -0
- package/package.json +1 -1
- package/scripts/build-onboarding-doc.cjs +805 -0
- package/scripts/composio-bench/README.md +151 -0
- package/scripts/memory-bench/bench.mjs +576 -0
- package/scripts/memory-bench/live-after-2026-05-21T16-20-52-767Z.json +150 -0
- package/scripts/memory-bench/live-after-2026-05-21T16-37-17-147Z.json +795 -0
- package/scripts/memory-bench/live-after-final-2026-05-21T17-16-02-947Z.json +766 -0
- package/scripts/memory-bench/live-after-v2-2026-05-21T16-52-26-833Z.json +890 -0
- package/scripts/memory-bench/live-after-v3-2026-05-21T17-05-40-622Z.json +955 -0
- package/scripts/memory-bench/live-probe-v2.mjs +412 -0
- package/scripts/memory-bench/live-probe.mjs +387 -0
- package/scripts/memory-bench/live-smoke-2026-05-21T16-22-35-945Z.json +36 -0
- package/scripts/memory-bench/live-smoke2-2026-05-21T16-24-14-095Z.json +36 -0
- package/scripts/memory-bench/live-smoke3-2026-05-21T16-26-54-093Z.json +123 -0
- package/scripts/memory-bench/live-v2-baseline-2026-05-23T22-43-20-757Z.json +628 -0
- package/scripts/memory-bench/live-v2-directive-2026-05-23T21-32-41-369Z.json +628 -0
- package/scripts/memory-bench/live-v2-smoke-2026-05-23T20-06-37-325Z.json +34 -0
- package/scripts/memory-bench/live-v2-smoke-2026-05-23T20-12-48-199Z.json +38 -0
- package/scripts/memory-bench/results-baseline-2026-05-19T11-23-12-245Z.json +39 -0
- package/scripts/memory-bench/results-baseline-2026-05-19T11-30-28-763Z.json +1024 -0
- package/scripts/memory-bench/results-baseline-2026-05-19T11-34-19-299Z.json +1007 -0
- package/scripts/memory-bench/results-baseline-2026-05-19T11-44-18-054Z.json +1432 -0
- package/scripts/memory-bench/results-nudge-combined-2026-05-19T12-00-37-465Z.json +1413 -0
- package/scripts/memory-bench/results-nudge-directive-2026-05-19T11-36-52-963Z.json +210 -0
- package/scripts/memory-bench/results-nudge-directive-2026-05-19T11-49-55-790Z.json +1464 -0
- package/scripts/memory-bench/results-nudge-echo-catalog-2026-05-19T11-39-01-829Z.json +232 -0
- package/scripts/memory-bench/results-nudge-echo-catalog-2026-05-19T11-55-12-705Z.json +1397 -0
- package/scripts/memory-bench/scenarios-v2.mjs +123 -0
- package/scripts/memory-bench/scenarios.mjs +178 -0
- package/scripts/office-bench/generate-samples.mjs +180 -0
- package/scripts/op-posture-bench/bench.mjs +397 -0
- package/scripts/op-posture-bench/probe.mjs +87 -0
- package/scripts/op-posture-bench/results-2026-05-18T20-29-13-941Z.json +57 -0
- package/scripts/op-posture-bench/results-2026-05-18T20-38-36-400Z.json +3071 -0
- package/scripts/op-posture-bench/scenarios.mjs +60 -0
- package/scripts/op-posture-bench/variants.mjs +68 -0
- package/scripts/stub-bench/bench.mjs +439 -0
- package/scripts/stub-bench/fixture/auth.js +41 -0
- package/scripts/stub-bench/results-2026-05-19T10-33-27-045Z.json +99 -0
- package/scripts/stub-bench/results-2026-05-19T10-35-08-240Z.json +920 -0
- package/scripts/stub-bench/results-2026-05-19T10-40-12-166Z.json +463 -0
- package/scripts/verify/azure-custom-embeddings.mjs +152 -0
- package/scripts/verify/azure-embeddings.mjs +146 -0
- package/scripts/verify/composio-toolkits.mjs +453 -0
- package/scripts/verify/local-embeddings.mjs +171 -0
- package/scripts/verify/openai-embeddings.mjs +140 -0
- package/src/__tests__/composioCliFlags.test.js +239 -0
- package/src/core/__tests__/agentScheduler.autoRecall.test.js +215 -0
- package/src/core/__tests__/agentScheduler.codebaseKnowledge.test.js +65 -0
- package/src/core/__tests__/agentScheduler.errorCategorisation.test.js +169 -0
- package/src/core/__tests__/agentScheduler.memoryInjection.test.js +78 -0
- package/src/core/agentPool.js +10 -0
- package/src/core/agentScheduler.js +273 -36
- package/src/index.js +82 -4
- package/src/interfaces/__tests__/bulkAgentRoute.test.js +290 -0
- package/src/interfaces/__tests__/composioRoutes.test.js +318 -0
- package/src/interfaces/webServer.js +436 -2
- package/src/interfaces/webServer.js.bak +7047 -0
- package/src/services/__tests__/aiService.core.test.js +420 -0
- package/src/services/__tests__/aiService.embed.test.js +172 -0
- package/src/services/__tests__/apiKeyManager.getEmbeddingApiKey.test.js +86 -0
- package/src/services/__tests__/codeMapStubRenderer.test.js +207 -0
- package/src/services/__tests__/codebaseKnowledgeService.test.js +427 -0
- package/src/services/__tests__/composioService.test.js +714 -0
- package/src/services/__tests__/memoryService.appendAndCatalog.test.js +139 -0
- package/src/services/__tests__/telegramService.test.js +91 -0
- package/src/services/aiService.js +137 -0
- package/src/services/apiKeyManager.js +61 -0
- package/src/services/codeMapStubRenderer.js +142 -0
- package/src/services/codebaseKnowledgeService.js +430 -0
- package/src/services/composioService.js +729 -0
- package/src/services/embeddings/__tests__/autoRecall.test.js +237 -0
- package/src/services/embeddings/__tests__/azureCustomProvider.test.js +232 -0
- package/src/services/embeddings/__tests__/cloudProviders.test.js +339 -0
- package/src/services/embeddings/__tests__/embeddingService.test.js +417 -0
- package/src/services/embeddings/__tests__/embeddingsConfig.test.js +182 -0
- package/src/services/embeddings/__tests__/inMemoryJsonStore.test.js +207 -0
- package/src/services/embeddings/__tests__/localProvider.test.js +263 -0
- package/src/services/embeddings/__tests__/providerInterface.test.js +209 -0
- package/src/services/embeddings/autoRecall.js +219 -0
- package/src/services/embeddings/embeddingService.js +452 -0
- package/src/services/embeddings/embeddingsConfig.js +203 -0
- package/src/services/embeddings/indexers/__tests__/agentIndexer.test.js +232 -0
- package/src/services/embeddings/indexers/__tests__/composioIndexer.test.js +265 -0
- package/src/services/embeddings/indexers/__tests__/memoryIndexer.test.js +418 -0
- package/src/services/embeddings/indexers/__tests__/reminisceIndexer.test.js +357 -0
- package/src/services/embeddings/indexers/__tests__/skillsIndexer.test.js +145 -0
- package/src/services/embeddings/indexers/__tests__/taskIndexer.test.js +146 -0
- package/src/services/embeddings/indexers/agentIndexer.js +249 -0
- package/src/services/embeddings/indexers/composioIndexer.js +279 -0
- package/src/services/embeddings/indexers/memoryIndexer.js +358 -0
- package/src/services/embeddings/indexers/reminisceIndexer.js +370 -0
- package/src/services/embeddings/indexers/skillsIndexer.js +154 -0
- package/src/services/embeddings/indexers/taskIndexer.js +155 -0
- package/src/services/embeddings/providerInterface.js +206 -0
- package/src/services/embeddings/providers/azureCustomProvider.js +154 -0
- package/src/services/embeddings/providers/azureProvider.js +122 -0
- package/src/services/embeddings/providers/cloudHttpTransport.js +205 -0
- package/src/services/embeddings/providers/localProvider.js +287 -0
- package/src/services/embeddings/providers/openaiProvider.js +101 -0
- package/src/services/embeddings/utilities/__tests__/textChunker.test.js +217 -0
- package/src/services/embeddings/utilities/textChunker.js +290 -0
- package/src/services/embeddings/vectorStore/__tests__/scoring.test.js +189 -0
- package/src/services/embeddings/vectorStore/inMemoryJsonStore.js +356 -0
- package/src/services/embeddings/vectorStore/scoring.js +128 -0
- package/src/services/embeddings/vectorStore/storeContractTests.js +179 -0
- package/src/services/embeddings/vectorStore/storeInterface.js +91 -0
- package/src/services/memoryService.js +98 -0
- package/src/services/telegramService.js +140 -1
- package/src/tools/__tests__/agentCommunicationTool.findAgent.test.js +226 -0
- package/src/tools/__tests__/agentCommunicationTool.test.js +17 -2
- package/src/tools/__tests__/baseTool.test.js +76 -10
- package/src/tools/__tests__/cloneDetectionTool.test.js +430 -0
- package/src/tools/__tests__/codeMapTool.pluralCanonical.test.js +83 -0
- package/src/tools/__tests__/composioTool.findAction.test.js +448 -0
- package/src/tools/__tests__/composioTool.test.js +499 -0
- package/src/tools/__tests__/dependencyResolverTool.test.js +567 -0
- package/src/tools/__tests__/docxTool.test.js +449 -0
- package/src/tools/__tests__/excelTool.test.js +486 -0
- package/src/tools/__tests__/importAnalyzerTool.test.js +368 -0
- package/src/tools/__tests__/memoryTool.forgetStale.test.js +272 -0
- package/src/tools/__tests__/memoryTool.pluralCanonical.test.js +189 -0
- package/src/tools/__tests__/memoryTool.reminisceSemanticSearch.test.js +301 -0
- package/src/tools/__tests__/memoryTool.semanticSearch.test.js +405 -0
- package/src/tools/__tests__/memoryTool.teamPool.test.js +293 -0
- package/src/tools/__tests__/memoryTool.test.js +1 -1
- package/src/tools/__tests__/officeTool.test.js +403 -0
- package/src/tools/__tests__/openaiFunctionSchemas.memoryReminisce.test.js +24 -25
- package/src/tools/__tests__/openaiFunctionSchemas.validity.test.js +268 -0
- package/src/tools/__tests__/pdfTool.test.js +457 -0
- package/src/tools/__tests__/singularToolReverseForgive.test.js +97 -0
- package/src/tools/__tests__/skillsTool.search.test.js +164 -0
- package/src/tools/__tests__/taskManagerTool.discipline.test.js +137 -0
- package/src/tools/__tests__/taskManagerTool.search.test.js +143 -0
- package/src/tools/__tests__/taskManagerTool.transition.test.js +236 -0
- package/src/tools/__tests__/toolShapeForgiveness.test.js +260 -0
- package/src/tools/agentCommunicationTool.js +120 -5
- package/src/tools/baseTool.js +28 -1
- package/src/tools/codeMapTool.js +1673 -1521
- package/src/tools/composioTool.js +617 -0
- package/src/tools/fileContentReplaceTool.js +893 -840
- package/src/tools/fileSystemTool.js +1372 -1314
- package/src/tools/fileTreeTool.js +7 -0
- package/src/tools/memoryTool.js +847 -82
- package/src/tools/office/officeDoc.js +425 -0
- package/src/tools/office/officePres.js +360 -0
- package/src/tools/office/officeSheet.js +350 -0
- package/src/tools/officeTool.js +313 -0
- package/src/tools/openaiFunctionSchemas.js +824 -44
- package/src/tools/platformControlTool.js +5 -0
- package/src/tools/seekTool.js +36 -1
- package/src/tools/skillsTool.js +133 -0
- package/src/tools/taskManagerTool.js +264 -16
- package/src/tools/terminalTool.js +23 -1
- package/src/tools/visionTool.js +7 -0
- package/src/tools/visualEditorTool.js +7 -0
- package/src/tools/webTool.js +28 -1
- package/src/tools/whatsappTool.js +7 -0
- package/src/utilities/authCache.js +47 -6
- package/src/utilities/authCache.js.backup-1779570472481 +121 -0
- package/src/utilities/toolConstants.js +3 -1
- package/web-ui/build/index.html +2 -2
- package/web-ui/build/static/1c-CTztA3Xo.js +1 -0
- package/web-ui/build/static/abap-BsUhLmBp.js +1 -0
- package/web-ui/build/static/abnf-CGKV2y5s.js +1 -0
- package/web-ui/build/static/abnf-vQPGuzu_.js +1 -0
- package/web-ui/build/static/accesslog-mUZocN9d.js +1 -0
- package/web-ui/build/static/actionscript-BmCHyr7v.js +1 -0
- package/web-ui/build/static/actionscript-Cc5vZvFE.js +1 -0
- package/web-ui/build/static/ada-BHR9NMNv.js +1 -0
- package/web-ui/build/static/ada-DnxQs2b9.js +1 -0
- package/web-ui/build/static/agda-CHEWVCEZ.js +1 -0
- package/web-ui/build/static/al-C0otNZjc.js +1 -0
- package/web-ui/build/static/angelscript-Co5e7ZdR.js +1 -0
- package/web-ui/build/static/antlr4-Dkky4AXR.js +1 -0
- package/web-ui/build/static/apache-BJkYIuV-.js +1 -0
- package/web-ui/build/static/apacheconf-XLif_lM5.js +1 -0
- package/web-ui/build/static/apex-DiKnugSK.js +1 -0
- package/web-ui/build/static/apl-R5OItFx8.js +1 -0
- package/web-ui/build/static/applescript-D8uiCoXI.js +1 -0
- package/web-ui/build/static/applescript-e5KOVzz4.js +1 -0
- package/web-ui/build/static/aql-Cvy5hwR1.js +1 -0
- package/web-ui/build/static/arcade-0iAjFk8w.js +1 -0
- package/web-ui/build/static/arduino-BJeuGqAT.js +1 -0
- package/web-ui/build/static/arduino-QJJjnM1j.js +1 -0
- package/web-ui/build/static/arff-C-i_E_-B.js +1 -0
- package/web-ui/build/static/armasm-ukFQKHGn.js +1 -0
- package/web-ui/build/static/asciidoc-B49qqHJJ.js +1 -0
- package/web-ui/build/static/asciidoc-Nkm1Ylrd.js +1 -0
- package/web-ui/build/static/asm6502-CMiM3nZs.js +1 -0
- package/web-ui/build/static/asmatmel-DG9XzIBf.js +1 -0
- package/web-ui/build/static/aspectj-DjRutrRk.js +1 -0
- package/web-ui/build/static/aspnet-DCNVRVi9.js +1 -0
- package/web-ui/build/static/autohotkey-C7eyvps0.js +1 -0
- package/web-ui/build/static/autohotkey-CiaZi-WO.js +1 -0
- package/web-ui/build/static/autoit-CaKUQkux.js +1 -0
- package/web-ui/build/static/autoit-D-CUHQgt.js +1 -0
- package/web-ui/build/static/avisynth-DFP3h4zu.js +1 -0
- package/web-ui/build/static/avrasm-BqvUj3fg.js +1 -0
- package/web-ui/build/static/avro-idl-D3l0ptuQ.js +1 -0
- package/web-ui/build/static/awk-BmDxAZFj.js +1 -0
- package/web-ui/build/static/axapta-B424jrgT.js +1 -0
- package/web-ui/build/static/bash-CgAffr8Z.js +1 -0
- package/web-ui/build/static/bash-D41aILLG.js +1 -0
- package/web-ui/build/static/basic-5DFTo35K.js +1 -0
- package/web-ui/build/static/basic-BONYG7D2.js +1 -0
- package/web-ui/build/static/batch-BnaDGMwS.js +1 -0
- package/web-ui/build/static/bbcode-Daujj4hU.js +1 -0
- package/web-ui/build/static/bicep-CXidcIK5.js +1 -0
- package/web-ui/build/static/birb-CcOzsnqB.js +1 -0
- package/web-ui/build/static/bison-rq0w5JFF.js +1 -0
- package/web-ui/build/static/bnf-C4uK1dK8.js +1 -0
- package/web-ui/build/static/bnf-CvXZ9crt.js +1 -0
- package/web-ui/build/static/brainfuck-B5Ezdg2y.js +1 -0
- package/web-ui/build/static/brainfuck-BZaTfZ97.js +1 -0
- package/web-ui/build/static/brightscript-D_2WBVxt.js +1 -0
- package/web-ui/build/static/bro-BD7GT6j_.js +1 -0
- package/web-ui/build/static/bsl-Bh-qcQ3w.js +1 -0
- package/web-ui/build/static/c-DNmZz1iT.js +1 -0
- package/web-ui/build/static/c-dUrSOcB2.js +1 -0
- package/web-ui/build/static/c-like-DfzKY8Uu.js +1 -0
- package/web-ui/build/static/cal-DgrFs4te.js +1 -0
- package/web-ui/build/static/capnproto-BxFR2k8w.js +1 -0
- package/web-ui/build/static/ceylon-B2Q7BIPM.js +1 -0
- package/web-ui/build/static/cfscript-DeaR8rww.js +1 -0
- package/web-ui/build/static/chaiscript-BeBIoz6b.js +1 -0
- package/web-ui/build/static/cil-YHiHOb4c.js +1 -0
- package/web-ui/build/static/clean-BgOl_0cN.js +1 -0
- package/web-ui/build/static/clojure-BlgOza7C.js +1 -0
- package/web-ui/build/static/clojure-PlKRYx3q.js +1 -0
- package/web-ui/build/static/clojure-repl-Dv2_THNB.js +1 -0
- package/web-ui/build/static/cmake-Ccf43gsy.js +1 -0
- package/web-ui/build/static/cmake-Dah_b5tK.js +1 -0
- package/web-ui/build/static/cobol-o9YRDzXA.js +1 -0
- package/web-ui/build/static/coffeescript-DTYLvxG9.js +1 -0
- package/web-ui/build/static/coffeescript-Dm4UcexP.js +1 -0
- package/web-ui/build/static/concurnas-1OxY7nFV.js +1 -0
- package/web-ui/build/static/coq-CvJBSoWT.js +1 -0
- package/web-ui/build/static/coq-DPZunybQ.js +1 -0
- package/web-ui/build/static/cos-BBstQgB4.js +1 -0
- package/web-ui/build/static/cpp-BR1pa5Wr.js +1 -0
- package/web-ui/build/static/cpp-C-_tTuKh.js +1 -0
- package/web-ui/build/static/crmsh-BIme7ihG.js +1 -0
- package/web-ui/build/static/crystal-C2hlJxaB.js +1 -0
- package/web-ui/build/static/crystal-Ca6D0fV7.js +1 -0
- package/web-ui/build/static/csharp-DGvdwvDH.js +1 -0
- package/web-ui/build/static/csharp-DbAjVltn.js +1 -0
- package/web-ui/build/static/cshtml-DVC84JPa.js +1 -0
- package/web-ui/build/static/csp-BawtG83z.js +1 -0
- package/web-ui/build/static/csp-BlaoxdTK.js +1 -0
- package/web-ui/build/static/css-52oqss7r.js +1 -0
- package/web-ui/build/static/css-extras-BoTVw2IW.js +1 -0
- package/web-ui/build/static/csv-nXBSv5kK.js +1 -0
- package/web-ui/build/static/cypher-WuesoPm2.js +1 -0
- package/web-ui/build/static/d-BmmTjwiV.js +1 -0
- package/web-ui/build/static/d-BwHf5A8R.js +1 -0
- package/web-ui/build/static/dart-BVZTRb8b.js +1 -0
- package/web-ui/build/static/dart-CbWzIBpX.js +1 -0
- package/web-ui/build/static/dataweave-qi_fpjJR.js +1 -0
- package/web-ui/build/static/dax-BpP02TD3.js +1 -0
- package/web-ui/build/static/delphi-TK0E0gLN.js +1 -0
- package/web-ui/build/static/dhall-jyNJwUbo.js +1 -0
- package/web-ui/build/static/diff-Dbu90HZq.js +1 -0
- package/web-ui/build/static/diff-Df6ezhAq.js +1 -0
- package/web-ui/build/static/django-BDy-xiWR.js +1 -0
- package/web-ui/build/static/django-CbmnWIX9.js +1 -0
- package/web-ui/build/static/dns-D_wmKRHl.js +1 -0
- package/web-ui/build/static/dns-zone-file-_1osc1Qk.js +1 -0
- package/web-ui/build/static/docker-D62hlkjX.js +1 -0
- package/web-ui/build/static/dockerfile-DQ080zHh.js +1 -0
- package/web-ui/build/static/dos-B5mA8Wna.js +1 -0
- package/web-ui/build/static/dot-D497WUfu.js +1 -0
- package/web-ui/build/static/dsconfig-dERMCQVk.js +1 -0
- package/web-ui/build/static/dts-DC3ujcbX.js +1 -0
- package/web-ui/build/static/dust-Bhm1VBQg.js +1 -0
- package/web-ui/build/static/ebnf-1lmwK0bv.js +1 -0
- package/web-ui/build/static/ebnf-qzzqKVXL.js +1 -0
- package/web-ui/build/static/editorconfig-CCe25wQr.js +1 -0
- package/web-ui/build/static/eiffel-BFOXbwEN.js +1 -0
- package/web-ui/build/static/ejs-D94vVkGZ.js +1 -0
- package/web-ui/build/static/elixir-B2W81YV0.js +1 -0
- package/web-ui/build/static/elixir-CD1szlP_.js +1 -0
- package/web-ui/build/static/elm-BUJhR-kM.js +1 -0
- package/web-ui/build/static/elm-DwLnLHSK.js +1 -0
- package/web-ui/build/static/erb-CcokD9Fu.js +1 -0
- package/web-ui/build/static/erb-lzhmSBEV.js +1 -0
- package/web-ui/build/static/erlang-C0jnu48-.js +1 -0
- package/web-ui/build/static/erlang-CrevXBnJ.js +1 -0
- package/web-ui/build/static/erlang-repl-CNY6yNoO.js +1 -0
- package/web-ui/build/static/etlua-BMO_ICdR.js +1 -0
- package/web-ui/build/static/excel-C5PbLrVC.js +1 -0
- package/web-ui/build/static/excel-formula-CX4pOnnV.js +1 -0
- package/web-ui/build/static/factor-bW3WUpa0.js +1 -0
- package/web-ui/build/static/false-CQx6Crbr.js +1 -0
- package/web-ui/build/static/firestore-security-rules-DT5oRNdf.js +1 -0
- package/web-ui/build/static/fix-C4IWe2LI.js +1 -0
- package/web-ui/build/static/flix-hi9-cLwA.js +1 -0
- package/web-ui/build/static/flow-CkX6DAhF.js +1 -0
- package/web-ui/build/static/fortran-C4rIX-2n.js +1 -0
- package/web-ui/build/static/fortran-Dvu3q_x_.js +1 -0
- package/web-ui/build/static/fsharp-Bwa1UrRI.js +1 -0
- package/web-ui/build/static/fsharp-CvadhLcA.js +1 -0
- package/web-ui/build/static/ftl-eFEI11YV.js +1 -0
- package/web-ui/build/static/gams-BxGx7deQ.js +1 -0
- package/web-ui/build/static/gap-Dcv7bqDd.js +1 -0
- package/web-ui/build/static/gauss-CcVoF4l8.js +1 -0
- package/web-ui/build/static/gcode-B1dc5sh5.js +1 -0
- package/web-ui/build/static/gcode-D5OxRG5t.js +1 -0
- package/web-ui/build/static/gdscript-CL-EA1wk.js +1 -0
- package/web-ui/build/static/gedcom-BbXrNsr0.js +1 -0
- package/web-ui/build/static/gherkin-B2wQMbT2.js +1 -0
- package/web-ui/build/static/gherkin-CnL4Y3j1.js +1 -0
- package/web-ui/build/static/git-DpdutSM5.js +1 -0
- package/web-ui/build/static/glsl-C7sgdZCA.js +1 -0
- package/web-ui/build/static/glsl-DVaNsn1Z.js +1 -0
- package/web-ui/build/static/gml-B_NppoA4.js +1 -0
- package/web-ui/build/static/gml-DFrn75UD.js +1 -0
- package/web-ui/build/static/gn-BhTU_aTW.js +1 -0
- package/web-ui/build/static/go-DKrUPrfb.js +1 -0
- package/web-ui/build/static/go-DLAYIsJl.js +1 -0
- package/web-ui/build/static/go-module-BXY6q1Ug.js +1 -0
- package/web-ui/build/static/golo-CKxjLRpC.js +1 -0
- package/web-ui/build/static/gradle-DN8lsmJj.js +1 -0
- package/web-ui/build/static/graphql-CMb_4vdm.js +1 -0
- package/web-ui/build/static/groovy-Bhi1VPv7.js +1 -0
- package/web-ui/build/static/groovy-D3X3r3EX.js +1 -0
- package/web-ui/build/static/haml-CvOCw9lL.js +1 -0
- package/web-ui/build/static/haml-DYs0wBJO.js +1 -0
- package/web-ui/build/static/handlebars-CLnuKGPm.js +1 -0
- package/web-ui/build/static/handlebars-CYGG_M1h.js +1 -0
- package/web-ui/build/static/haskell-0Ju0XclD.js +1 -0
- package/web-ui/build/static/haskell-CL5jUHSd.js +1 -0
- package/web-ui/build/static/haxe-BghRbBtK.js +1 -0
- package/web-ui/build/static/haxe-dfL7GzPv.js +1 -0
- package/web-ui/build/static/hcl-BZP2QME-.js +1 -0
- package/web-ui/build/static/hlsl-Djp0TiCX.js +1 -0
- package/web-ui/build/static/hoon-Df5gJVqA.js +1 -0
- package/web-ui/build/static/hpkp-Cy-hjB4V.js +1 -0
- package/web-ui/build/static/hsp-CntMIMs4.js +1 -0
- package/web-ui/build/static/hsts-BNBhETNx.js +1 -0
- package/web-ui/build/static/htmlbars-VCCYaDHA.js +1 -0
- package/web-ui/build/static/http-7DbskohZ.js +1 -0
- package/web-ui/build/static/http-BT5FYFAK.js +1 -0
- package/web-ui/build/static/hy-DuGSaK_b.js +1 -0
- package/web-ui/build/static/ichigojam-CjvnJmlr.js +1 -0
- package/web-ui/build/static/icon-BsBz6XP6.js +1 -0
- package/web-ui/build/static/icu-message-format-BEpv_nip.js +1 -0
- package/web-ui/build/static/idris-DiXQdMPU.js +1 -0
- package/web-ui/build/static/iecst-C9tYEzwP.js +1 -0
- package/web-ui/build/static/ignore-DNMpCRPN.js +1 -0
- package/web-ui/build/static/index-B-r71gxO.js +1 -0
- package/web-ui/build/static/index-CTtNXVAZ.js +1217 -0
- package/web-ui/build/static/index-DkBBEGYj.css +1 -0
- package/web-ui/build/static/index-PvzceRzr.js +13 -0
- package/web-ui/build/static/inform7-D38mj1Ty.js +1 -0
- package/web-ui/build/static/inform7-SwIRbrNQ.js +1 -0
- package/web-ui/build/static/ini-B9xO6J_m.js +1 -0
- package/web-ui/build/static/ini-zcp_esam.js +1 -0
- package/web-ui/build/static/io-C-Ay4jvg.js +1 -0
- package/web-ui/build/static/irpf90-BYnkitLq.js +1 -0
- package/web-ui/build/static/isbl-BYtdwd6v.js +1 -0
- package/web-ui/build/static/j-ByZQN5E4.js +1 -0
- package/web-ui/build/static/java-BNtb6JWL.js +1 -0
- package/web-ui/build/static/java-CQZL3scW.js +1 -0
- package/web-ui/build/static/javadoc-BciMZ8jg.js +1 -0
- package/web-ui/build/static/javadoclike-07BOTXmy.js +1 -0
- package/web-ui/build/static/javascript-CViZlg1q.js +1 -0
- package/web-ui/build/static/javastacktrace-bWyAK0up.js +1 -0
- package/web-ui/build/static/jboss-cli-hz5boSGB.js +1 -0
- package/web-ui/build/static/jexl-DdIINSXT.js +1 -0
- package/web-ui/build/static/jolie-CQnDX-f0.js +1 -0
- package/web-ui/build/static/jq-BzhF0CHG.js +1 -0
- package/web-ui/build/static/js-extras-jizEtT14.js +1 -0
- package/web-ui/build/static/js-templates-Dr1BqLAt.js +1 -0
- package/web-ui/build/static/jsdoc-CI-GPi6r.js +1 -0
- package/web-ui/build/static/json-2eDPxnHO.js +1 -0
- package/web-ui/build/static/json-BBqUMOAQ.js +1 -0
- package/web-ui/build/static/json5-CeIoln-Y.js +1 -0
- package/web-ui/build/static/jsonp-DWe9tbr2.js +1 -0
- package/web-ui/build/static/jsstacktrace-aE-go9tq.js +1 -0
- package/web-ui/build/static/jsx-BTXEPQYI.js +1 -0
- package/web-ui/build/static/julia-4VeOirXa.js +1 -0
- package/web-ui/build/static/julia-Da6yHEfz.js +1 -0
- package/web-ui/build/static/julia-repl-CFrizGkE.js +1 -0
- package/web-ui/build/static/keepalived-39SDM4j5.js +1 -0
- package/web-ui/build/static/keyman-DU5yOLYr.js +1 -0
- package/web-ui/build/static/kotlin-DJoqh3HG.js +1 -0
- package/web-ui/build/static/kotlin-DsKd3r_L.js +1 -0
- package/web-ui/build/static/kumir-CO96hby4.js +1 -0
- package/web-ui/build/static/kusto-DyuMf8l-.js +1 -0
- package/web-ui/build/static/lasso-BiPmQTXQ.js +1 -0
- package/web-ui/build/static/latex-Bd1ef5fi.js +1 -0
- package/web-ui/build/static/latex-DUrYkmWb.js +1 -0
- package/web-ui/build/static/latte-BSD-hpi5.js +1 -0
- package/web-ui/build/static/ldif-1ZMSg0qI.js +1 -0
- package/web-ui/build/static/leaf-Cg0eq01F.js +1 -0
- package/web-ui/build/static/less-BKcd1_xh.js +1 -0
- package/web-ui/build/static/less-SB5bcusC.js +1 -0
- package/web-ui/build/static/lilypond-BX_kuAqT.js +1 -0
- package/web-ui/build/static/liquid-C337T5bt.js +1 -0
- package/web-ui/build/static/lisp-B_bJRelF.js +1 -0
- package/web-ui/build/static/lisp-Du04Vdmx.js +1 -0
- package/web-ui/build/static/livecodeserver-BOkA9fV6.js +1 -0
- package/web-ui/build/static/livescript-DkMTCCBM.js +1 -0
- package/web-ui/build/static/livescript-rTaLq5oP.js +1 -0
- package/web-ui/build/static/llvm-BrBlvl5p.js +1 -0
- package/web-ui/build/static/llvm-DQbygw7z.js +1 -0
- package/web-ui/build/static/log-DoAzOt8c.js +1 -0
- package/web-ui/build/static/lolcode-DnB7KhRR.js +1 -0
- package/web-ui/build/static/lsl-DpzE7F5A.js +1 -0
- package/web-ui/build/static/lua-CIceROsO.js +1 -0
- package/web-ui/build/static/lua-DhnvJuMn.js +1 -0
- package/web-ui/build/static/magma-BwjzpKxi.js +1 -0
- package/web-ui/build/static/makefile-D10Y62dl.js +1 -0
- package/web-ui/build/static/makefile-esgkquGi.js +1 -0
- package/web-ui/build/static/markdown-B-Y7Y0Nn.js +1 -0
- package/web-ui/build/static/markdown-Cv3Onm-Q.js +1 -0
- package/web-ui/build/static/markup-templating-B1-9WWYa.js +1 -0
- package/web-ui/build/static/mathematica-gSyKdw2h.js +1 -0
- package/web-ui/build/static/matlab-6i1uXuBx.js +1 -0
- package/web-ui/build/static/matlab-CqcSZ1d9.js +1 -0
- package/web-ui/build/static/maxima-Bc-OnIOQ.js +1 -0
- package/web-ui/build/static/maxscript-Bce44o6c.js +1 -0
- package/web-ui/build/static/mel-0Jk3y-vw.js +1 -0
- package/web-ui/build/static/mel-DmA_8WPg.js +1 -0
- package/web-ui/build/static/mercury-DNdP1u-O.js +1 -0
- package/web-ui/build/static/mermaid-DrLkSIIb.js +1 -0
- package/web-ui/build/static/mipsasm-BIQVs3Ff.js +1 -0
- package/web-ui/build/static/mizar-BD5ZD_Rk.js +1 -0
- package/web-ui/build/static/mizar-DThX8Mdy.js +1 -0
- package/web-ui/build/static/mojolicious-Bra-ClwJ.js +1 -0
- package/web-ui/build/static/mongodb-DirByEEg.js +1 -0
- package/web-ui/build/static/monkey-C-Pvu43G.js +1 -0
- package/web-ui/build/static/monkey-n4IFmaA7.js +1 -0
- package/web-ui/build/static/moonscript-B1DM34lp.js +1 -0
- package/web-ui/build/static/moonscript-B82JBytX.js +1 -0
- package/web-ui/build/static/n1ql-C46iq3Hh.js +1 -0
- package/web-ui/build/static/n1ql-DOs3gJQo.js +1 -0
- package/web-ui/build/static/n4js-CPYgal3G.js +1 -0
- package/web-ui/build/static/nand2tetris-hdl-BhlUIq7M.js +1 -0
- package/web-ui/build/static/naniscript-D1YZXYcf.js +1 -0
- package/web-ui/build/static/nasm-2-TtCBo4.js +1 -0
- package/web-ui/build/static/neon-BzoXMDea.js +1 -0
- package/web-ui/build/static/nevod-DW_87wHj.js +1 -0
- package/web-ui/build/static/nginx-BgieYUhk.js +1 -0
- package/web-ui/build/static/nginx-DW0RVJbs.js +1 -0
- package/web-ui/build/static/nim-BbTa7YZN.js +1 -0
- package/web-ui/build/static/nim-VdXk3QT9.js +1 -0
- package/web-ui/build/static/nix-3tNNprEI.js +1 -0
- package/web-ui/build/static/nix-BDghlfzh.js +1 -0
- package/web-ui/build/static/node-repl-BBLv3tyt.js +1 -0
- package/web-ui/build/static/nsis-DxjfnSO8.js +1 -0
- package/web-ui/build/static/nsis-FY5xiiar.js +1 -0
- package/web-ui/build/static/objectivec-CXhf_sp_.js +1 -0
- package/web-ui/build/static/objectivec-DcRKjWcd.js +1 -0
- package/web-ui/build/static/ocaml-BLRL6Zro.js +1 -0
- package/web-ui/build/static/ocaml-C4S4QQtS.js +1 -0
- package/web-ui/build/static/opencl-ruEAYetM.js +1 -0
- package/web-ui/build/static/openqasm-D6r_FwIh.js +1 -0
- package/web-ui/build/static/openscad-BEPjoj_N.js +1 -0
- package/web-ui/build/static/oxygene-A61yc5Or.js +1 -0
- package/web-ui/build/static/oz-DICidCTs.js +1 -0
- package/web-ui/build/static/parigp-MjTNwy2s.js +1 -0
- package/web-ui/build/static/parser-DmI7lg_r.js +1 -0
- package/web-ui/build/static/parser3-Bv9kXAib.js +1 -0
- package/web-ui/build/static/pascal-B23PBLTj.js +1 -0
- package/web-ui/build/static/pascaligo-CPIJtX2C.js +1 -0
- package/web-ui/build/static/pcaxis-Bsj_6x8j.js +1 -0
- package/web-ui/build/static/peoplecode-VvQbMjsD.js +1 -0
- package/web-ui/build/static/perl-Cr6Y9-hl.js +1 -0
- package/web-ui/build/static/perl-D37oTJip.js +1 -0
- package/web-ui/build/static/pf-BKHaWcGm.js +1 -0
- package/web-ui/build/static/pgsql-ChusgWw2.js +1 -0
- package/web-ui/build/static/php-3Qr4hNV1.js +1 -0
- package/web-ui/build/static/php-CgxeEh4Y.js +1 -0
- package/web-ui/build/static/php-extras-DeLqwT6H.js +1 -0
- package/web-ui/build/static/php-template-DcOJxuIf.js +1 -0
- package/web-ui/build/static/phpdoc-amFph5Ax.js +1 -0
- package/web-ui/build/static/plaintext-mqBcO1hG.js +1 -0
- package/web-ui/build/static/plsql-ioyqfxP7.js +1 -0
- package/web-ui/build/static/pony-nxjy8Qot.js +1 -0
- package/web-ui/build/static/powerquery-Ci_Fxyg8.js +1 -0
- package/web-ui/build/static/powershell-CB_GgRqr.js +1 -0
- package/web-ui/build/static/powershell-au4fYIm7.js +1 -0
- package/web-ui/build/static/processing-Bkd3f-Wz.js +1 -0
- package/web-ui/build/static/processing-PgCPZm30.js +1 -0
- package/web-ui/build/static/profile-C2GBY6C9.js +1 -0
- package/web-ui/build/static/prolog-BRjYwjIO.js +1 -0
- package/web-ui/build/static/prolog-BheGlH8Q.js +1 -0
- package/web-ui/build/static/promql-CtCmTKys.js +1 -0
- package/web-ui/build/static/properties-BpLqVZha.js +1 -0
- package/web-ui/build/static/properties-UQxavHUY.js +1 -0
- package/web-ui/build/static/protobuf-BSuul6Uw.js +1 -0
- package/web-ui/build/static/protobuf-CLRi8VTE.js +1 -0
- package/web-ui/build/static/psl-CJsJilqO.js +1 -0
- package/web-ui/build/static/pug-5BY6sdv1.js +1 -0
- package/web-ui/build/static/puppet-DBg45gHV.js +1 -0
- package/web-ui/build/static/puppet-DPANCbOj.js +1 -0
- package/web-ui/build/static/pure-Cn4p-7Bj.js +1 -0
- package/web-ui/build/static/purebasic-CoXbIzZJ.js +1 -0
- package/web-ui/build/static/purebasic-DZ_eLoUV.js +1 -0
- package/web-ui/build/static/purescript-B98GoUb_.js +1 -0
- package/web-ui/build/static/python-B-Lm1OME.js +1 -0
- package/web-ui/build/static/python-C_ApFGS1.js +1 -0
- package/web-ui/build/static/python-repl-CJW5_RON.js +1 -0
- package/web-ui/build/static/q-BB2BYhxG.js +1 -0
- package/web-ui/build/static/q-DVqo_ScG.js +1 -0
- package/web-ui/build/static/qml-Co-8g096.js +1 -0
- package/web-ui/build/static/qml-Du0WFcoy.js +1 -0
- package/web-ui/build/static/qore-C6XBzy3U.js +1 -0
- package/web-ui/build/static/qsharp-BCMklAuq.js +1 -0
- package/web-ui/build/static/r-B5CGUQwN.js +1 -0
- package/web-ui/build/static/r-Dxhot-za.js +1 -0
- package/web-ui/build/static/racket-C0dCdrKh.js +1 -0
- package/web-ui/build/static/reason-DGJ1fFJs.js +1 -0
- package/web-ui/build/static/reasonml-gt_AvBg7.js +1 -0
- package/web-ui/build/static/regex-B5iNH8MZ.js +1 -0
- package/web-ui/build/static/rego-hfPajYet.js +1 -0
- package/web-ui/build/static/renpy-BkG5aM4I.js +1 -0
- package/web-ui/build/static/rest-C4uwtrF8.js +1 -0
- package/web-ui/build/static/rib-D32ew8Y7.js +1 -0
- package/web-ui/build/static/rip-BIEbWzxe.js +1 -0
- package/web-ui/build/static/roboconf-CMN8BoHf.js +1 -0
- package/web-ui/build/static/roboconf-GVMh3ioj.js +1 -0
- package/web-ui/build/static/robotframework-CUQybJQ9.js +1 -0
- package/web-ui/build/static/routeros-DUEdLmuc.js +1 -0
- package/web-ui/build/static/rsl-BsAePIwQ.js +1 -0
- package/web-ui/build/static/ruby-CZMMjJFw.js +1 -0
- package/web-ui/build/static/ruby-WOVZyoXO.js +1 -0
- package/web-ui/build/static/ruleslanguage-xV-HszUl.js +1 -0
- package/web-ui/build/static/rust-Da9GRxLz.js +1 -0
- package/web-ui/build/static/rust-uCND428m.js +1 -0
- package/web-ui/build/static/sas-BW15NPzf.js +1 -0
- package/web-ui/build/static/sas-DCx9gext.js +1 -0
- package/web-ui/build/static/sass-BMD7eETo.js +1 -0
- package/web-ui/build/static/scala-0wnxLTlF.js +1 -0
- package/web-ui/build/static/scala-D3Hk-q5-.js +1 -0
- package/web-ui/build/static/scheme-Ci9QOUcD.js +1 -0
- package/web-ui/build/static/scheme-CtqjB_HN.js +1 -0
- package/web-ui/build/static/scilab-CnITQd23.js +1 -0
- package/web-ui/build/static/scss-DCceV6xw.js +1 -0
- package/web-ui/build/static/scss-N5EuPQOS.js +1 -0
- package/web-ui/build/static/shell-BegJTton.js +1 -0
- package/web-ui/build/static/shell-session-BHBoosfJ.js +1 -0
- package/web-ui/build/static/smali-CoHePNQf.js +1 -0
- package/web-ui/build/static/smali-D64W1f0Y.js +1 -0
- package/web-ui/build/static/smalltalk-CagI-Ky8.js +1 -0
- package/web-ui/build/static/smalltalk-DHLuWDjp.js +1 -0
- package/web-ui/build/static/smarty-CSS2XBuu.js +1 -0
- package/web-ui/build/static/sml-D8Oyp9xr.js +1 -0
- package/web-ui/build/static/sml-DvC_VDmX.js +1 -0
- package/web-ui/build/static/solidity-DVkeulrL.js +1 -0
- package/web-ui/build/static/solution-file-Bd7qWzoo.js +1 -0
- package/web-ui/build/static/soy-BRSlVWf7.js +1 -0
- package/web-ui/build/static/sparql-DNnCQmqM.js +1 -0
- package/web-ui/build/static/splunk-spl-DXCDUv2Y.js +1 -0
- package/web-ui/build/static/sqf-C_IKzP5b.js +1 -0
- package/web-ui/build/static/sqf-DBqlUGoG.js +1 -0
- package/web-ui/build/static/sql-Dt3ZutCc.js +1 -0
- package/web-ui/build/static/sql-q0UMLqb7.js +1 -0
- package/web-ui/build/static/sql_more-DAuY5p3F.js +1 -0
- package/web-ui/build/static/squirrel-CgQZeaNT.js +1 -0
- package/web-ui/build/static/stan-D5kYsid7.js +1 -0
- package/web-ui/build/static/stan-JSHToKMA.js +1 -0
- package/web-ui/build/static/stata-DRVhVjVb.js +1 -0
- package/web-ui/build/static/step21-C7h5ssgs.js +1 -0
- package/web-ui/build/static/stylus-BXIDNFUe.js +1 -0
- package/web-ui/build/static/stylus-CyMBrStz.js +1 -0
- package/web-ui/build/static/subunit-Lbpuvy4t.js +1 -0
- package/web-ui/build/static/swift-BCxWOc8n.js +1 -0
- package/web-ui/build/static/swift-B_YEL6eF.js +1 -0
- package/web-ui/build/static/systemd-_zWfs8U5.js +1 -0
- package/web-ui/build/static/t4-cs-BCiVX6dp.js +1 -0
- package/web-ui/build/static/t4-templating-CDm61rWh.js +1 -0
- package/web-ui/build/static/t4-vb-OO2oZZrL.js +1 -0
- package/web-ui/build/static/taggerscript-CkXxiITO.js +1 -0
- package/web-ui/build/static/tap-C612JPhJ.js +1 -0
- package/web-ui/build/static/tap-J-zR66jL.js +1 -0
- package/web-ui/build/static/tcl-DIGan5K8.js +1 -0
- package/web-ui/build/static/tcl-SFVWFwbb.js +1 -0
- package/web-ui/build/static/textile-D0WxA5g8.js +1 -0
- package/web-ui/build/static/thrift-jboo4tJl.js +1 -0
- package/web-ui/build/static/toml-DIK32ROb.js +1 -0
- package/web-ui/build/static/tp-Bhs1iGD3.js +1 -0
- package/web-ui/build/static/tremor-4d_juLiN.js +1 -0
- package/web-ui/build/static/tsx-hEN3qQzd.js +1 -0
- package/web-ui/build/static/tt2-WU6EuPNO.js +1 -0
- package/web-ui/build/static/turtle-CUM3xwNI.js +1 -0
- package/web-ui/build/static/twig-B9JwTKv9.js +1 -0
- package/web-ui/build/static/twig-Crv6BtK7.js +1 -0
- package/web-ui/build/static/typescript-BmabW_ur.js +1 -0
- package/web-ui/build/static/typescript-oMKx2dph.js +1 -0
- package/web-ui/build/static/typoscript-X48MNTeK.js +1 -0
- package/web-ui/build/static/unrealscript-qnu9Ogmz.js +1 -0
- package/web-ui/build/static/uorazor-BicTvjGt.js +1 -0
- package/web-ui/build/static/uri-CyRoMB-u.js +1 -0
- package/web-ui/build/static/v-BDM6ZJR7.js +1 -0
- package/web-ui/build/static/vala-BWCf7DTx.js +1 -0
- package/web-ui/build/static/vala-COL5roWV.js +1 -0
- package/web-ui/build/static/vbnet-BHPgkiip.js +1 -0
- package/web-ui/build/static/vbnet-BadWmTKs.js +1 -0
- package/web-ui/build/static/vbscript-BfUpIAaV.js +1 -0
- package/web-ui/build/static/vbscript-html-BBR6zcvV.js +1 -0
- package/web-ui/build/static/velocity-k4gGPuiP.js +1 -0
- package/web-ui/build/static/verilog-BoNroxW8.js +1 -0
- package/web-ui/build/static/verilog-C7cplLIi.js +1 -0
- package/web-ui/build/static/vhdl-BrKkx69g.js +1 -0
- package/web-ui/build/static/vhdl-CWacsAXR.js +1 -0
- package/web-ui/build/static/vim-BcdueaEC.js +1 -0
- package/web-ui/build/static/vim-BwsUolG_.js +1 -0
- package/web-ui/build/static/visual-basic-DTXlX5HN.js +1 -0
- package/web-ui/build/static/warpscript-2w0_2KsB.js +1 -0
- package/web-ui/build/static/wasm-BPaXQO-A.js +1 -0
- package/web-ui/build/static/web-idl-BoCTFQod.js +1 -0
- package/web-ui/build/static/wiki-BkkCi9wm.js +1 -0
- package/web-ui/build/static/wolfram-CvRNTaAX.js +1 -0
- package/web-ui/build/static/wren-Bz8Smtz-.js +1 -0
- package/web-ui/build/static/x86asm-BM83B0N_.js +1 -0
- package/web-ui/build/static/xeora-BjuDukl7.js +1 -0
- package/web-ui/build/static/xl-ByiuKWwm.js +1 -0
- package/web-ui/build/static/xml-Dut2p53G.js +1 -0
- package/web-ui/build/static/xml-doc-CxgwiuaA.js +1 -0
- package/web-ui/build/static/xojo-CBqUB8JI.js +1 -0
- package/web-ui/build/static/xquery-D-agM4jx.js +1 -0
- package/web-ui/build/static/xquery-DL_eetrQ.js +1 -0
- package/web-ui/build/static/yaml-DZ7HVZSe.js +1 -0
- package/web-ui/build/static/yaml-DatJAv7_.js +1 -0
- package/web-ui/build/static/yang-D0nrKE-r.js +1 -0
- package/web-ui/build/static/zephir--M2g15-k.js +1 -0
- package/web-ui/build/static/zig-CK6rUH8E.js +1 -0
- package/web-ui/build/static/1c-DGpIT7i5.js +0 -1
- package/web-ui/build/static/abap-5wFDdWLh.js +0 -1
- package/web-ui/build/static/abnf-BP1dpNSE.js +0 -1
- package/web-ui/build/static/abnf-DBEIAl8g.js +0 -1
- package/web-ui/build/static/accesslog-CWSM_T5E.js +0 -1
- package/web-ui/build/static/actionscript-DONkco1J.js +0 -1
- package/web-ui/build/static/actionscript-FqBYk5er.js +0 -1
- package/web-ui/build/static/ada-C2JLRIaM.js +0 -1
- package/web-ui/build/static/ada-gKiygTRK.js +0 -1
- package/web-ui/build/static/agda-CkSODqK2.js +0 -1
- package/web-ui/build/static/al-BJ_YR6p7.js +0 -1
- package/web-ui/build/static/angelscript-Dg2byMGg.js +0 -1
- package/web-ui/build/static/antlr4-BnpyaFNr.js +0 -1
- package/web-ui/build/static/apache-Dffxsd7O.js +0 -1
- package/web-ui/build/static/apacheconf-DLitjtWj.js +0 -1
- package/web-ui/build/static/apex-Drr_IvU2.js +0 -1
- package/web-ui/build/static/apl-CF6qxmXG.js +0 -1
- package/web-ui/build/static/applescript-CjOlw3b_.js +0 -1
- package/web-ui/build/static/applescript-DjkSl1Ry.js +0 -1
- package/web-ui/build/static/aql-KwVmK1gP.js +0 -1
- package/web-ui/build/static/arcade-CENSXx0R.js +0 -1
- package/web-ui/build/static/arduino-B3Ta9Fll.js +0 -1
- package/web-ui/build/static/arduino-CzcsaB9_.js +0 -1
- package/web-ui/build/static/arff-CMJSVt_O.js +0 -1
- package/web-ui/build/static/armasm-0zSgSPB4.js +0 -1
- package/web-ui/build/static/asciidoc-B8K5ctWq.js +0 -1
- package/web-ui/build/static/asciidoc-bk2Sg6b6.js +0 -1
- package/web-ui/build/static/asm6502-ji6zm4FQ.js +0 -1
- package/web-ui/build/static/asmatmel-DJqObM4Y.js +0 -1
- package/web-ui/build/static/aspectj-DqQKI7J5.js +0 -1
- package/web-ui/build/static/aspnet-9cenTxW7.js +0 -1
- package/web-ui/build/static/autohotkey-C6EhiZvl.js +0 -1
- package/web-ui/build/static/autohotkey-sTGJOvMM.js +0 -1
- package/web-ui/build/static/autoit-B0Im8iQ1.js +0 -1
- package/web-ui/build/static/autoit-CO6pUD0H.js +0 -1
- package/web-ui/build/static/avisynth-OvOHTfj5.js +0 -1
- package/web-ui/build/static/avrasm-BLWZ5Mye.js +0 -1
- package/web-ui/build/static/avro-idl-BB2ODvnw.js +0 -1
- package/web-ui/build/static/awk-_jhMabQ0.js +0 -1
- package/web-ui/build/static/axapta-DdBRgoYy.js +0 -1
- package/web-ui/build/static/bash-CsaRGXBQ.js +0 -1
- package/web-ui/build/static/bash-CxLFkwAC.js +0 -1
- package/web-ui/build/static/basic-BJyy7JJE.js +0 -1
- package/web-ui/build/static/basic-CrMb-gv0.js +0 -1
- package/web-ui/build/static/batch-BvcykMe5.js +0 -1
- package/web-ui/build/static/bbcode-EOBuY5Y6.js +0 -1
- package/web-ui/build/static/bicep-QkDJBA34.js +0 -1
- package/web-ui/build/static/birb-TAOxKurn.js +0 -1
- package/web-ui/build/static/bison-BEK6cnad.js +0 -1
- package/web-ui/build/static/bnf-DfEODxsr.js +0 -1
- package/web-ui/build/static/bnf-DhbMjsuA.js +0 -1
- package/web-ui/build/static/brainfuck-BoVocOa7.js +0 -1
- package/web-ui/build/static/brainfuck-DDC5QXPK.js +0 -1
- package/web-ui/build/static/brightscript-DNN598w2.js +0 -1
- package/web-ui/build/static/bro-Cn_jjZ8P.js +0 -1
- package/web-ui/build/static/bsl-CMCN75Gu.js +0 -1
- package/web-ui/build/static/c-DbOGQnEJ.js +0 -1
- package/web-ui/build/static/c-kggwYFsy.js +0 -1
- package/web-ui/build/static/c-like-BIsuUvof.js +0 -1
- package/web-ui/build/static/cal-DpgMsBZE.js +0 -1
- package/web-ui/build/static/capnproto-C1AHYI-M.js +0 -1
- package/web-ui/build/static/ceylon-pvJffDe1.js +0 -1
- package/web-ui/build/static/cfscript-C1qylu52.js +0 -1
- package/web-ui/build/static/chaiscript-D417WKRI.js +0 -1
- package/web-ui/build/static/cil-CjbZHbcY.js +0 -1
- package/web-ui/build/static/clean-Dvc6R-F2.js +0 -1
- package/web-ui/build/static/clojure-CSVRQPMQ.js +0 -1
- package/web-ui/build/static/clojure-ig1Vkg7X.js +0 -1
- package/web-ui/build/static/clojure-repl-C1uyEabk.js +0 -1
- package/web-ui/build/static/cmake-DSbVcAB3.js +0 -1
- package/web-ui/build/static/cmake-Zp8kPwnH.js +0 -1
- package/web-ui/build/static/cobol-OsZSiK_P.js +0 -1
- package/web-ui/build/static/coffeescript-D8r0416S.js +0 -1
- package/web-ui/build/static/coffeescript-DCpgClxh.js +0 -1
- package/web-ui/build/static/concurnas-DKnsxUOc.js +0 -1
- package/web-ui/build/static/coq-BQFlywVI.js +0 -1
- package/web-ui/build/static/coq-BvS9mQB2.js +0 -1
- package/web-ui/build/static/cos-D3ze2791.js +0 -1
- package/web-ui/build/static/cpp-Bw-cV3P1.js +0 -1
- package/web-ui/build/static/cpp-vi1p7XpB.js +0 -1
- package/web-ui/build/static/crmsh-BClnJTeQ.js +0 -1
- package/web-ui/build/static/crystal-DGzOUYZq.js +0 -1
- package/web-ui/build/static/crystal-DMzk6EvA.js +0 -1
- package/web-ui/build/static/csharp-BTom8s2X.js +0 -1
- package/web-ui/build/static/csharp-Cp2V3jfR.js +0 -1
- package/web-ui/build/static/cshtml-Dmtt9Kto.js +0 -1
- package/web-ui/build/static/csp-WPVsLe9_.js +0 -1
- package/web-ui/build/static/csp-qddj5fu_.js +0 -1
- package/web-ui/build/static/css-B0FAm7kj.js +0 -1
- package/web-ui/build/static/css-extras-Bx3pvjiG.js +0 -1
- package/web-ui/build/static/csv-CH-edgS5.js +0 -1
- package/web-ui/build/static/cypher-c3G8Leew.js +0 -1
- package/web-ui/build/static/d-BMDSy22_.js +0 -1
- package/web-ui/build/static/d-BdH4oW8-.js +0 -1
- package/web-ui/build/static/dart-C-r72q-O.js +0 -1
- package/web-ui/build/static/dart-CwpBMrKa.js +0 -1
- package/web-ui/build/static/dataweave-BPvqdt4k.js +0 -1
- package/web-ui/build/static/dax-Eyy6ixcN.js +0 -1
- package/web-ui/build/static/delphi-DhEbPj_5.js +0 -1
- package/web-ui/build/static/dhall-Ct1L8sN1.js +0 -1
- package/web-ui/build/static/diff-CSTqCgwn.js +0 -1
- package/web-ui/build/static/diff-Da97B5vW.js +0 -1
- package/web-ui/build/static/django-DGit_lCg.js +0 -1
- package/web-ui/build/static/django-DPgqFB8k.js +0 -1
- package/web-ui/build/static/dns-DUyXuZ-a.js +0 -1
- package/web-ui/build/static/dns-zone-file-D79MDxVG.js +0 -1
- package/web-ui/build/static/docker-DTiy4o38.js +0 -1
- package/web-ui/build/static/dockerfile-CvwPP8wE.js +0 -1
- package/web-ui/build/static/dos-CaIUWxvb.js +0 -1
- package/web-ui/build/static/dot-D3504w6Y.js +0 -1
- package/web-ui/build/static/dsconfig-Smy1eeX_.js +0 -1
- package/web-ui/build/static/dts-DyTYSXZj.js +0 -1
- package/web-ui/build/static/dust-CrJyi6qA.js +0 -1
- package/web-ui/build/static/ebnf-C8nqfkBH.js +0 -1
- package/web-ui/build/static/ebnf-Cuh5Vh2-.js +0 -1
- package/web-ui/build/static/editorconfig-C7pTGl6n.js +0 -1
- package/web-ui/build/static/eiffel-C75MSJCA.js +0 -1
- package/web-ui/build/static/ejs-Dyo7DF5w.js +0 -1
- package/web-ui/build/static/elixir-D4yJefOc.js +0 -1
- package/web-ui/build/static/elixir-DKRow2SJ.js +0 -1
- package/web-ui/build/static/elm-CgbdDlkT.js +0 -1
- package/web-ui/build/static/elm-D3N-UgU0.js +0 -1
- package/web-ui/build/static/erb-BsITh8qW.js +0 -1
- package/web-ui/build/static/erb-lY_LyKyS.js +0 -1
- package/web-ui/build/static/erlang-BCnPiYmB.js +0 -1
- package/web-ui/build/static/erlang-JEghiPXc.js +0 -1
- package/web-ui/build/static/erlang-repl-DzU97ugC.js +0 -1
- package/web-ui/build/static/etlua-CsBo8cJa.js +0 -1
- package/web-ui/build/static/excel-formula-C2piiCYa.js +0 -1
- package/web-ui/build/static/excel-kqNypwQD.js +0 -1
- package/web-ui/build/static/factor-DZTOhkyU.js +0 -1
- package/web-ui/build/static/false-yLjhfaSw.js +0 -1
- package/web-ui/build/static/firestore-security-rules-oaQNoH8l.js +0 -1
- package/web-ui/build/static/fix-C9IfnTuS.js +0 -1
- package/web-ui/build/static/flix-EmJ_JhPo.js +0 -1
- package/web-ui/build/static/flow-DCUl7IAQ.js +0 -1
- package/web-ui/build/static/fortran-DvyxJmFN.js +0 -1
- package/web-ui/build/static/fortran-EEP9R3S5.js +0 -1
- package/web-ui/build/static/fsharp-D_98s3RX.js +0 -1
- package/web-ui/build/static/fsharp-Dt9jOO5G.js +0 -1
- package/web-ui/build/static/ftl-C8gMHWLo.js +0 -1
- package/web-ui/build/static/gams-BHxVPb4z.js +0 -1
- package/web-ui/build/static/gap-DFtyHk-q.js +0 -1
- package/web-ui/build/static/gauss-BwhJWUcg.js +0 -1
- package/web-ui/build/static/gcode-BvmXwp09.js +0 -1
- package/web-ui/build/static/gcode-gWcD6Vc7.js +0 -1
- package/web-ui/build/static/gdscript-btHoX8RE.js +0 -1
- package/web-ui/build/static/gedcom-MgPs9iqh.js +0 -1
- package/web-ui/build/static/gherkin-B9c_Q16A.js +0 -1
- package/web-ui/build/static/gherkin-BvOgkK6h.js +0 -1
- package/web-ui/build/static/git-D9XWOVcQ.js +0 -1
- package/web-ui/build/static/glsl-CshBHxHY.js +0 -1
- package/web-ui/build/static/glsl-fNRUMTDr.js +0 -1
- package/web-ui/build/static/gml-B78deHK8.js +0 -1
- package/web-ui/build/static/gml-Cj7d2u8O.js +0 -1
- package/web-ui/build/static/gn-CJLD-mF1.js +0 -1
- package/web-ui/build/static/go-CT93BEkL.js +0 -1
- package/web-ui/build/static/go-CTTlNuQO.js +0 -1
- package/web-ui/build/static/go-module-BgnXboUE.js +0 -1
- package/web-ui/build/static/golo-2S5tXS-l.js +0 -1
- package/web-ui/build/static/gradle-8W8DCcWJ.js +0 -1
- package/web-ui/build/static/graphql-DZfp6FNU.js +0 -1
- package/web-ui/build/static/groovy-BfsyMb3X.js +0 -1
- package/web-ui/build/static/groovy-Dxov7ENz.js +0 -1
- package/web-ui/build/static/haml-BlUFsdVV.js +0 -1
- package/web-ui/build/static/haml-CjVj6vvW.js +0 -1
- package/web-ui/build/static/handlebars-DxrQFkyA.js +0 -1
- package/web-ui/build/static/handlebars-FE6fotYl.js +0 -1
- package/web-ui/build/static/haskell-B6z0RCD_.js +0 -1
- package/web-ui/build/static/haskell-JBFmJTRy.js +0 -1
- package/web-ui/build/static/haxe-BtMZMi-_.js +0 -1
- package/web-ui/build/static/haxe-C1J8n-fH.js +0 -1
- package/web-ui/build/static/hcl-DJP-bFWE.js +0 -1
- package/web-ui/build/static/hlsl-DrGjhs1b.js +0 -1
- package/web-ui/build/static/hoon-Cg-ZhqIT.js +0 -1
- package/web-ui/build/static/hpkp-D07vgmoZ.js +0 -1
- package/web-ui/build/static/hsp-CsypPWoA.js +0 -1
- package/web-ui/build/static/hsts-B6DMRxvP.js +0 -1
- package/web-ui/build/static/htmlbars-BI7_Hw4e.js +0 -1
- package/web-ui/build/static/http-90ihEi4s.js +0 -1
- package/web-ui/build/static/http-Dp4QXj9E.js +0 -1
- package/web-ui/build/static/hy-BMgKvP4K.js +0 -1
- package/web-ui/build/static/ichigojam-D6wKvJDb.js +0 -1
- package/web-ui/build/static/icon-CrgkmCwl.js +0 -1
- package/web-ui/build/static/icu-message-format-Bi2JxCXs.js +0 -1
- package/web-ui/build/static/idris-DbUsyZt5.js +0 -1
- package/web-ui/build/static/iecst-CQZ9t8fW.js +0 -1
- package/web-ui/build/static/ignore-BaFgtNMs.js +0 -1
- package/web-ui/build/static/index-DEWSWosh.css +0 -1
- package/web-ui/build/static/index-Di1bjCFA.js +0 -13
- package/web-ui/build/static/index-otR_WSsL.js +0 -1
- package/web-ui/build/static/index-whZPU4as.js +0 -1183
- package/web-ui/build/static/inform7-ClyX1Gro.js +0 -1
- package/web-ui/build/static/inform7-tZHBS5XP.js +0 -1
- package/web-ui/build/static/ini-BrP5JNYL.js +0 -1
- package/web-ui/build/static/ini-CVkrAhwV.js +0 -1
- package/web-ui/build/static/io-BJ1Y6Bdc.js +0 -1
- package/web-ui/build/static/irpf90-fjjcKS_8.js +0 -1
- package/web-ui/build/static/isbl-ClpvfUIz.js +0 -1
- package/web-ui/build/static/j-CICW77xS.js +0 -1
- package/web-ui/build/static/java-B9DFK-0E.js +0 -1
- package/web-ui/build/static/java-BL_6rYko.js +0 -1
- package/web-ui/build/static/javadoc-Cc4HKpKK.js +0 -1
- package/web-ui/build/static/javadoclike-CgNkUDOm.js +0 -1
- package/web-ui/build/static/javascript-CM40ZECq.js +0 -1
- package/web-ui/build/static/javastacktrace-BHSqXfG5.js +0 -1
- package/web-ui/build/static/jboss-cli-Bv5NhVSZ.js +0 -1
- package/web-ui/build/static/jexl--Ohk_keA.js +0 -1
- package/web-ui/build/static/jolie-DMTN5Vdf.js +0 -1
- package/web-ui/build/static/jq-nXRLldXX.js +0 -1
- package/web-ui/build/static/js-extras-eLwv3frs.js +0 -1
- package/web-ui/build/static/js-templates-Ca0owlrg.js +0 -1
- package/web-ui/build/static/jsdoc-KERXp0da.js +0 -1
- package/web-ui/build/static/json-BTjLaRsy.js +0 -1
- package/web-ui/build/static/json-p7pU0qdW.js +0 -1
- package/web-ui/build/static/json5-Cxjy1udc.js +0 -1
- package/web-ui/build/static/jsonp-CO52H7Gy.js +0 -1
- package/web-ui/build/static/jsstacktrace-8YKfoyJP.js +0 -1
- package/web-ui/build/static/jsx-Ct_05KbM.js +0 -1
- package/web-ui/build/static/julia-23I1ubCE.js +0 -1
- package/web-ui/build/static/julia-d8rVGed_.js +0 -1
- package/web-ui/build/static/julia-repl-mwnHedW_.js +0 -1
- package/web-ui/build/static/keepalived-E85Rx_fF.js +0 -1
- package/web-ui/build/static/keyman-aWd3QUDq.js +0 -1
- package/web-ui/build/static/kotlin-Cu370hQq.js +0 -1
- package/web-ui/build/static/kotlin-DoJ2WnmZ.js +0 -1
- package/web-ui/build/static/kumir-oiOgqcQO.js +0 -1
- package/web-ui/build/static/kusto-Bp-B02K5.js +0 -1
- package/web-ui/build/static/lasso-BxoQVwOO.js +0 -1
- package/web-ui/build/static/latex-CANm5vsX.js +0 -1
- package/web-ui/build/static/latex-PMroeNch.js +0 -1
- package/web-ui/build/static/latte-2ErU_2XF.js +0 -1
- package/web-ui/build/static/ldif-ChPn_F7o.js +0 -1
- package/web-ui/build/static/leaf-UkCugDgG.js +0 -1
- package/web-ui/build/static/less-CCH5RA89.js +0 -1
- package/web-ui/build/static/less-CGZbVU1g.js +0 -1
- package/web-ui/build/static/lilypond-BoyM37sv.js +0 -1
- package/web-ui/build/static/liquid-DGJVpRBi.js +0 -1
- package/web-ui/build/static/lisp-93nne61u.js +0 -1
- package/web-ui/build/static/lisp-DYjIRsXz.js +0 -1
- package/web-ui/build/static/livecodeserver-CfNaxIE4.js +0 -1
- package/web-ui/build/static/livescript-C8kDlQkz.js +0 -1
- package/web-ui/build/static/livescript-CoarnRHq.js +0 -1
- package/web-ui/build/static/llvm-CBVyNmAh.js +0 -1
- package/web-ui/build/static/llvm-DGxq8a7u.js +0 -1
- package/web-ui/build/static/log-BivgwFql.js +0 -1
- package/web-ui/build/static/lolcode-l5sK2cZz.js +0 -1
- package/web-ui/build/static/lsl-Xm44xLRQ.js +0 -1
- package/web-ui/build/static/lua-CGvrzfKp.js +0 -1
- package/web-ui/build/static/lua-nHwXeY4c.js +0 -1
- package/web-ui/build/static/magma-DmNItmna.js +0 -1
- package/web-ui/build/static/makefile-CKJNNHGb.js +0 -1
- package/web-ui/build/static/makefile-DI6y5Qml.js +0 -1
- package/web-ui/build/static/markdown-BgpbxKd-.js +0 -1
- package/web-ui/build/static/markdown-CvcxA4yk.js +0 -1
- package/web-ui/build/static/markup-templating-DijqesiA.js +0 -1
- package/web-ui/build/static/mathematica-Cxll1Q10.js +0 -1
- package/web-ui/build/static/matlab-BJo2T1A-.js +0 -1
- package/web-ui/build/static/matlab-C6DlZX4l.js +0 -1
- package/web-ui/build/static/maxima-DJXO4sbL.js +0 -1
- package/web-ui/build/static/maxscript-DdLpUYBs.js +0 -1
- package/web-ui/build/static/mel-BIpfnSyZ.js +0 -1
- package/web-ui/build/static/mel-BYcTUZJW.js +0 -1
- package/web-ui/build/static/mercury-C_LSpbD8.js +0 -1
- package/web-ui/build/static/mermaid-D9yBWnrT.js +0 -1
- package/web-ui/build/static/mipsasm-nR_K2Ue-.js +0 -1
- package/web-ui/build/static/mizar-BeLUPncD.js +0 -1
- package/web-ui/build/static/mizar-BesIbZd9.js +0 -1
- package/web-ui/build/static/mojolicious-cBx3OWa-.js +0 -1
- package/web-ui/build/static/mongodb-DTWKy9ac.js +0 -1
- package/web-ui/build/static/monkey-B72bZC3c.js +0 -1
- package/web-ui/build/static/monkey-G9XELYPQ.js +0 -1
- package/web-ui/build/static/moonscript-BXYVQiqj.js +0 -1
- package/web-ui/build/static/moonscript-sDd-5knz.js +0 -1
- package/web-ui/build/static/n1ql-0vKSfFAO.js +0 -1
- package/web-ui/build/static/n1ql-C9_BSZfz.js +0 -1
- package/web-ui/build/static/n4js-B7Ct8dds.js +0 -1
- package/web-ui/build/static/nand2tetris-hdl-p9gpphTM.js +0 -1
- package/web-ui/build/static/naniscript-6ZVr8Aug.js +0 -1
- package/web-ui/build/static/nasm-Ca73yTUt.js +0 -1
- package/web-ui/build/static/neon-DNP49oyX.js +0 -1
- package/web-ui/build/static/nevod-Qhgt7Bce.js +0 -1
- package/web-ui/build/static/nginx-D5e7lu62.js +0 -1
- package/web-ui/build/static/nginx-DobnyESB.js +0 -1
- package/web-ui/build/static/nim-BPBivUOV.js +0 -1
- package/web-ui/build/static/nim-Baoug1Wa.js +0 -1
- package/web-ui/build/static/nix-CSPTQs5y.js +0 -1
- package/web-ui/build/static/nix-Dk4eNw49.js +0 -1
- package/web-ui/build/static/node-repl-NJNL8VFR.js +0 -1
- package/web-ui/build/static/nsis-BZ0oMzEw.js +0 -1
- package/web-ui/build/static/nsis-CKPCjtCU.js +0 -1
- package/web-ui/build/static/objectivec-BkfIRhhV.js +0 -1
- package/web-ui/build/static/objectivec-CnQgqhbJ.js +0 -1
- package/web-ui/build/static/ocaml-9rGNzRrK.js +0 -1
- package/web-ui/build/static/ocaml-CTolCqxL.js +0 -1
- package/web-ui/build/static/opencl-9Q3vRDxv.js +0 -1
- package/web-ui/build/static/openqasm-D2QiuFBp.js +0 -1
- package/web-ui/build/static/openscad-C3HyuzpB.js +0 -1
- package/web-ui/build/static/oxygene-4gi-VYy_.js +0 -1
- package/web-ui/build/static/oz-BGDEB-1A.js +0 -1
- package/web-ui/build/static/parigp-CfZzp1uE.js +0 -1
- package/web-ui/build/static/parser-UbGteTcy.js +0 -1
- package/web-ui/build/static/parser3-C-Jx-fy7.js +0 -1
- package/web-ui/build/static/pascal-D1_R0gW-.js +0 -1
- package/web-ui/build/static/pascaligo-B8C-98Np.js +0 -1
- package/web-ui/build/static/pcaxis-TGnlUKNs.js +0 -1
- package/web-ui/build/static/peoplecode-C5Vf1AH0.js +0 -1
- package/web-ui/build/static/perl-CBp1N62T.js +0 -1
- package/web-ui/build/static/perl-Z59j904t.js +0 -1
- package/web-ui/build/static/pf-Cq8B_xwQ.js +0 -1
- package/web-ui/build/static/pgsql-ofJbUHkL.js +0 -1
- package/web-ui/build/static/php-OlH7HLQJ.js +0 -1
- package/web-ui/build/static/php-extras-GqtrxLuk.js +0 -1
- package/web-ui/build/static/php-r09kMDOB.js +0 -1
- package/web-ui/build/static/php-template-18uT97Qo.js +0 -1
- package/web-ui/build/static/phpdoc-9tRFvup9.js +0 -1
- package/web-ui/build/static/plaintext-DsYT6Mu-.js +0 -1
- package/web-ui/build/static/plsql-RhWQNJVb.js +0 -1
- package/web-ui/build/static/pony-DD6JMLYI.js +0 -1
- package/web-ui/build/static/powerquery-CALow-bt.js +0 -1
- package/web-ui/build/static/powershell-C2QvIuKF.js +0 -1
- package/web-ui/build/static/powershell-yrbJEhCh.js +0 -1
- package/web-ui/build/static/processing-1T5w_Q03.js +0 -1
- package/web-ui/build/static/processing-DBim_dO-.js +0 -1
- package/web-ui/build/static/profile-Cdloh8mZ.js +0 -1
- package/web-ui/build/static/prolog-DRSsNnns.js +0 -1
- package/web-ui/build/static/prolog-D_ajweDr.js +0 -1
- package/web-ui/build/static/promql-BRuwn6Bn.js +0 -1
- package/web-ui/build/static/properties-D5Wyl4X4.js +0 -1
- package/web-ui/build/static/properties-kn4fl1bl.js +0 -1
- package/web-ui/build/static/protobuf-BMO76zWi.js +0 -1
- package/web-ui/build/static/protobuf-CTUCF-U-.js +0 -1
- package/web-ui/build/static/psl-CiqYdQbY.js +0 -1
- package/web-ui/build/static/pug-BLE2Qayj.js +0 -1
- package/web-ui/build/static/puppet-CFKLWXft.js +0 -1
- package/web-ui/build/static/puppet-DQci0Dl5.js +0 -1
- package/web-ui/build/static/pure-D2h_GynV.js +0 -1
- package/web-ui/build/static/purebasic-BF8MVw8V.js +0 -1
- package/web-ui/build/static/purebasic-BTtHiCkh.js +0 -1
- package/web-ui/build/static/purescript-D1ZSh-sH.js +0 -1
- package/web-ui/build/static/python-Cp9_Vdhb.js +0 -1
- package/web-ui/build/static/python-DdgNw8IW.js +0 -1
- package/web-ui/build/static/python-repl-DvK89VMC.js +0 -1
- package/web-ui/build/static/q-COaIgwhT.js +0 -1
- package/web-ui/build/static/q-Cm0dQkW8.js +0 -1
- package/web-ui/build/static/qml-BpsOqqJM.js +0 -1
- package/web-ui/build/static/qml-BziQXlU4.js +0 -1
- package/web-ui/build/static/qore-Cutz6g-2.js +0 -1
- package/web-ui/build/static/qsharp-B16619X1.js +0 -1
- package/web-ui/build/static/r-CFUIj5Hd.js +0 -1
- package/web-ui/build/static/r-CPrwCi5w.js +0 -1
- package/web-ui/build/static/racket-Bh08DFXF.js +0 -1
- package/web-ui/build/static/reason-BxjDq4e-.js +0 -1
- package/web-ui/build/static/reasonml-Ds5SsGP8.js +0 -1
- package/web-ui/build/static/regex-DhBIDIMI.js +0 -1
- package/web-ui/build/static/rego-DCwxZXcB.js +0 -1
- package/web-ui/build/static/renpy-C2fuQfqb.js +0 -1
- package/web-ui/build/static/rest-C52ZpxWQ.js +0 -1
- package/web-ui/build/static/rib-Cbl2Mzyj.js +0 -1
- package/web-ui/build/static/rip-BTOu5ZIE.js +0 -1
- package/web-ui/build/static/roboconf-3Oi2wuVk.js +0 -1
- package/web-ui/build/static/roboconf-ndLZLE39.js +0 -1
- package/web-ui/build/static/robotframework-BzHXiIj1.js +0 -1
- package/web-ui/build/static/routeros-CkpPoqx-.js +0 -1
- package/web-ui/build/static/rsl-C0bwOQ38.js +0 -1
- package/web-ui/build/static/ruby-C_hIhtuQ.js +0 -1
- package/web-ui/build/static/ruby-DvKfZPzj.js +0 -1
- package/web-ui/build/static/ruleslanguage-CbZJlddz.js +0 -1
- package/web-ui/build/static/rust-BFPIhB-X.js +0 -1
- package/web-ui/build/static/rust-sBpUq-qE.js +0 -1
- package/web-ui/build/static/sas-BCXvYN9x.js +0 -1
- package/web-ui/build/static/sas-D7GAsTY3.js +0 -1
- package/web-ui/build/static/sass-BdaErGMN.js +0 -1
- package/web-ui/build/static/scala-Cj81oCl9.js +0 -1
- package/web-ui/build/static/scala-CvbksfY6.js +0 -1
- package/web-ui/build/static/scheme-BM5ZqKnl.js +0 -1
- package/web-ui/build/static/scheme-BPvlu9Tk.js +0 -1
- package/web-ui/build/static/scilab-CJanLKQN.js +0 -1
- package/web-ui/build/static/scss-C53YF_7f.js +0 -1
- package/web-ui/build/static/scss-DPp8UZbr.js +0 -1
- package/web-ui/build/static/shell-CC9bQXMe.js +0 -1
- package/web-ui/build/static/shell-session-CuR3fbf-.js +0 -1
- package/web-ui/build/static/smali-CUgLls3D.js +0 -1
- package/web-ui/build/static/smali-YODSX8qt.js +0 -1
- package/web-ui/build/static/smalltalk-BMJQ4bbs.js +0 -1
- package/web-ui/build/static/smalltalk-BVGY3CTl.js +0 -1
- package/web-ui/build/static/smarty-C9aNt4-p.js +0 -1
- package/web-ui/build/static/sml-C3BIHhfq.js +0 -1
- package/web-ui/build/static/sml-DTipyRmY.js +0 -1
- package/web-ui/build/static/solidity-1yuPUqoC.js +0 -1
- package/web-ui/build/static/solution-file-BgzK4GOU.js +0 -1
- package/web-ui/build/static/soy-CFJXRvqc.js +0 -1
- package/web-ui/build/static/sparql-CAosYMpl.js +0 -1
- package/web-ui/build/static/splunk-spl-DkINtWr8.js +0 -1
- package/web-ui/build/static/sqf-DbrWIS2M.js +0 -1
- package/web-ui/build/static/sqf-nq8Q9J2W.js +0 -1
- package/web-ui/build/static/sql-9bwClhZQ.js +0 -1
- package/web-ui/build/static/sql-CqPkY-lX.js +0 -1
- package/web-ui/build/static/sql_more-CsY5ts77.js +0 -1
- package/web-ui/build/static/squirrel-BuqtzRBD.js +0 -1
- package/web-ui/build/static/stan-BNxBSglc.js +0 -1
- package/web-ui/build/static/stan-CZVMc34l.js +0 -1
- package/web-ui/build/static/stata-DKnVdHCd.js +0 -1
- package/web-ui/build/static/step21-Cu_TaBGF.js +0 -1
- package/web-ui/build/static/stylus-BS7-OJew.js +0 -1
- package/web-ui/build/static/stylus-DtFrp1Nk.js +0 -1
- package/web-ui/build/static/subunit-DDCoWkkc.js +0 -1
- package/web-ui/build/static/swift-BaguUZbl.js +0 -1
- package/web-ui/build/static/swift-mwBsb8Bx.js +0 -1
- package/web-ui/build/static/systemd-D6PpyDKk.js +0 -1
- package/web-ui/build/static/t4-cs-Cem8g4Ck.js +0 -1
- package/web-ui/build/static/t4-templating-BZo-HjmD.js +0 -1
- package/web-ui/build/static/t4-vb-B4oVnKa4.js +0 -1
- package/web-ui/build/static/taggerscript-DweAZ5pw.js +0 -1
- package/web-ui/build/static/tap-DpuvKHHF.js +0 -1
- package/web-ui/build/static/tap-hUKmJObZ.js +0 -1
- package/web-ui/build/static/tcl-BUvhAi7u.js +0 -1
- package/web-ui/build/static/tcl-Dsck63d8.js +0 -1
- package/web-ui/build/static/textile-CgKbqJ-j.js +0 -1
- package/web-ui/build/static/thrift-B5H6rApp.js +0 -1
- package/web-ui/build/static/toml-DggTpfOo.js +0 -1
- package/web-ui/build/static/tp-CazB2P2X.js +0 -1
- package/web-ui/build/static/tremor-B1jy7S5p.js +0 -1
- package/web-ui/build/static/tsx-BqF2lVDi.js +0 -1
- package/web-ui/build/static/tt2-BNoNXpEe.js +0 -1
- package/web-ui/build/static/turtle-B0evd5mn.js +0 -1
- package/web-ui/build/static/twig-B5A7nMdv.js +0 -1
- package/web-ui/build/static/twig-DZnLWvh8.js +0 -1
- package/web-ui/build/static/typescript-Bbe_P093.js +0 -1
- package/web-ui/build/static/typescript-BfhvmSSG.js +0 -1
- package/web-ui/build/static/typoscript-BjuZEIgw.js +0 -1
- package/web-ui/build/static/unrealscript-C3iUCFRi.js +0 -1
- package/web-ui/build/static/uorazor-CbZXwzIj.js +0 -1
- package/web-ui/build/static/uri-xMPSnp6m.js +0 -1
- package/web-ui/build/static/v-BKcGo5I6.js +0 -1
- package/web-ui/build/static/vala-BRoBE4am.js +0 -1
- package/web-ui/build/static/vala-B__Iyrma.js +0 -1
- package/web-ui/build/static/vbnet-DBxlMRvN.js +0 -1
- package/web-ui/build/static/vbnet-DjAXt5BE.js +0 -1
- package/web-ui/build/static/vbscript-BNA4oANi.js +0 -1
- package/web-ui/build/static/vbscript-html-o8ckLPKG.js +0 -1
- package/web-ui/build/static/velocity-D7sc5ggA.js +0 -1
- package/web-ui/build/static/verilog-BWJfMIng.js +0 -1
- package/web-ui/build/static/verilog-jW2GPC--.js +0 -1
- package/web-ui/build/static/vhdl-BIVlXRPa.js +0 -1
- package/web-ui/build/static/vhdl-BeqdhhxD.js +0 -1
- package/web-ui/build/static/vim-712lI4-g.js +0 -1
- package/web-ui/build/static/vim-DMROTzr0.js +0 -1
- package/web-ui/build/static/visual-basic-CQfbM-ta.js +0 -1
- package/web-ui/build/static/warpscript-DFAvCXFQ.js +0 -1
- package/web-ui/build/static/wasm-CiYoxBl0.js +0 -1
- package/web-ui/build/static/web-idl-DoCkPK8y.js +0 -1
- package/web-ui/build/static/wiki-bvz0AGzB.js +0 -1
- package/web-ui/build/static/wolfram-fBuyFEgU.js +0 -1
- package/web-ui/build/static/wren-DvATFxjF.js +0 -1
- package/web-ui/build/static/x86asm-r4bPbUR_.js +0 -1
- package/web-ui/build/static/xeora-B6iOnDJY.js +0 -1
- package/web-ui/build/static/xl-Ce6B5slc.js +0 -1
- package/web-ui/build/static/xml-DNjyPmhQ.js +0 -1
- package/web-ui/build/static/xml-doc-DydogmZD.js +0 -1
- package/web-ui/build/static/xojo-DCQLltvr.js +0 -1
- package/web-ui/build/static/xquery-C-fAnA0H.js +0 -1
- package/web-ui/build/static/xquery-CNeqzhLO.js +0 -1
- package/web-ui/build/static/yaml-BsVaGsk5.js +0 -1
- package/web-ui/build/static/yaml-kVZvwv_C.js +0 -1
- package/web-ui/build/static/yang-B_gq9JEq.js +0 -1
- package/web-ui/build/static/zephir-ECIXgXhX.js +0 -1
- package/web-ui/build/static/zig-DY325EKG.js +0 -1
package/src/tools/codeMapTool.js
CHANGED
|
@@ -1,1521 +1,1673 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file src/tools/codeMapTool.js
|
|
3
|
-
* @description Code Map Tool — structural code exploration with multi-level skeleton extraction
|
|
4
|
-
* and line-range reading. Enables agents to understand large codebases without reading entire files.
|
|
5
|
-
*
|
|
6
|
-
* Workflow: skeleton scan → identify interesting areas → read-range for details
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { BaseTool } from './baseTool.js';
|
|
10
|
-
import fs from 'fs';
|
|
11
|
-
import path from 'path';
|
|
12
|
-
import {
|
|
13
|
-
isWhitespace,
|
|
14
|
-
skipWhitespace,
|
|
15
|
-
readIdent,
|
|
16
|
-
startsWithKeyword,
|
|
17
|
-
consumeKeyword,
|
|
18
|
-
consumeAnyKeyword,
|
|
19
|
-
trimmedStartsWithAny,
|
|
20
|
-
indexOfWord,
|
|
21
|
-
containsWord,
|
|
22
|
-
stripStringsAndLineComments,
|
|
23
|
-
countChar,
|
|
24
|
-
consumeDottedAssignTail,
|
|
25
|
-
trimmedEndsWith,
|
|
26
|
-
isIdentStart,
|
|
27
|
-
isWordChar,
|
|
28
|
-
} from './parserHelpers.js';
|
|
29
|
-
|
|
30
|
-
const CODE_MAP_CONFIG = {
|
|
31
|
-
SUPPORTED_EXTENSIONS: new Set([
|
|
32
|
-
'.js', '.ts', '.jsx', '.tsx', '.mjs', '.cjs', '.py',
|
|
33
|
-
// C / C++ via a focused regex pass — see _parseC below. The
|
|
34
|
-
// proper tree-sitter migration that would replace the JS + Python
|
|
35
|
-
// regex parsers also covers these and adds full accuracy; this
|
|
36
|
-
// pass is the v1 that unblocks `code-map` on C/CPP codebases today.
|
|
37
|
-
'.c', '.h', '.cc', '.cpp', '.cxx', '.hpp', '.hh', '.hxx',
|
|
38
|
-
]),
|
|
39
|
-
MAX_FILES: 500,
|
|
40
|
-
MAX_FILE_SIZE: 5 * 1024 * 1024, // 5MB per file
|
|
41
|
-
MAX_READ_RANGE: 500, // Max lines per read-range call
|
|
42
|
-
MAX_DIRECTORY_DEPTH: 20,
|
|
43
|
-
VALID_LEVELS: ['A.0', 'A.1', 'B.0', 'B.1'],
|
|
44
|
-
DEFAULT_LEVEL: 'B.0',
|
|
45
|
-
SKIP_DIRS: new Set(['node_modules', '__pycache__', '.git', 'dist', 'build', 'coverage', '.next', '.nuxt'])
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
class CodeMapTool extends BaseTool {
|
|
49
|
-
constructor(config = {}, logger = null) {
|
|
50
|
-
super(config, logger);
|
|
51
|
-
|
|
52
|
-
this.id = 'code-map';
|
|
53
|
-
this.requiresProject = true;
|
|
54
|
-
this.isAsync = true;
|
|
55
|
-
this.timeout = config.timeout || 120000;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
getDescription() {
|
|
59
|
-
return `Code Map Tool: Explore code structure without reading entire files. Two-step workflow:
|
|
60
|
-
|
|
61
|
-
1. **skeleton** — Extract structural overview (signatures, classes, functions) with line numbers
|
|
62
|
-
2. **read-range** — Read specific line ranges identified from the skeleton
|
|
63
|
-
|
|
64
|
-
SKELETON LEVELS:
|
|
65
|
-
- A.0: Public/exported signatures only
|
|
66
|
-
- A.1: Public/exported signatures + comments/docstrings
|
|
67
|
-
- B.0: All signatures (public + private + methods) — DEFAULT
|
|
68
|
-
- B.1: All signatures + comments/docstrings
|
|
69
|
-
|
|
70
|
-
Supported files: .js, .ts, .jsx, .tsx, .mjs, .cjs, .py, .c, .h, .cc, .cpp, .cxx, .hpp, .hh, .hxx
|
|
71
|
-
Respects .gitignore rules. Skips node_modules, __pycache__, .git, dist, build.
|
|
72
|
-
|
|
73
|
-
USAGE — Skeleton scan:
|
|
74
|
-
\`\`\`json
|
|
75
|
-
{
|
|
76
|
-
"toolId": "code-map",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
\`\`\`
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</
|
|
117
|
-
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<
|
|
123
|
-
</
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
return
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
if (
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
try {
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
if (
|
|
746
|
-
|
|
747
|
-
return
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
if
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
if (
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
const
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
if (
|
|
836
|
-
return
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
/**
|
|
840
|
-
*
|
|
841
|
-
*
|
|
842
|
-
*
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
if (raw
|
|
865
|
-
|
|
866
|
-
if (
|
|
867
|
-
j
|
|
868
|
-
if (raw
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
if (raw
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
j =
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
if (
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
if (raw[
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
const
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
const
|
|
1273
|
-
if (
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
const
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
if (
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
pendingComments
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @file src/tools/codeMapTool.js
|
|
3
|
+
* @description Code Map Tool — structural code exploration with multi-level skeleton extraction
|
|
4
|
+
* and line-range reading. Enables agents to understand large codebases without reading entire files.
|
|
5
|
+
*
|
|
6
|
+
* Workflow: skeleton scan → identify interesting areas → read-range for details
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { BaseTool } from './baseTool.js';
|
|
10
|
+
import fs from 'fs';
|
|
11
|
+
import path from 'path';
|
|
12
|
+
import {
|
|
13
|
+
isWhitespace,
|
|
14
|
+
skipWhitespace,
|
|
15
|
+
readIdent,
|
|
16
|
+
startsWithKeyword,
|
|
17
|
+
consumeKeyword,
|
|
18
|
+
consumeAnyKeyword,
|
|
19
|
+
trimmedStartsWithAny,
|
|
20
|
+
indexOfWord,
|
|
21
|
+
containsWord,
|
|
22
|
+
stripStringsAndLineComments,
|
|
23
|
+
countChar,
|
|
24
|
+
consumeDottedAssignTail,
|
|
25
|
+
trimmedEndsWith,
|
|
26
|
+
isIdentStart,
|
|
27
|
+
isWordChar,
|
|
28
|
+
} from './parserHelpers.js';
|
|
29
|
+
|
|
30
|
+
const CODE_MAP_CONFIG = {
|
|
31
|
+
SUPPORTED_EXTENSIONS: new Set([
|
|
32
|
+
'.js', '.ts', '.jsx', '.tsx', '.mjs', '.cjs', '.py',
|
|
33
|
+
// C / C++ via a focused regex pass — see _parseC below. The
|
|
34
|
+
// proper tree-sitter migration that would replace the JS + Python
|
|
35
|
+
// regex parsers also covers these and adds full accuracy; this
|
|
36
|
+
// pass is the v1 that unblocks `code-map` on C/CPP codebases today.
|
|
37
|
+
'.c', '.h', '.cc', '.cpp', '.cxx', '.hpp', '.hh', '.hxx',
|
|
38
|
+
]),
|
|
39
|
+
MAX_FILES: 500,
|
|
40
|
+
MAX_FILE_SIZE: 5 * 1024 * 1024, // 5MB per file
|
|
41
|
+
MAX_READ_RANGE: 500, // Max lines per read-range call
|
|
42
|
+
MAX_DIRECTORY_DEPTH: 20,
|
|
43
|
+
VALID_LEVELS: ['A.0', 'A.1', 'B.0', 'B.1'],
|
|
44
|
+
DEFAULT_LEVEL: 'B.0',
|
|
45
|
+
SKIP_DIRS: new Set(['node_modules', '__pycache__', '.git', 'dist', 'build', 'coverage', '.next', '.nuxt'])
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
class CodeMapTool extends BaseTool {
|
|
49
|
+
constructor(config = {}, logger = null) {
|
|
50
|
+
super(config, logger);
|
|
51
|
+
|
|
52
|
+
this.id = 'code-map';
|
|
53
|
+
this.requiresProject = true;
|
|
54
|
+
this.isAsync = true;
|
|
55
|
+
this.timeout = config.timeout || 120000;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
getDescription() {
|
|
59
|
+
return `Code Map Tool: Explore code structure without reading entire files. Two-step workflow:
|
|
60
|
+
|
|
61
|
+
1. **skeleton** — Extract structural overview (signatures, classes, functions) with line numbers
|
|
62
|
+
2. **read-range** — Read specific line ranges identified from the skeleton
|
|
63
|
+
|
|
64
|
+
SKELETON LEVELS:
|
|
65
|
+
- A.0: Public/exported signatures only
|
|
66
|
+
- A.1: Public/exported signatures + comments/docstrings
|
|
67
|
+
- B.0: All signatures (public + private + methods) — DEFAULT
|
|
68
|
+
- B.1: All signatures + comments/docstrings
|
|
69
|
+
|
|
70
|
+
Supported files: .js, .ts, .jsx, .tsx, .mjs, .cjs, .py, .c, .h, .cc, .cpp, .cxx, .hpp, .hh, .hxx
|
|
71
|
+
Respects .gitignore rules. Skips node_modules, __pycache__, .git, dist, build.
|
|
72
|
+
|
|
73
|
+
USAGE — Skeleton scan (canonical plural — same shape across all tools):
|
|
74
|
+
\`\`\`json
|
|
75
|
+
{
|
|
76
|
+
"toolId": "code-map",
|
|
77
|
+
"actions": [
|
|
78
|
+
{"type": "skeleton", "path": "src/", "level": "B.0", "includeImports": false}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
\`\`\`
|
|
82
|
+
|
|
83
|
+
Single file:
|
|
84
|
+
\`\`\`json
|
|
85
|
+
{
|
|
86
|
+
"toolId": "code-map",
|
|
87
|
+
"actions": [
|
|
88
|
+
{"type": "skeleton", "path": "src/services/aiService.js", "level": "A.0"}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
\`\`\`
|
|
92
|
+
|
|
93
|
+
USAGE — Read specific lines (use line numbers from skeleton output):
|
|
94
|
+
\`\`\`json
|
|
95
|
+
{
|
|
96
|
+
"toolId": "code-map",
|
|
97
|
+
"actions": [
|
|
98
|
+
{"type": "read-range", "filePath": "src/services/aiService.js", "startLine": 42, "endLine": 90}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
\`\`\`
|
|
102
|
+
|
|
103
|
+
BATCH — skeleton one path AND read a range in one call:
|
|
104
|
+
\`\`\`json
|
|
105
|
+
{
|
|
106
|
+
"toolId": "code-map",
|
|
107
|
+
"actions": [
|
|
108
|
+
{"type": "skeleton", "path": "src/services/", "level": "A.0"},
|
|
109
|
+
{"type": "read-range", "filePath": "src/services/aiService.js", "startLine": 42, "endLine": 90}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
XML format also supported:
|
|
115
|
+
<code-map>
|
|
116
|
+
<action>skeleton</action>
|
|
117
|
+
<path>src/</path>
|
|
118
|
+
<level>B.0</level>
|
|
119
|
+
</code-map>
|
|
120
|
+
|
|
121
|
+
<code-map>
|
|
122
|
+
<action>read-range</action>
|
|
123
|
+
<file-path>src/index.js</file-path>
|
|
124
|
+
<start-line>100</start-line>
|
|
125
|
+
<end-line>150</end-line>
|
|
126
|
+
</code-map>`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
parseParameters(content) {
|
|
130
|
+
try {
|
|
131
|
+
if (content.trim().startsWith('{')) {
|
|
132
|
+
const parsed = JSON.parse(content);
|
|
133
|
+
return {
|
|
134
|
+
action: parsed.action || parsed.parameters?.action,
|
|
135
|
+
path: parsed.path || parsed.parameters?.path,
|
|
136
|
+
level: parsed.level || parsed.parameters?.level,
|
|
137
|
+
includeImports: parsed.includeImports ?? parsed.parameters?.includeImports ?? false,
|
|
138
|
+
filePath: parsed.filePath || parsed.parameters?.filePath,
|
|
139
|
+
startLine: parsed.startLine ?? parsed.parameters?.startLine,
|
|
140
|
+
endLine: parsed.endLine ?? parsed.parameters?.endLine
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// XML parsing
|
|
145
|
+
const params = {};
|
|
146
|
+
const actionMatch = /<action>(.*?)<\/action>/i.exec(content);
|
|
147
|
+
if (actionMatch) params.action = actionMatch[1].trim();
|
|
148
|
+
|
|
149
|
+
const pathMatch = /<path>(.*?)<\/path>/i.exec(content);
|
|
150
|
+
if (pathMatch) params.path = pathMatch[1].trim();
|
|
151
|
+
|
|
152
|
+
const levelMatch = /<level>(.*?)<\/level>/i.exec(content);
|
|
153
|
+
if (levelMatch) params.level = levelMatch[1].trim();
|
|
154
|
+
|
|
155
|
+
const importsMatch = /<include-imports>(.*?)<\/include-imports>/i.exec(content);
|
|
156
|
+
if (importsMatch) params.includeImports = importsMatch[1].trim() === 'true';
|
|
157
|
+
|
|
158
|
+
const filePathMatch = /<file-path>(.*?)<\/file-path>/i.exec(content);
|
|
159
|
+
if (filePathMatch) params.filePath = filePathMatch[1].trim();
|
|
160
|
+
|
|
161
|
+
const startLineMatch = /<start-line>(.*?)<\/start-line>/i.exec(content);
|
|
162
|
+
if (startLineMatch) params.startLine = parseInt(startLineMatch[1].trim(), 10);
|
|
163
|
+
|
|
164
|
+
const endLineMatch = /<end-line>(.*?)<\/end-line>/i.exec(content);
|
|
165
|
+
if (endLineMatch) params.endLine = parseInt(endLineMatch[1].trim(), 10);
|
|
166
|
+
|
|
167
|
+
return params;
|
|
168
|
+
} catch (error) {
|
|
169
|
+
this.logger?.error('Failed to parse code-map parameters', { error: error.message });
|
|
170
|
+
return { parseError: error.message };
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
getRequiredParameters() {
|
|
175
|
+
return ['action'];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
customValidateParameters(params) {
|
|
179
|
+
const errors = [];
|
|
180
|
+
const actions = this._normalizeToActions(params);
|
|
181
|
+
|
|
182
|
+
if (actions.length === 0) {
|
|
183
|
+
errors.push('action is required (skeleton or read-range), or `actions: [...]` for batched calls');
|
|
184
|
+
return { valid: false, errors };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
for (let i = 0; i < actions.length; i++) {
|
|
188
|
+
const a = actions[i];
|
|
189
|
+
const tag = actions.length > 1 ? `actions[${i}]: ` : '';
|
|
190
|
+
const type = a?.type;
|
|
191
|
+
if (!type) {
|
|
192
|
+
errors.push(`${tag}"type" is required (skeleton or read-range)`);
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
if (!['skeleton', 'read-range'].includes(type)) {
|
|
196
|
+
const lower = String(type).toLowerCase();
|
|
197
|
+
let hint = '';
|
|
198
|
+
if (lower === 'search' || lower === 'grep' || lower === 'find') {
|
|
199
|
+
hint = ' To search for text within files, use the `seek` tool (`{toolId: "seek", filePaths: ["**/*.js"], searchTerms: ["foo"]}`). code-map only extracts structure (skeleton) or reads specific ranges (read-range).';
|
|
200
|
+
} else if (lower === 'list' || lower === 'tree') {
|
|
201
|
+
hint = ' To list files/directories, use the `file-tree` tool. code-map is for parsing file contents.';
|
|
202
|
+
} else if (lower === 'read') {
|
|
203
|
+
hint = ' To read full file contents, use `filesystem` (`{toolId: "filesystem", actions: [{type: "read", filePath: "X"}]}`) or use code-map `read-range` for a specific line range.';
|
|
204
|
+
}
|
|
205
|
+
errors.push(`${tag}Invalid type "${type}". Must be "skeleton" or "read-range".${hint}`);
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
if (type === 'skeleton') {
|
|
209
|
+
if (!a.path) errors.push(`${tag}path is required for skeleton`);
|
|
210
|
+
if (a.level && !CODE_MAP_CONFIG.VALID_LEVELS.includes(String(a.level).toUpperCase())) {
|
|
211
|
+
errors.push(`${tag}Invalid level "${a.level}". Must be one of: ${CODE_MAP_CONFIG.VALID_LEVELS.join(', ')}`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (type === 'read-range') {
|
|
215
|
+
if (!a.filePath) errors.push(`${tag}filePath is required for read-range`);
|
|
216
|
+
if (a.startLine == null) errors.push(`${tag}startLine is required for read-range`);
|
|
217
|
+
if (a.endLine == null) errors.push(`${tag}endLine is required for read-range`);
|
|
218
|
+
if (a.startLine != null && a.endLine != null) {
|
|
219
|
+
if (a.startLine < 1) errors.push(`${tag}startLine must be >= 1`);
|
|
220
|
+
if (a.endLine < a.startLine) errors.push(`${tag}endLine must be >= startLine`);
|
|
221
|
+
if (a.endLine - a.startLine + 1 > CODE_MAP_CONFIG.MAX_READ_RANGE) {
|
|
222
|
+
errors.push(`${tag}Range too large. Maximum ${CODE_MAP_CONFIG.MAX_READ_RANGE} lines per request`);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return { valid: errors.length === 0, errors };
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
async execute(params, context) {
|
|
232
|
+
// PLURAL-CANONICAL DISPATCH — canonical shape is
|
|
233
|
+
// `{actions: [{type: "skeleton", path: "src/"}, ...]}` matching the
|
|
234
|
+
// rest of the tool conventions. Singular `{action, ...}` is auto-
|
|
235
|
+
// promoted as backward-compat. Multi-action batch returns an array.
|
|
236
|
+
const actions = this._normalizeToActions(params);
|
|
237
|
+
|
|
238
|
+
if (actions.length === 0) {
|
|
239
|
+
throw new Error('code-map tool requires either `action` (singular) or `actions` (plural array). Each action needs a `type` of "skeleton" or "read-range".');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Single-action path → return one result directly (back-compat).
|
|
243
|
+
if (actions.length === 1) {
|
|
244
|
+
return await this._dispatchSingleAction(actions[0], context);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Multi-action path → execute sequentially, return array of results.
|
|
248
|
+
const results = [];
|
|
249
|
+
for (const a of actions) {
|
|
250
|
+
try { results.push(await this._dispatchSingleAction(a, context)); }
|
|
251
|
+
catch (err) { results.push({ success: false, action: a.type, error: err.message }); }
|
|
252
|
+
}
|
|
253
|
+
return {
|
|
254
|
+
success: results.every(r => r.success !== false),
|
|
255
|
+
batched: true,
|
|
256
|
+
actionCount: results.length,
|
|
257
|
+
results,
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Promote any param shape into canonical actions[].
|
|
263
|
+
* @private
|
|
264
|
+
*/
|
|
265
|
+
_normalizeToActions(params) {
|
|
266
|
+
if (!params || typeof params !== 'object') return [];
|
|
267
|
+
if (Array.isArray(params.actions)) {
|
|
268
|
+
return params.actions.map(a => {
|
|
269
|
+
if (!a || typeof a !== 'object') return a;
|
|
270
|
+
if (!a.type && a.action) {
|
|
271
|
+
const { action, ...rest } = a;
|
|
272
|
+
return { type: action, ...rest };
|
|
273
|
+
}
|
|
274
|
+
return a;
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
if (params.action) {
|
|
278
|
+
const { action, parameters, ...rest } = params;
|
|
279
|
+
return [{ type: action, ...(parameters && typeof parameters === 'object' ? parameters : {}), ...rest }];
|
|
280
|
+
}
|
|
281
|
+
return [];
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Dispatch one normalized {type, ...} action with cache-aware
|
|
286
|
+
* lookup (codebase-knowledge service).
|
|
287
|
+
* @private
|
|
288
|
+
*/
|
|
289
|
+
async _dispatchSingleAction(action, context) {
|
|
290
|
+
// Adapt to the legacy flat params shape that the cache + execute
|
|
291
|
+
// helpers expect.
|
|
292
|
+
const params = { action: action.type, ...action };
|
|
293
|
+
delete params.type;
|
|
294
|
+
|
|
295
|
+
const { projectDir, directoryAccess, agentId } = context;
|
|
296
|
+
let workingDir = projectDir || process.cwd();
|
|
297
|
+
if (directoryAccess?.workingDirectory) workingDir = directoryAccess.workingDirectory;
|
|
298
|
+
const accessibleDirs = this._getAccessibleDirectories(directoryAccess, workingDir);
|
|
299
|
+
|
|
300
|
+
// Knowledge-cache lookup — Alt D's transparent layer. If this exact
|
|
301
|
+
// request (same file, same kind, same range) has been served before
|
|
302
|
+
// and the file hasn't been written to since, return cached content
|
|
303
|
+
// with a header. Agent can pass `force: true` to bypass. See
|
|
304
|
+
// services/codebaseKnowledgeService.js for design rationale.
|
|
305
|
+
//
|
|
306
|
+
// Best-effort: any error in cache lookup MUST fall through to the
|
|
307
|
+
// real fetch — never break the agent's turn.
|
|
308
|
+
let ks = null;
|
|
309
|
+
if (agentId && params?.force !== true) {
|
|
310
|
+
try {
|
|
311
|
+
const mod = await import('../services/codebaseKnowledgeService.js');
|
|
312
|
+
ks = mod.getCodebaseKnowledgeService(this.logger);
|
|
313
|
+
} catch (e) {
|
|
314
|
+
ks = null;
|
|
315
|
+
this.logger?.debug?.('codebase-knowledge service unavailable, skipping cache', { error: e.message });
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
switch (params.action) {
|
|
320
|
+
case 'skeleton': {
|
|
321
|
+
// Cache lookup (async — does an mtime stat for freshness)
|
|
322
|
+
if (ks && params.filePath) {
|
|
323
|
+
try {
|
|
324
|
+
const hit = await ks.lookupSkeleton(agentId, params.filePath, workingDir);
|
|
325
|
+
if (hit) {
|
|
326
|
+
return {
|
|
327
|
+
success: true,
|
|
328
|
+
action: 'skeleton',
|
|
329
|
+
filePath: params.filePath,
|
|
330
|
+
fromCache: true,
|
|
331
|
+
cacheNote: 'Returned from session cache. File unchanged since last fetch. Pass `force: true` if you need to re-parse.',
|
|
332
|
+
content: hit.content,
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
} catch (e) {
|
|
336
|
+
this.logger?.debug?.('codebase-knowledge lookupSkeleton failed (continuing with fresh fetch)', { error: e.message });
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
const result = await this._executeSkeleton(params, workingDir, accessibleDirs);
|
|
340
|
+
// Populate cache on success (async — captures mtime at record time)
|
|
341
|
+
if (ks && params.filePath && result?.success && typeof result.content === 'string') {
|
|
342
|
+
try { await ks.recordSkeleton(agentId, params.filePath, result.content, workingDir); }
|
|
343
|
+
catch (e) { this.logger?.debug?.('codebase-knowledge recordSkeleton failed', { error: e.message }); }
|
|
344
|
+
}
|
|
345
|
+
return result;
|
|
346
|
+
}
|
|
347
|
+
case 'read-range': {
|
|
348
|
+
const sl = Number(params.startLine), el = Number(params.endLine);
|
|
349
|
+
if (ks && params.filePath && Number.isFinite(sl) && Number.isFinite(el)) {
|
|
350
|
+
try {
|
|
351
|
+
const hit = await ks.lookupRange(agentId, params.filePath, sl, el, workingDir);
|
|
352
|
+
if (hit) {
|
|
353
|
+
return {
|
|
354
|
+
success: true,
|
|
355
|
+
action: 'read-range',
|
|
356
|
+
filePath: params.filePath,
|
|
357
|
+
startLine: sl, endLine: el,
|
|
358
|
+
fromCache: true,
|
|
359
|
+
cacheNote: 'Returned from session cache. File unchanged since last fetch.',
|
|
360
|
+
content: hit.content,
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
} catch (e) {
|
|
364
|
+
this.logger?.debug?.('codebase-knowledge lookupRange failed (continuing with fresh fetch)', { error: e.message });
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
const result = await this._executeReadRange(params, workingDir, accessibleDirs);
|
|
368
|
+
if (ks && params.filePath && Number.isFinite(sl) && Number.isFinite(el) && result?.success && typeof result.content === 'string') {
|
|
369
|
+
try { await ks.recordRange(agentId, params.filePath, sl, el, result.content, workingDir); }
|
|
370
|
+
catch (e) { this.logger?.debug?.('codebase-knowledge recordRange failed', { error: e.message }); }
|
|
371
|
+
}
|
|
372
|
+
return result;
|
|
373
|
+
}
|
|
374
|
+
default:
|
|
375
|
+
throw new Error(`Unknown action: ${params.action}`);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// ── Directory access helpers ──────────────────────────────────────────────
|
|
380
|
+
|
|
381
|
+
_getAccessibleDirectories(directoryAccess, fallbackDir) {
|
|
382
|
+
const dirs = new Set();
|
|
383
|
+
dirs.add(fallbackDir);
|
|
384
|
+
|
|
385
|
+
if (directoryAccess) {
|
|
386
|
+
if (directoryAccess.workingDirectory) dirs.add(directoryAccess.workingDirectory);
|
|
387
|
+
if (directoryAccess.readOnlyDirectories) {
|
|
388
|
+
for (const d of directoryAccess.readOnlyDirectories) dirs.add(d);
|
|
389
|
+
}
|
|
390
|
+
if (directoryAccess.writeEnabledDirectories) {
|
|
391
|
+
for (const d of directoryAccess.writeEnabledDirectories) dirs.add(d);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return Array.from(dirs);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
_isPathAccessible(targetPath, accessibleDirs) {
|
|
399
|
+
for (const dir of accessibleDirs) {
|
|
400
|
+
const relative = path.relative(dir, targetPath);
|
|
401
|
+
if (!relative.startsWith('..') && !path.isAbsolute(relative)) return true;
|
|
402
|
+
}
|
|
403
|
+
return false;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// ── Skeleton action ───────────────────────────────────────────────────────
|
|
407
|
+
|
|
408
|
+
async _executeSkeleton(params, workingDir, accessibleDirs) {
|
|
409
|
+
const targetPath = path.resolve(workingDir, params.path);
|
|
410
|
+
|
|
411
|
+
if (!this._isPathAccessible(targetPath, accessibleDirs)) {
|
|
412
|
+
throw new Error(`Path not accessible: ${params.path}`);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
const level = (params.level || CODE_MAP_CONFIG.DEFAULT_LEVEL).toUpperCase();
|
|
416
|
+
const publicOnly = level.startsWith('A');
|
|
417
|
+
const withComments = level.endsWith('.1');
|
|
418
|
+
const includeImports = params.includeImports || false;
|
|
419
|
+
const parseOptions = { publicOnly, withComments, includeImports };
|
|
420
|
+
|
|
421
|
+
let stat;
|
|
422
|
+
try {
|
|
423
|
+
stat = await fs.promises.stat(targetPath);
|
|
424
|
+
} catch {
|
|
425
|
+
throw new Error(`Path not found: ${params.path}`);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
let files;
|
|
429
|
+
if (stat.isFile()) {
|
|
430
|
+
const ext = path.extname(targetPath).toLowerCase();
|
|
431
|
+
if (!CODE_MAP_CONFIG.SUPPORTED_EXTENSIONS.has(ext)) {
|
|
432
|
+
throw new Error(`Unsupported file type: ${ext}. Supported: ${[...CODE_MAP_CONFIG.SUPPORTED_EXTENSIONS].join(', ')}`);
|
|
433
|
+
}
|
|
434
|
+
files = [targetPath];
|
|
435
|
+
} else {
|
|
436
|
+
files = await this._discoverFiles(targetPath, accessibleDirs);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
if (files.length === 0) {
|
|
440
|
+
return {
|
|
441
|
+
success: true,
|
|
442
|
+
action: 'skeleton',
|
|
443
|
+
level,
|
|
444
|
+
path: params.path,
|
|
445
|
+
files: [],
|
|
446
|
+
totalFiles: 0,
|
|
447
|
+
totalEntries: 0,
|
|
448
|
+
message: 'No supported files found in the specified path.',
|
|
449
|
+
guidance: 'Try a different path or verify the directory contains supported files (.js, .ts, .jsx, .tsx, .mjs, .cjs, .py, .c, .h, .cc, .cpp, .cxx, .hpp, .hh, .hxx).'
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
if (files.length > CODE_MAP_CONFIG.MAX_FILES) {
|
|
454
|
+
files = files.slice(0, CODE_MAP_CONFIG.MAX_FILES);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
const basePath = stat.isDirectory() ? targetPath : path.dirname(targetPath);
|
|
458
|
+
const result = [];
|
|
459
|
+
let totalEntries = 0;
|
|
460
|
+
|
|
461
|
+
for (const file of files) {
|
|
462
|
+
try {
|
|
463
|
+
const fileStat = await fs.promises.stat(file);
|
|
464
|
+
if (fileStat.size > CODE_MAP_CONFIG.MAX_FILE_SIZE) continue;
|
|
465
|
+
|
|
466
|
+
const content = await fs.promises.readFile(file, 'utf-8');
|
|
467
|
+
const lines = content.replace(/\r\n/g, '\n').replace(/\r/g, '\n').split('\n');
|
|
468
|
+
const lang = this._langOf(file);
|
|
469
|
+
|
|
470
|
+
const entries =
|
|
471
|
+
lang === 'python' ? this._parsePython(lines, parseOptions) :
|
|
472
|
+
lang === 'c' ? this._parseC(lines, parseOptions) :
|
|
473
|
+
this._parseJS(lines, parseOptions);
|
|
474
|
+
|
|
475
|
+
if (entries.length === 0) continue;
|
|
476
|
+
|
|
477
|
+
const relPath = path.relative(basePath, file);
|
|
478
|
+
result.push({
|
|
479
|
+
file: relPath,
|
|
480
|
+
totalLines: lines.length,
|
|
481
|
+
entries
|
|
482
|
+
});
|
|
483
|
+
totalEntries += entries.length;
|
|
484
|
+
} catch (err) {
|
|
485
|
+
this.logger?.debug(`Skipping file ${file}: ${err.message}`);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
return {
|
|
490
|
+
success: true,
|
|
491
|
+
action: 'skeleton',
|
|
492
|
+
level,
|
|
493
|
+
path: params.path,
|
|
494
|
+
files: result,
|
|
495
|
+
totalFiles: result.length,
|
|
496
|
+
totalEntries,
|
|
497
|
+
guidance: totalEntries > 0
|
|
498
|
+
? (() => {
|
|
499
|
+
const sampleFile = result[0];
|
|
500
|
+
const sampleLine = sampleFile?.entries[0]?.line || 1;
|
|
501
|
+
const examplePath = stat.isDirectory()
|
|
502
|
+
? (params.path.endsWith('/') ? params.path : params.path + '/') + sampleFile.file
|
|
503
|
+
: params.path;
|
|
504
|
+
return `Found ${totalEntries} entries across ${result.length} files. Use code-map read-range to examine specific sections by line number. Example: {"toolId":"code-map","parameters":{"action":"read-range","filePath":"${examplePath}","startLine":${sampleLine},"endLine":${sampleLine + 30}}}`;
|
|
505
|
+
})()
|
|
506
|
+
: 'No code signatures found at this level. Try level B.0 or B.1 for more detail.'
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// ── Read-range action ─────────────────────────────────────────────────────
|
|
511
|
+
|
|
512
|
+
async _executeReadRange(params, workingDir, accessibleDirs) {
|
|
513
|
+
const filePath = path.resolve(workingDir, params.filePath);
|
|
514
|
+
|
|
515
|
+
if (!this._isPathAccessible(filePath, accessibleDirs)) {
|
|
516
|
+
throw new Error(`Path not accessible: ${params.filePath}`);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
let content;
|
|
520
|
+
try {
|
|
521
|
+
content = await fs.promises.readFile(filePath, 'utf-8');
|
|
522
|
+
} catch {
|
|
523
|
+
throw new Error(`File not found: ${params.filePath}`);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
const allLines = content.replace(/\r\n/g, '\n').replace(/\r/g, '\n').split('\n');
|
|
527
|
+
const totalLines = allLines.length;
|
|
528
|
+
const startLine = Math.max(1, params.startLine);
|
|
529
|
+
const endLine = Math.min(totalLines, params.endLine);
|
|
530
|
+
|
|
531
|
+
if (startLine > totalLines) {
|
|
532
|
+
throw new Error(`startLine ${startLine} exceeds file length (${totalLines} lines)`);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
const selectedLines = allLines.slice(startLine - 1, endLine);
|
|
536
|
+
const maxWidth = String(endLine).length;
|
|
537
|
+
const formatted = selectedLines.map((line, i) => {
|
|
538
|
+
const num = String(startLine + i).padStart(maxWidth);
|
|
539
|
+
return `${num}│${line}`;
|
|
540
|
+
}).join('\n');
|
|
541
|
+
|
|
542
|
+
return {
|
|
543
|
+
success: true,
|
|
544
|
+
action: 'read-range',
|
|
545
|
+
filePath: params.filePath,
|
|
546
|
+
startLine,
|
|
547
|
+
endLine,
|
|
548
|
+
linesReturned: selectedLines.length,
|
|
549
|
+
totalLines,
|
|
550
|
+
content: formatted,
|
|
551
|
+
guidance: `Showing lines ${startLine}-${endLine} of ${totalLines}. ` +
|
|
552
|
+
(endLine < totalLines
|
|
553
|
+
? `Use read-range with startLine:${endLine + 1} to continue reading. `
|
|
554
|
+
: '') +
|
|
555
|
+
'Use code-map skeleton to discover more code structure in other files.'
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// ── File discovery with .gitignore ────────────────────────────────────────
|
|
560
|
+
|
|
561
|
+
async _discoverFiles(rootDir, accessibleDirs) {
|
|
562
|
+
const gi = await this._loadGitignoreRules(rootDir);
|
|
563
|
+
const results = [];
|
|
564
|
+
let depth = 0;
|
|
565
|
+
|
|
566
|
+
const walk = async (dir) => {
|
|
567
|
+
if (depth > CODE_MAP_CONFIG.MAX_DIRECTORY_DEPTH) return;
|
|
568
|
+
if (results.length >= CODE_MAP_CONFIG.MAX_FILES) return;
|
|
569
|
+
|
|
570
|
+
const rel = path.relative(rootDir, dir);
|
|
571
|
+
if (rel) gi.loadNested(dir, rel);
|
|
572
|
+
|
|
573
|
+
let entries;
|
|
574
|
+
try {
|
|
575
|
+
entries = await fs.promises.readdir(dir, { withFileTypes: true });
|
|
576
|
+
} catch {
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// Sort for deterministic output
|
|
581
|
+
entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
582
|
+
|
|
583
|
+
for (const entry of entries) {
|
|
584
|
+
if (results.length >= CODE_MAP_CONFIG.MAX_FILES) break;
|
|
585
|
+
if (entry.name.startsWith('.')) continue;
|
|
586
|
+
|
|
587
|
+
const full = path.join(dir, entry.name);
|
|
588
|
+
const entryRel = path.relative(rootDir, full);
|
|
589
|
+
|
|
590
|
+
if (entry.isDirectory()) {
|
|
591
|
+
if (CODE_MAP_CONFIG.SKIP_DIRS.has(entry.name)) continue;
|
|
592
|
+
if (gi.isIgnored(entryRel, true) && !gi.hasNegationUnder(entryRel)) continue;
|
|
593
|
+
if (!this._isPathAccessible(full, accessibleDirs)) continue;
|
|
594
|
+
|
|
595
|
+
depth++;
|
|
596
|
+
await walk(full);
|
|
597
|
+
depth--;
|
|
598
|
+
} else if (CODE_MAP_CONFIG.SUPPORTED_EXTENSIONS.has(path.extname(entry.name).toLowerCase())) {
|
|
599
|
+
if (gi.isIgnored(entryRel, false)) continue;
|
|
600
|
+
results.push(full);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
await walk(rootDir);
|
|
606
|
+
return results;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// ── .gitignore support ────────────────────────────────────────────────────
|
|
610
|
+
|
|
611
|
+
async _loadGitignoreRules(rootDir) {
|
|
612
|
+
const allRules = [];
|
|
613
|
+
|
|
614
|
+
const giPath = path.join(rootDir, '.gitignore');
|
|
615
|
+
try {
|
|
616
|
+
const content = await fs.promises.readFile(giPath, 'utf-8');
|
|
617
|
+
allRules.push(...this._parseGitignore(content, ''));
|
|
618
|
+
} catch {
|
|
619
|
+
// No .gitignore at root — that's fine
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
return {
|
|
623
|
+
rules: allRules,
|
|
624
|
+
|
|
625
|
+
loadNested: (subDir, relPath) => {
|
|
626
|
+
const nested = path.join(subDir, '.gitignore');
|
|
627
|
+
try {
|
|
628
|
+
const content = fs.readFileSync(nested, 'utf-8');
|
|
629
|
+
const prefix = relPath ? relPath + '/' : '';
|
|
630
|
+
allRules.push(...this._parseGitignore(content, prefix));
|
|
631
|
+
} catch {
|
|
632
|
+
// No nested .gitignore
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
|
|
636
|
+
isIgnored: (relPath, isDir) => {
|
|
637
|
+
let ignored = false;
|
|
638
|
+
for (const rule of allRules) {
|
|
639
|
+
if (rule.dirOnly && !isDir) {
|
|
640
|
+
const parts = relPath.split('/');
|
|
641
|
+
let parentMatch = false;
|
|
642
|
+
for (let k = 1; k < parts.length; k++) {
|
|
643
|
+
const parentPath = parts.slice(0, k).join('/');
|
|
644
|
+
if (rule.regex.test(parentPath)) { parentMatch = true; break; }
|
|
645
|
+
}
|
|
646
|
+
if (!parentMatch) continue;
|
|
647
|
+
} else if (!rule.regex.test(relPath)) {
|
|
648
|
+
continue;
|
|
649
|
+
}
|
|
650
|
+
ignored = !rule.negate;
|
|
651
|
+
}
|
|
652
|
+
return ignored;
|
|
653
|
+
},
|
|
654
|
+
|
|
655
|
+
hasNegationUnder: (dirRelPath) => {
|
|
656
|
+
const prefix = dirRelPath + '/';
|
|
657
|
+
for (const rule of allRules) {
|
|
658
|
+
if (!rule.negate) continue;
|
|
659
|
+
if (rule.regex.test(prefix + 'x') || rule.regex.test(prefix + 'x.js')) return true;
|
|
660
|
+
if (rule.regex.source.includes(dirRelPath.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))) return true;
|
|
661
|
+
}
|
|
662
|
+
return false;
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
_parseGitignore(content, prefix) {
|
|
668
|
+
const rules = [];
|
|
669
|
+
for (const rawLine of content.split('\n')) {
|
|
670
|
+
let line = rawLine.trim();
|
|
671
|
+
if (!line || line.startsWith('#')) continue;
|
|
672
|
+
|
|
673
|
+
let negate = false;
|
|
674
|
+
if (line.startsWith('!')) {
|
|
675
|
+
negate = true;
|
|
676
|
+
line = line.slice(1);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
line = line.replace(/\\(\s)$/, '$1');
|
|
680
|
+
|
|
681
|
+
let dirOnly = false;
|
|
682
|
+
if (line.endsWith('/')) {
|
|
683
|
+
dirOnly = true;
|
|
684
|
+
line = line.slice(0, -1);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
const hasSlash = line.includes('/');
|
|
688
|
+
const rooted = line.startsWith('/');
|
|
689
|
+
if (rooted) line = line.slice(1);
|
|
690
|
+
|
|
691
|
+
let reStr;
|
|
692
|
+
if (hasSlash || rooted) {
|
|
693
|
+
reStr = '^' + prefix + this._gitignorePatternToRegex(line) + '(/.*)?$';
|
|
694
|
+
} else {
|
|
695
|
+
reStr = '(^|.+/)' + prefix + this._gitignorePatternToRegex(line) + '(/.*)?$';
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
try {
|
|
699
|
+
rules.push({ regex: new RegExp(reStr), negate, dirOnly });
|
|
700
|
+
} catch {
|
|
701
|
+
// skip invalid patterns
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
return rules;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
_gitignorePatternToRegex(pattern) {
|
|
708
|
+
let re = '';
|
|
709
|
+
let i = 0;
|
|
710
|
+
while (i < pattern.length) {
|
|
711
|
+
const ch = pattern[i];
|
|
712
|
+
if (ch === '*' && pattern[i + 1] === '*') {
|
|
713
|
+
if (pattern[i + 2] === '/') {
|
|
714
|
+
re += '(.+/)?';
|
|
715
|
+
i += 3;
|
|
716
|
+
} else {
|
|
717
|
+
re += '.*';
|
|
718
|
+
i += 2;
|
|
719
|
+
}
|
|
720
|
+
} else if (ch === '*') {
|
|
721
|
+
re += '[^/]*';
|
|
722
|
+
i++;
|
|
723
|
+
} else if (ch === '?') {
|
|
724
|
+
re += '[^/]';
|
|
725
|
+
i++;
|
|
726
|
+
} else if (ch === '[') {
|
|
727
|
+
const end = pattern.indexOf(']', i + 1);
|
|
728
|
+
if (end === -1) { re += '\\['; i++; }
|
|
729
|
+
else { re += pattern.slice(i, end + 1); i = end + 1; }
|
|
730
|
+
} else if ('.+^${}()|\\'.includes(ch)) {
|
|
731
|
+
re += '\\' + ch;
|
|
732
|
+
i++;
|
|
733
|
+
} else {
|
|
734
|
+
re += ch;
|
|
735
|
+
i++;
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
return re;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
// ── Language detection ────────────────────────────────────────────────────
|
|
742
|
+
|
|
743
|
+
_langOf(file) {
|
|
744
|
+
const ext = path.extname(file).toLowerCase();
|
|
745
|
+
if (ext === '.py') return 'python';
|
|
746
|
+
if (['.c', '.h', '.cc', '.cpp', '.cxx', '.hpp', '.hh', '.hxx'].includes(ext)) return 'c';
|
|
747
|
+
return 'js';
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
// ── JS / TS parser ────────────────────────────────────────────────────────
|
|
751
|
+
//
|
|
752
|
+
// No-regex implementation. Pattern matchers below each return either
|
|
753
|
+
// `true`/`false` or `null`/idx, using the primitives from
|
|
754
|
+
// parserHelpers.js. This trades five lines of regex for ten lines of
|
|
755
|
+
// explicit cursor-walking, but the result is far more debuggable and
|
|
756
|
+
// every behavior is locked by parserHelpers.test.js + codeMapTool.test.js.
|
|
757
|
+
|
|
758
|
+
// Modifier keywords that can precede a class-method name (used by the
|
|
759
|
+
// "method inside class" matcher).
|
|
760
|
+
static _METHOD_MODIFIERS = new Set([
|
|
761
|
+
'private', 'protected', 'public', 'readonly', 'abstract',
|
|
762
|
+
'override', 'async', 'static', 'get', 'set',
|
|
763
|
+
]);
|
|
764
|
+
|
|
765
|
+
// Reserved words that look like methods but aren't — `if (x) {` etc.
|
|
766
|
+
static _METHOD_KEYWORD_EXCLUDE = new Set([
|
|
767
|
+
'if', 'for', 'while', 'switch', 'catch', 'return', 'throw', 'new',
|
|
768
|
+
'typeof', 'delete', 'void', 'await', 'class', 'function',
|
|
769
|
+
'const', 'let', 'var', 'super', 'this',
|
|
770
|
+
]);
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* Does the RHS of an assignment (starting at idx) look like a function
|
|
774
|
+
* or arrow expression? Recognizes:
|
|
775
|
+
* function …
|
|
776
|
+
* async function …
|
|
777
|
+
* () => … or (a, b) => …
|
|
778
|
+
* ident => … or async ident => …
|
|
779
|
+
*
|
|
780
|
+
* Returns true on hit. Allocation-free.
|
|
781
|
+
*/
|
|
782
|
+
_rhsLooksLikeFunction(s, idx) {
|
|
783
|
+
let i = skipWhitespace(s, idx);
|
|
784
|
+
// optional `async`
|
|
785
|
+
const afterAsync = consumeKeyword(s, 'async', i);
|
|
786
|
+
if (afterAsync !== -1) i = skipWhitespace(s, afterAsync);
|
|
787
|
+
if (startsWithKeyword(s, 'function', i)) return true;
|
|
788
|
+
|
|
789
|
+
// `(…) =>` — find a balanced paren run, then `=>`
|
|
790
|
+
if (s[i] === '(') {
|
|
791
|
+
let depth = 1; let j = i + 1;
|
|
792
|
+
while (j < s.length && depth > 0) {
|
|
793
|
+
if (s[j] === '(') depth += 1;
|
|
794
|
+
else if (s[j] === ')') depth -= 1;
|
|
795
|
+
j += 1;
|
|
796
|
+
}
|
|
797
|
+
const k = skipWhitespace(s, j);
|
|
798
|
+
if (s[k] === '=' && s[k + 1] === '>') return true;
|
|
799
|
+
return false;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// `ident =>`
|
|
803
|
+
const id = readIdent(s, i);
|
|
804
|
+
if (id) {
|
|
805
|
+
const k = skipWhitespace(s, id.nextIdx);
|
|
806
|
+
if (s[k] === '=' && s[k + 1] === '>') return true;
|
|
807
|
+
}
|
|
808
|
+
return false;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/** Line is `import ...` (ESM). */
|
|
812
|
+
_isImportLine(raw) {
|
|
813
|
+
const i = skipWhitespace(raw, 0);
|
|
814
|
+
return startsWithKeyword(raw, 'import', i);
|
|
815
|
+
}
|
|
816
|
+
/** Line contains `require(` as a whole word call. */
|
|
817
|
+
_hasRequireCall(raw) {
|
|
818
|
+
const i = indexOfWord(raw, 'require');
|
|
819
|
+
if (i === -1) return false;
|
|
820
|
+
const j = skipWhitespace(raw, i + 'require'.length);
|
|
821
|
+
return raw[j] === '(';
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
/** Walks across the prefix keywords `export default abstract async ...`. */
|
|
825
|
+
_skipDecoratorPrefix(raw) {
|
|
826
|
+
let i = skipWhitespace(raw, 0);
|
|
827
|
+
// export, then optional `default`
|
|
828
|
+
const afterExport = consumeKeyword(raw, 'export', i);
|
|
829
|
+
if (afterExport !== -1) i = skipWhitespace(raw, afterExport);
|
|
830
|
+
const afterDefault = consumeKeyword(raw, 'default', i);
|
|
831
|
+
if (afterDefault !== -1) i = skipWhitespace(raw, afterDefault);
|
|
832
|
+
const afterAbstract = consumeKeyword(raw, 'abstract', i);
|
|
833
|
+
if (afterAbstract !== -1) i = skipWhitespace(raw, afterAbstract);
|
|
834
|
+
const afterAsync = consumeKeyword(raw, 'async', i);
|
|
835
|
+
if (afterAsync !== -1) i = skipWhitespace(raw, afterAsync);
|
|
836
|
+
return i;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* The line starts with one of these declaration keywords (after the
|
|
841
|
+
* optional `export [default] [abstract] [async]` prefix run):
|
|
842
|
+
* function | class | const | let | var | enum | interface | type
|
|
843
|
+
*
|
|
844
|
+
* Returns true if so.
|
|
845
|
+
*/
|
|
846
|
+
_isExportableDecl(raw) {
|
|
847
|
+
const i = this._skipDecoratorPrefix(raw);
|
|
848
|
+
return (
|
|
849
|
+
startsWithKeyword(raw, 'function', i) ||
|
|
850
|
+
startsWithKeyword(raw, 'class', i) ||
|
|
851
|
+
startsWithKeyword(raw, 'const', i) ||
|
|
852
|
+
startsWithKeyword(raw, 'let', i) ||
|
|
853
|
+
startsWithKeyword(raw, 'var', i) ||
|
|
854
|
+
startsWithKeyword(raw, 'enum', i) ||
|
|
855
|
+
startsWithKeyword(raw, 'interface', i) ||
|
|
856
|
+
startsWithKeyword(raw, 'type', i) ||
|
|
857
|
+
startsWithKeyword(raw, 'abstract', i) // bare `export abstract foo`
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/** `module.exports = …` (whole or property: `module.exports.foo = …`). */
|
|
862
|
+
_isModuleExportsAssign(raw) {
|
|
863
|
+
const i = skipWhitespace(raw, 0);
|
|
864
|
+
if (!startsWithKeyword(raw, 'module', i)) return false;
|
|
865
|
+
let j = i + 'module'.length;
|
|
866
|
+
if (raw[j] !== '.') return false;
|
|
867
|
+
j += 1;
|
|
868
|
+
if (!startsWithKeyword(raw, 'exports', j)) return false;
|
|
869
|
+
j += 'exports'.length;
|
|
870
|
+
// optional `.ident`
|
|
871
|
+
if (raw[j] === '.') {
|
|
872
|
+
const id = readIdent(raw, j + 1);
|
|
873
|
+
if (!id) return false;
|
|
874
|
+
j = id.nextIdx;
|
|
875
|
+
}
|
|
876
|
+
j = skipWhitespace(raw, j);
|
|
877
|
+
return raw[j] === '=' && raw[j + 1] !== '=';
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/** `exports.foo = …` */
|
|
881
|
+
_isExportsAssign(raw) {
|
|
882
|
+
const i = skipWhitespace(raw, 0);
|
|
883
|
+
if (!startsWithKeyword(raw, 'exports', i)) return false;
|
|
884
|
+
let j = i + 'exports'.length;
|
|
885
|
+
if (raw[j] !== '.') return false;
|
|
886
|
+
const id = readIdent(raw, j + 1);
|
|
887
|
+
if (!id) return false;
|
|
888
|
+
j = skipWhitespace(raw, id.nextIdx);
|
|
889
|
+
return raw[j] === '=' && raw[j + 1] !== '=';
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/** `(async) function name(…)` top-level form. */
|
|
893
|
+
_isTopLevelFunctionDecl(raw) {
|
|
894
|
+
let i = skipWhitespace(raw, 0);
|
|
895
|
+
const aa = consumeKeyword(raw, 'async', i);
|
|
896
|
+
if (aa !== -1) i = skipWhitespace(raw, aa);
|
|
897
|
+
if (!startsWithKeyword(raw, 'function', i)) return false;
|
|
898
|
+
i = skipWhitespace(raw, i + 'function'.length);
|
|
899
|
+
return readIdent(raw, i) !== null;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/** `(abstract) class Name`. */
|
|
903
|
+
_isTopLevelClassDecl(raw) {
|
|
904
|
+
let i = skipWhitespace(raw, 0);
|
|
905
|
+
const aa = consumeKeyword(raw, 'abstract', i);
|
|
906
|
+
if (aa !== -1) i = skipWhitespace(raw, aa);
|
|
907
|
+
if (!startsWithKeyword(raw, 'class', i)) return false;
|
|
908
|
+
i = skipWhitespace(raw, i + 'class'.length);
|
|
909
|
+
return readIdent(raw, i) !== null;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/** `const|let|var name = <function-ish>`. */
|
|
913
|
+
_isConstAssignedFunction(raw) {
|
|
914
|
+
let i = skipWhitespace(raw, 0);
|
|
915
|
+
const dk = consumeAnyKeyword(raw, ['const', 'let', 'var'], i);
|
|
916
|
+
if (!dk) return false;
|
|
917
|
+
i = skipWhitespace(raw, dk.nextIdx);
|
|
918
|
+
const id = readIdent(raw, i);
|
|
919
|
+
if (!id) return false;
|
|
920
|
+
i = skipWhitespace(raw, id.nextIdx);
|
|
921
|
+
if (raw[i] !== '=' || raw[i + 1] === '=' || raw[i + 1] === '>') return false;
|
|
922
|
+
return this._rhsLooksLikeFunction(raw, i + 1);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
/** Class-with-an-opening-brace check for the brace stack. */
|
|
926
|
+
_isClassDeclWithOpenBrace(raw, opens) {
|
|
927
|
+
if (opens <= 0) return false;
|
|
928
|
+
let i = skipWhitespace(raw, 0);
|
|
929
|
+
const ex = consumeKeyword(raw, 'export', i);
|
|
930
|
+
if (ex !== -1) i = skipWhitespace(raw, ex);
|
|
931
|
+
const df = consumeKeyword(raw, 'default', i);
|
|
932
|
+
if (df !== -1) i = skipWhitespace(raw, df);
|
|
933
|
+
const ab = consumeKeyword(raw, 'abstract', i);
|
|
934
|
+
if (ab !== -1) i = skipWhitespace(raw, ab);
|
|
935
|
+
return startsWithKeyword(raw, 'class', i);
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/** IIFE prefix-op form: `!function`, `+function`, `~function`, `-function`. */
|
|
939
|
+
_isIifePrefixOp(raw) {
|
|
940
|
+
const i = skipWhitespace(raw, 0);
|
|
941
|
+
const ch = raw[i];
|
|
942
|
+
if (ch !== '!' && ch !== '+' && ch !== '~' && ch !== '-') return false;
|
|
943
|
+
let j = skipWhitespace(raw, i + 1);
|
|
944
|
+
const aa = consumeKeyword(raw, 'async', j);
|
|
945
|
+
if (aa !== -1) j = skipWhitespace(raw, aa);
|
|
946
|
+
return startsWithKeyword(raw, 'function', j);
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/** IIFE paren-wrapped form: `(function ...)` or `(async function ...)`. */
|
|
950
|
+
_isIifeParens(raw) {
|
|
951
|
+
const i = skipWhitespace(raw, 0);
|
|
952
|
+
if (raw[i] !== '(') return false;
|
|
953
|
+
let j = skipWhitespace(raw, i + 1);
|
|
954
|
+
const aa = consumeKeyword(raw, 'async', j);
|
|
955
|
+
if (aa !== -1) j = skipWhitespace(raw, aa);
|
|
956
|
+
return startsWithKeyword(raw, 'function', j);
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Global/namespace assignment of a function-ish value:
|
|
961
|
+
* window.X.Y = function / globalThis.X = () => / MyApp.foo = …
|
|
962
|
+
* Conditions:
|
|
963
|
+
* - LHS head is `window|globalThis|self` (and optional dotted tail)
|
|
964
|
+
* OR a TitleCase identifier followed by AT LEAST one dotted tail
|
|
965
|
+
* segment (so we don't grab bare `Foo = …`)
|
|
966
|
+
* - RHS is function or arrow
|
|
967
|
+
*/
|
|
968
|
+
_isGlobalAssign(raw) {
|
|
969
|
+
let i = skipWhitespace(raw, 0);
|
|
970
|
+
const headKw = consumeAnyKeyword(raw, ['window', 'globalThis', 'self'], i);
|
|
971
|
+
let after;
|
|
972
|
+
let hadGlobalHead = false;
|
|
973
|
+
if (headKw) {
|
|
974
|
+
hadGlobalHead = true;
|
|
975
|
+
after = consumeDottedAssignTail(raw, headKw.nextIdx);
|
|
976
|
+
} else {
|
|
977
|
+
// TitleCase ident + at least one dotted tail
|
|
978
|
+
const id = readIdent(raw, i);
|
|
979
|
+
if (!id) return false;
|
|
980
|
+
// TitleCase = uppercase first char
|
|
981
|
+
const first = id.ident[0];
|
|
982
|
+
if (first < 'A' || first > 'Z') return false;
|
|
983
|
+
// Need at least one '.ident' before '='
|
|
984
|
+
if (raw[id.nextIdx] !== '.') return false;
|
|
985
|
+
after = consumeDottedAssignTail(raw, id.nextIdx);
|
|
986
|
+
}
|
|
987
|
+
if (after === -1) return false;
|
|
988
|
+
return this._rhsLooksLikeFunction(raw, after);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* Prototype-method assignment: `Foo.prototype.bar = function|=>…`.
|
|
993
|
+
* Note: leverages `_isGlobalAssign`'s tail logic but requires
|
|
994
|
+
* `.prototype.<ident>` somewhere in the LHS.
|
|
995
|
+
*/
|
|
996
|
+
_isPrototypeAssign(raw) {
|
|
997
|
+
let i = skipWhitespace(raw, 0);
|
|
998
|
+
const id = readIdent(raw, i);
|
|
999
|
+
if (!id) return false;
|
|
1000
|
+
let j = id.nextIdx;
|
|
1001
|
+
// walk `.ident*` until we hit `.prototype`
|
|
1002
|
+
let sawPrototype = false;
|
|
1003
|
+
while (raw[j] === '.') {
|
|
1004
|
+
// peek the next ident
|
|
1005
|
+
if (startsWithKeyword(raw, 'prototype', j + 1)) {
|
|
1006
|
+
sawPrototype = true;
|
|
1007
|
+
j = j + 1 + 'prototype'.length;
|
|
1008
|
+
break;
|
|
1009
|
+
}
|
|
1010
|
+
const more = readIdent(raw, j + 1);
|
|
1011
|
+
if (!more) return false;
|
|
1012
|
+
j = more.nextIdx;
|
|
1013
|
+
}
|
|
1014
|
+
if (!sawPrototype) return false;
|
|
1015
|
+
// Need `.ident` + `=` + function-ish
|
|
1016
|
+
if (raw[j] !== '.') return false;
|
|
1017
|
+
const methodId = readIdent(raw, j + 1);
|
|
1018
|
+
if (!methodId) return false;
|
|
1019
|
+
j = skipWhitespace(raw, methodId.nextIdx);
|
|
1020
|
+
if (raw[j] !== '=' || raw[j + 1] === '=') return false;
|
|
1021
|
+
return this._rhsLooksLikeFunction(raw, j + 1);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
/** jQuery-style plugin: `$.fn.X = function …` / `jQuery.fn.X = function …`. */
|
|
1025
|
+
_isJqueryPluginAssign(raw) {
|
|
1026
|
+
let i = skipWhitespace(raw, 0);
|
|
1027
|
+
let afterHead;
|
|
1028
|
+
if (raw[i] === '$') {
|
|
1029
|
+
afterHead = i + 1;
|
|
1030
|
+
} else if (startsWithKeyword(raw, 'jQuery', i)) {
|
|
1031
|
+
afterHead = i + 'jQuery'.length;
|
|
1032
|
+
} else {
|
|
1033
|
+
return false;
|
|
1034
|
+
}
|
|
1035
|
+
if (raw[afterHead] !== '.') return false;
|
|
1036
|
+
if (!startsWithKeyword(raw, 'fn', afterHead + 1)) return false;
|
|
1037
|
+
let j = afterHead + 1 + 'fn'.length;
|
|
1038
|
+
if (raw[j] !== '.') return false;
|
|
1039
|
+
const id = readIdent(raw, j + 1);
|
|
1040
|
+
if (!id) return false;
|
|
1041
|
+
j = skipWhitespace(raw, id.nextIdx);
|
|
1042
|
+
if (raw[j] !== '=' || raw[j + 1] === '=') return false;
|
|
1043
|
+
// We only insist on `function` here (matches the original regex).
|
|
1044
|
+
let r = skipWhitespace(raw, j + 1);
|
|
1045
|
+
const aa = consumeKeyword(raw, 'async', r);
|
|
1046
|
+
if (aa !== -1) r = skipWhitespace(raw, aa);
|
|
1047
|
+
return startsWithKeyword(raw, 'function', r);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/** `document.addEventListener(` or `window.addEventListener(`. */
|
|
1051
|
+
_isAddEventListenerCall(raw) {
|
|
1052
|
+
const i = skipWhitespace(raw, 0);
|
|
1053
|
+
const head = consumeAnyKeyword(raw, ['document', 'window'], i);
|
|
1054
|
+
if (!head) return false;
|
|
1055
|
+
let j = head.nextIdx;
|
|
1056
|
+
if (raw[j] !== '.') return false;
|
|
1057
|
+
if (!startsWithKeyword(raw, 'addEventListener', j + 1)) return false;
|
|
1058
|
+
j = skipWhitespace(raw, j + 1 + 'addEventListener'.length);
|
|
1059
|
+
return raw[j] === '(';
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Method inside a class. Caller already established `classDepth > 0`
|
|
1064
|
+
* and `braceDepthBeforeLine === methodDepth`. We just decide if the
|
|
1065
|
+
* line LOOKS like a method declaration vs a method call.
|
|
1066
|
+
*
|
|
1067
|
+
* Returns the method name or null.
|
|
1068
|
+
*/
|
|
1069
|
+
_detectMethodName(raw) {
|
|
1070
|
+
// Must start with at least one space (methods are indented).
|
|
1071
|
+
if (raw[0] !== ' ' && raw[0] !== '\t') return null;
|
|
1072
|
+
let i = skipWhitespace(raw, 0);
|
|
1073
|
+
// Walk through any sequence of modifier keywords.
|
|
1074
|
+
while (true) {
|
|
1075
|
+
const id = readIdent(raw, i);
|
|
1076
|
+
if (!id) return null;
|
|
1077
|
+
if (!CodeMapTool._METHOD_MODIFIERS.has(id.ident)) {
|
|
1078
|
+
// This is the method name candidate.
|
|
1079
|
+
const afterName = skipWhitespace(raw, id.nextIdx);
|
|
1080
|
+
if (raw[afterName] !== '(' && raw[afterName] !== '<') return null;
|
|
1081
|
+
// Excluded reserved words (`if`, `for`, …)
|
|
1082
|
+
if (CodeMapTool._METHOD_KEYWORD_EXCLUDE.has(id.ident)) return null;
|
|
1083
|
+
// Is this a call rather than a definition?
|
|
1084
|
+
// Calls end with `)` (optionally `;`) and have NO `) {` or `) : …`.
|
|
1085
|
+
const trimmed = raw.trim();
|
|
1086
|
+
const endsWithClose = trimmedEndsWith(trimmed, ')');
|
|
1087
|
+
const endsWithCloseBrace = trimmedEndsWith(trimmed, ') {');
|
|
1088
|
+
// `): Type` — a TS-style return-type annotation continuation
|
|
1089
|
+
const hasReturnTypeAnnotation = (() => {
|
|
1090
|
+
// Walk past the open paren to find the matching `)`, then check
|
|
1091
|
+
// if the next non-ws char is `:` followed by a non-empty token.
|
|
1092
|
+
let k = afterName + 1;
|
|
1093
|
+
let depth = 1;
|
|
1094
|
+
while (k < raw.length && depth > 0) {
|
|
1095
|
+
if (raw[k] === '(') depth += 1;
|
|
1096
|
+
else if (raw[k] === ')') depth -= 1;
|
|
1097
|
+
k += 1;
|
|
1098
|
+
}
|
|
1099
|
+
k = skipWhitespace(raw, k);
|
|
1100
|
+
return raw[k] === ':' && raw[k + 1] !== '\0' && raw[k + 1] !== undefined;
|
|
1101
|
+
})();
|
|
1102
|
+
if (endsWithClose && !endsWithCloseBrace && !hasReturnTypeAnnotation) return null;
|
|
1103
|
+
return id.ident;
|
|
1104
|
+
}
|
|
1105
|
+
// It WAS a modifier — consume + continue.
|
|
1106
|
+
i = skipWhitespace(raw, id.nextIdx);
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
_parseJS(lines, { publicOnly, withComments, includeImports }) {
|
|
1111
|
+
const entries = [];
|
|
1112
|
+
let pendingComments = [];
|
|
1113
|
+
let inBlockComment = false;
|
|
1114
|
+
let blockCommentLines = [];
|
|
1115
|
+
|
|
1116
|
+
let classDepth = 0;
|
|
1117
|
+
let braceStack = [];
|
|
1118
|
+
let braceDepth = 0;
|
|
1119
|
+
let methodDepths = [];
|
|
1120
|
+
|
|
1121
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
1122
|
+
const lineNum = i + 1;
|
|
1123
|
+
const raw = lines[i];
|
|
1124
|
+
const start = skipWhitespace(raw, 0);
|
|
1125
|
+
|
|
1126
|
+
// block-comment tracking
|
|
1127
|
+
if (inBlockComment) {
|
|
1128
|
+
blockCommentLines.push({ line: lineNum, text: raw, kind: 'comment' });
|
|
1129
|
+
if (raw.includes('*/')) {
|
|
1130
|
+
inBlockComment = false;
|
|
1131
|
+
pendingComments = blockCommentLines;
|
|
1132
|
+
blockCommentLines = [];
|
|
1133
|
+
}
|
|
1134
|
+
continue;
|
|
1135
|
+
}
|
|
1136
|
+
if (raw[start] === '/' && raw[start + 1] === '*') {
|
|
1137
|
+
blockCommentLines = [{ line: lineNum, text: raw, kind: 'comment' }];
|
|
1138
|
+
if (raw.slice(start + 2).includes('*/')) {
|
|
1139
|
+
pendingComments = blockCommentLines;
|
|
1140
|
+
blockCommentLines = [];
|
|
1141
|
+
} else {
|
|
1142
|
+
inBlockComment = true;
|
|
1143
|
+
}
|
|
1144
|
+
continue;
|
|
1145
|
+
}
|
|
1146
|
+
if (raw[start] === '/' && raw[start + 1] === '/') {
|
|
1147
|
+
pendingComments.push({ line: lineNum, text: raw, kind: 'comment' });
|
|
1148
|
+
continue;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// imports
|
|
1152
|
+
if (includeImports) {
|
|
1153
|
+
if (this._isImportLine(raw) || this._hasRequireCall(raw)) {
|
|
1154
|
+
entries.push({ line: lineNum, text: raw, kind: 'import' });
|
|
1155
|
+
pendingComments = [];
|
|
1156
|
+
continue;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
// Brace tracking for class context — mask strings + line comments
|
|
1161
|
+
// before counting so e.g. `var s = "class Foo {"` doesn't push a
|
|
1162
|
+
// bogus class frame.
|
|
1163
|
+
const masked = stripStringsAndLineComments(raw);
|
|
1164
|
+
const opens = countChar(masked, '{');
|
|
1165
|
+
const closes = countChar(masked, '}');
|
|
1166
|
+
const braceDepthBeforeLine = braceDepth;
|
|
1167
|
+
|
|
1168
|
+
if (this._isClassDeclWithOpenBrace(raw, opens)) {
|
|
1169
|
+
braceStack.push({ depth: braceDepth, type: 'class' });
|
|
1170
|
+
methodDepths.push(braceDepth + 1);
|
|
1171
|
+
classDepth += 1;
|
|
1172
|
+
}
|
|
1173
|
+
braceDepth += opens - closes;
|
|
1174
|
+
while (braceStack.length > 0 && braceDepth <= braceStack[braceStack.length - 1].depth) {
|
|
1175
|
+
const popped = braceStack.pop();
|
|
1176
|
+
if (popped.type === 'class') {
|
|
1177
|
+
classDepth -= 1;
|
|
1178
|
+
methodDepths.pop();
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
// Signature detection
|
|
1183
|
+
const isExport = startsWithKeyword(raw, 'export', start);
|
|
1184
|
+
const isModuleExports = this._isModuleExportsAssign(raw);
|
|
1185
|
+
const isExportsAssign = this._isExportsAssign(raw);
|
|
1186
|
+
const isPublic = isExport || isModuleExports || isExportsAssign;
|
|
1187
|
+
|
|
1188
|
+
let matched = false;
|
|
1189
|
+
|
|
1190
|
+
if (isExport && this._isExportableDecl(raw)) matched = true;
|
|
1191
|
+
if (isModuleExports || isExportsAssign) matched = true;
|
|
1192
|
+
|
|
1193
|
+
if (!matched && !publicOnly) {
|
|
1194
|
+
if (this._isTopLevelFunctionDecl(raw)) matched = true;
|
|
1195
|
+
if (this._isTopLevelClassDecl(raw)) matched = true;
|
|
1196
|
+
if (this._isConstAssignedFunction(raw)) matched = true;
|
|
1197
|
+
|
|
1198
|
+
// Browser-JS / pre-ESM patterns
|
|
1199
|
+
if (this._isIifePrefixOp(raw)) matched = true;
|
|
1200
|
+
if (this._isIifeParens(raw)) matched = true;
|
|
1201
|
+
if (this._isGlobalAssign(raw)) matched = true;
|
|
1202
|
+
if (this._isPrototypeAssign(raw)) matched = true;
|
|
1203
|
+
if (this._isJqueryPluginAssign(raw)) matched = true;
|
|
1204
|
+
if (this._isAddEventListenerCall(raw)) matched = true;
|
|
1205
|
+
|
|
1206
|
+
// Method inside class
|
|
1207
|
+
const atMethodDepth = methodDepths.length > 0 &&
|
|
1208
|
+
braceDepthBeforeLine === methodDepths[methodDepths.length - 1];
|
|
1209
|
+
if (classDepth > 0 && atMethodDepth && !isExport) {
|
|
1210
|
+
if (this._detectMethodName(raw)) matched = true;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
if (!matched && isPublic) matched = true;
|
|
1215
|
+
if (matched && publicOnly && !isPublic) {
|
|
1216
|
+
pendingComments = [];
|
|
1217
|
+
continue;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
if (matched) {
|
|
1221
|
+
if (withComments && pendingComments.length > 0) {
|
|
1222
|
+
for (const c of pendingComments) entries.push(c);
|
|
1223
|
+
}
|
|
1224
|
+
entries.push({ line: lineNum, text: raw, kind: 'signature' });
|
|
1225
|
+
pendingComments = [];
|
|
1226
|
+
} else {
|
|
1227
|
+
pendingComments = [];
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
return entries;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
// ── Python parser ─────────────────────────────────────────────────────────
|
|
1234
|
+
//
|
|
1235
|
+
// No-regex implementation. Identifiers are ASCII per PEP 8's
|
|
1236
|
+
// recommendation; this is a documented tradeoff vs. the previous
|
|
1237
|
+
// Unicode-aware (\p{L}) regex. The alternative — bundling a Unicode
|
|
1238
|
+
// category table — adds ~50 KB for a feature ~0.1 % of Python
|
|
1239
|
+
// codebases use. If users surface a non-ASCII-identifier Python
|
|
1240
|
+
// codebase the fix is to bring in tree-sitter (already planned for
|
|
1241
|
+
// #5 follow-on) which is Unicode-correct by default.
|
|
1242
|
+
|
|
1243
|
+
/** Try to read a `def` or `async def` head. Returns the function name or null. */
|
|
1244
|
+
_readPythonDefName(raw) {
|
|
1245
|
+
let i = skipWhitespace(raw, 0);
|
|
1246
|
+
// optional `async`
|
|
1247
|
+
const aa = consumeKeyword(raw, 'async', i);
|
|
1248
|
+
if (aa !== -1) i = skipWhitespace(raw, aa);
|
|
1249
|
+
if (!startsWithKeyword(raw, 'def', i)) return null;
|
|
1250
|
+
i = skipWhitespace(raw, i + 'def'.length);
|
|
1251
|
+
const id = readIdent(raw, i);
|
|
1252
|
+
if (!id) return null;
|
|
1253
|
+
i = skipWhitespace(raw, id.nextIdx);
|
|
1254
|
+
if (raw[i] !== '(') return null;
|
|
1255
|
+
return id.ident;
|
|
1256
|
+
}
|
|
1257
|
+
/** Try to read a `class Foo` head. Returns class name or null. */
|
|
1258
|
+
_readPythonClassName(raw) {
|
|
1259
|
+
let i = skipWhitespace(raw, 0);
|
|
1260
|
+
if (!startsWithKeyword(raw, 'class', i)) return null;
|
|
1261
|
+
i = skipWhitespace(raw, i + 'class'.length);
|
|
1262
|
+
const id = readIdent(raw, i);
|
|
1263
|
+
return id ? id.ident : null;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Returns true if `s` (at or after leading whitespace) starts with a
|
|
1268
|
+
* Python triple-quote prefix (`"""` or `'''`). Returns null otherwise.
|
|
1269
|
+
* On hit returns the 3-char quote string.
|
|
1270
|
+
*/
|
|
1271
|
+
_pythonTripleQuoteAtStart(s) {
|
|
1272
|
+
const i = skipWhitespace(s, 0);
|
|
1273
|
+
if (s[i] === '"' && s[i + 1] === '"' && s[i + 2] === '"') return '"""';
|
|
1274
|
+
if (s[i] === "'" && s[i + 1] === "'" && s[i + 2] === "'") return "'''";
|
|
1275
|
+
return null;
|
|
1276
|
+
}
|
|
1277
|
+
/** True if the single-line docstring on a triple-quote line is closed on the same line. */
|
|
1278
|
+
_pythonTripleQuoteClosedOnLine(s, quote) {
|
|
1279
|
+
const i = skipWhitespace(s, 0);
|
|
1280
|
+
return s.indexOf(quote, i + 3) !== -1;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
_parsePython(lines, { publicOnly, withComments, includeImports }) {
|
|
1284
|
+
const entries = [];
|
|
1285
|
+
let pendingComments = [];
|
|
1286
|
+
let i = 0;
|
|
1287
|
+
|
|
1288
|
+
while (i < lines.length) {
|
|
1289
|
+
const lineNum = i + 1;
|
|
1290
|
+
const raw = lines[i];
|
|
1291
|
+
const start = skipWhitespace(raw, 0);
|
|
1292
|
+
|
|
1293
|
+
// imports — `import …` or `from <module> import …`
|
|
1294
|
+
if (includeImports) {
|
|
1295
|
+
if (startsWithKeyword(raw, 'import', start)) {
|
|
1296
|
+
entries.push({ line: lineNum, text: raw, kind: 'import' });
|
|
1297
|
+
pendingComments = [];
|
|
1298
|
+
i += 1; continue;
|
|
1299
|
+
}
|
|
1300
|
+
if (startsWithKeyword(raw, 'from', start)) {
|
|
1301
|
+
// require a non-empty module then `import`
|
|
1302
|
+
let j = skipWhitespace(raw, start + 'from'.length);
|
|
1303
|
+
// Read the dotted module path; allow leading dots (relative).
|
|
1304
|
+
let progressed = false;
|
|
1305
|
+
while (j < raw.length && raw[j] === '.') { j += 1; progressed = true; }
|
|
1306
|
+
const id = readIdent(raw, j);
|
|
1307
|
+
if (id) { j = id.nextIdx; progressed = true; }
|
|
1308
|
+
while (raw[j] === '.') {
|
|
1309
|
+
const more = readIdent(raw, j + 1);
|
|
1310
|
+
if (!more) { progressed = true; break; }
|
|
1311
|
+
j = more.nextIdx;
|
|
1312
|
+
}
|
|
1313
|
+
j = skipWhitespace(raw, j);
|
|
1314
|
+
if (progressed && startsWithKeyword(raw, 'import', j)) {
|
|
1315
|
+
entries.push({ line: lineNum, text: raw, kind: 'import' });
|
|
1316
|
+
pendingComments = [];
|
|
1317
|
+
i += 1; continue;
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
// # comments
|
|
1323
|
+
if (raw[start] === '#') {
|
|
1324
|
+
pendingComments.push({ line: lineNum, text: raw, kind: 'comment' });
|
|
1325
|
+
i += 1; continue;
|
|
1326
|
+
}
|
|
1327
|
+
// decorators
|
|
1328
|
+
if (raw[start] === '@') {
|
|
1329
|
+
pendingComments.push({ line: lineNum, text: raw, kind: 'decorator' });
|
|
1330
|
+
i += 1; continue;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
// def / async def / class
|
|
1334
|
+
const defName = this._readPythonDefName(raw);
|
|
1335
|
+
const className = defName ? null : this._readPythonClassName(raw);
|
|
1336
|
+
const name = defName || className;
|
|
1337
|
+
|
|
1338
|
+
if (name) {
|
|
1339
|
+
const isPublic = !name.startsWith('_');
|
|
1340
|
+
|
|
1341
|
+
// Helper: continuation lines for a multi-line signature like
|
|
1342
|
+
// def foo(
|
|
1343
|
+
// x: int,
|
|
1344
|
+
// y: int,
|
|
1345
|
+
// ) -> int:
|
|
1346
|
+
// The original advanced past the line that closes with `):` or
|
|
1347
|
+
// a line starting with `)` containing `:`. Preserve that logic.
|
|
1348
|
+
const advancePastMultilineSig = () => {
|
|
1349
|
+
// Only def's have parameter parens; class doesn't.
|
|
1350
|
+
if (!defName) return;
|
|
1351
|
+
if (raw.includes('):')) return;
|
|
1352
|
+
if (raw.includes(')')) return;
|
|
1353
|
+
// walk forward
|
|
1354
|
+
while (i < lines.length) {
|
|
1355
|
+
const pline = lines[i].trim();
|
|
1356
|
+
i += 1;
|
|
1357
|
+
if (pline.includes('):') ||
|
|
1358
|
+
(pline.startsWith(')') && pline.includes(':'))) break;
|
|
1359
|
+
}
|
|
1360
|
+
};
|
|
1361
|
+
|
|
1362
|
+
if (publicOnly && !isPublic) {
|
|
1363
|
+
pendingComments = [];
|
|
1364
|
+
i += 1;
|
|
1365
|
+
advancePastMultilineSig();
|
|
1366
|
+
i = this._skipPythonDocstring(lines, i);
|
|
1367
|
+
continue;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
if (withComments && pendingComments.length > 0) {
|
|
1371
|
+
for (const c of pendingComments) entries.push(c);
|
|
1372
|
+
}
|
|
1373
|
+
entries.push({ line: lineNum, text: raw, kind: 'signature' });
|
|
1374
|
+
pendingComments = [];
|
|
1375
|
+
i += 1;
|
|
1376
|
+
advancePastMultilineSig();
|
|
1377
|
+
|
|
1378
|
+
if (withComments) {
|
|
1379
|
+
const dsLines = this._collectPythonDocstring(lines, i);
|
|
1380
|
+
for (const ds of dsLines) entries.push(ds);
|
|
1381
|
+
i += dsLines.length;
|
|
1382
|
+
} else {
|
|
1383
|
+
i = this._skipPythonDocstring(lines, i);
|
|
1384
|
+
}
|
|
1385
|
+
continue;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
// Top-level assignments (data lines):
|
|
1389
|
+
// ident = expr (only when starting at column 0; indented
|
|
1390
|
+
// lines are method-internal and ignored)
|
|
1391
|
+
if (raw.length > 0 && !isWhitespace(raw[0]) && raw[0] !== '\n') {
|
|
1392
|
+
const id = readIdent(raw, 0);
|
|
1393
|
+
if (id) {
|
|
1394
|
+
let j = skipWhitespace(raw, id.nextIdx);
|
|
1395
|
+
if (raw[j] === '=' && raw[j + 1] !== '=') {
|
|
1396
|
+
// looks like `ident = …`
|
|
1397
|
+
// require there to BE an RHS — `name =` alone is invalid
|
|
1398
|
+
const afterEq = skipWhitespace(raw, j + 1);
|
|
1399
|
+
if (afterEq < raw.length) {
|
|
1400
|
+
const isPublicVar = !id.ident.startsWith('_');
|
|
1401
|
+
if (!publicOnly || isPublicVar) {
|
|
1402
|
+
if (withComments && pendingComments.length > 0) {
|
|
1403
|
+
for (const c of pendingComments) entries.push(c);
|
|
1404
|
+
}
|
|
1405
|
+
entries.push({ line: lineNum, text: raw, kind: 'data' });
|
|
1406
|
+
}
|
|
1407
|
+
pendingComments = [];
|
|
1408
|
+
i += 1; continue;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
pendingComments = [];
|
|
1415
|
+
i += 1;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
return entries;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
_collectPythonDocstring(lines, startIdx) {
|
|
1422
|
+
if (startIdx >= lines.length) return [];
|
|
1423
|
+
const first = lines[startIdx];
|
|
1424
|
+
const quote = this._pythonTripleQuoteAtStart(first);
|
|
1425
|
+
if (!quote) return [];
|
|
1426
|
+
// single-line case: triple-quote opens AND closes on the same line
|
|
1427
|
+
if (this._pythonTripleQuoteClosedOnLine(first, quote)) {
|
|
1428
|
+
return [{ line: startIdx + 1, text: first, kind: 'comment' }];
|
|
1429
|
+
}
|
|
1430
|
+
// multi-line: collect until the closing triple-quote
|
|
1431
|
+
const result = [{ line: startIdx + 1, text: first, kind: 'comment' }];
|
|
1432
|
+
for (let j = startIdx + 1; j < lines.length; j += 1) {
|
|
1433
|
+
result.push({ line: j + 1, text: lines[j], kind: 'comment' });
|
|
1434
|
+
if (lines[j].includes(quote)) break;
|
|
1435
|
+
}
|
|
1436
|
+
return result;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
_skipPythonDocstring(lines, startIdx) {
|
|
1440
|
+
if (startIdx >= lines.length) return startIdx;
|
|
1441
|
+
const first = lines[startIdx];
|
|
1442
|
+
const quote = this._pythonTripleQuoteAtStart(first);
|
|
1443
|
+
if (!quote) return startIdx;
|
|
1444
|
+
if (this._pythonTripleQuoteClosedOnLine(first, quote)) return startIdx + 1;
|
|
1445
|
+
for (let j = startIdx + 1; j < lines.length; j += 1) {
|
|
1446
|
+
if (lines[j].includes(quote)) return j + 1;
|
|
1447
|
+
}
|
|
1448
|
+
return lines.length;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
// ── C / C++ parser ────────────────────────────────────────────────────────
|
|
1452
|
+
//
|
|
1453
|
+
// Regex-based, same approach as the JS path: walk lines, match a set
|
|
1454
|
+
// of declaration patterns. Mirrors what _parseJS does for JS — gets
|
|
1455
|
+
// the agent a high-level skeleton of any C/CPP file (functions,
|
|
1456
|
+
// classes/structs, includes, top-level macros) without bringing in
|
|
1457
|
+
// a full C parser. The proper tree-sitter migration (see #5 plan)
|
|
1458
|
+
// replaces this for full accuracy on edge cases like multi-line
|
|
1459
|
+
// function signatures, templated declarations, and trailing return
|
|
1460
|
+
// types — those work in 90 % of real code already because most
|
|
1461
|
+
// declarations fit on one line.
|
|
1462
|
+
//
|
|
1463
|
+
// Patterns covered:
|
|
1464
|
+
// - #include <...> / #include "..." → 'import' kind
|
|
1465
|
+
// - #define MACRO ... → 'signature' kind
|
|
1466
|
+
// - class Foo { → 'signature'
|
|
1467
|
+
// - struct Foo { → 'signature'
|
|
1468
|
+
// - enum class Foo { → 'signature'
|
|
1469
|
+
// - namespace foo { → 'signature'
|
|
1470
|
+
// - typedef … name; → 'signature'
|
|
1471
|
+
// - using name = …; → 'signature'
|
|
1472
|
+
// - free-function: `<type> name(args) {` → 'signature'
|
|
1473
|
+
// - method: `<type> Class::name(args) {` → 'signature'
|
|
1474
|
+
// - constructor: `Class::Class(args) {` → 'signature'
|
|
1475
|
+
// - destructor: `Class::~Class()` → 'signature'
|
|
1476
|
+
//
|
|
1477
|
+
// Skipped (intentional):
|
|
1478
|
+
// - Function prototypes (declarations w/o body) — too noisy in
|
|
1479
|
+
// headers; the user usually wants the definitions
|
|
1480
|
+
// - Lambdas — covered by treating the enclosing function as the
|
|
1481
|
+
// signature
|
|
1482
|
+
_parseC(lines, { publicOnly, withComments, includeImports }) {
|
|
1483
|
+
const entries = [];
|
|
1484
|
+
let pendingComments = [];
|
|
1485
|
+
let inBlockComment = false;
|
|
1486
|
+
|
|
1487
|
+
// C/C++ tokens we accept at the head of a function/type declaration.
|
|
1488
|
+
// The classifier walks them one at a time using consumeKeyword —
|
|
1489
|
+
// no regex. After the keyword run we require at least one
|
|
1490
|
+
// additional token before the `(` so we don't misidentify a bare
|
|
1491
|
+
// function call as a definition.
|
|
1492
|
+
const C_TYPE_KEYWORDS = [
|
|
1493
|
+
'static', 'inline', 'extern', 'constexpr', 'virtual', 'explicit',
|
|
1494
|
+
'friend', 'const', 'mutable', 'register', 'volatile',
|
|
1495
|
+
'signed', 'unsigned', 'short', 'long',
|
|
1496
|
+
// Built-in primitive types — frequently followed by an ident.
|
|
1497
|
+
'void', 'bool', 'char', 'int', 'float', 'double',
|
|
1498
|
+
'auto', 'wchar_t', 'char16_t', 'char32_t',
|
|
1499
|
+
];
|
|
1500
|
+
|
|
1501
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
1502
|
+
const lineNum = i + 1;
|
|
1503
|
+
const raw = lines[i];
|
|
1504
|
+
const start = skipWhitespace(raw, 0);
|
|
1505
|
+
|
|
1506
|
+
// ── block + line comments ────────────────────────────────────
|
|
1507
|
+
if (inBlockComment) {
|
|
1508
|
+
if (withComments) pendingComments.push({ line: lineNum, text: raw, kind: 'comment' });
|
|
1509
|
+
if (raw.includes('*/')) inBlockComment = false;
|
|
1510
|
+
continue;
|
|
1511
|
+
}
|
|
1512
|
+
if (raw[start] === '/' && raw[start + 1] === '*') {
|
|
1513
|
+
if (withComments) pendingComments.push({ line: lineNum, text: raw, kind: 'comment' });
|
|
1514
|
+
// The block-comment scan checks anywhere on the line; templates
|
|
1515
|
+
// / preproc lines don't typically contain '*/' so this is safe.
|
|
1516
|
+
if (!raw.slice(start + 2).includes('*/')) inBlockComment = true;
|
|
1517
|
+
continue;
|
|
1518
|
+
}
|
|
1519
|
+
if (raw[start] === '/' && raw[start + 1] === '/') {
|
|
1520
|
+
if (withComments) pendingComments.push({ line: lineNum, text: raw, kind: 'comment' });
|
|
1521
|
+
continue;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
// ── #include ─────────────────────────────────────────────────
|
|
1525
|
+
if (includeImports && raw[start] === '#') {
|
|
1526
|
+
const afterHash = skipWhitespace(raw, start + 1);
|
|
1527
|
+
if (startsWithKeyword(raw, 'include', afterHash)) {
|
|
1528
|
+
entries.push({ line: lineNum, text: raw, kind: 'import' });
|
|
1529
|
+
pendingComments = [];
|
|
1530
|
+
continue;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
let matched = false;
|
|
1535
|
+
|
|
1536
|
+
// ── #define MACRO … ──────────────────────────────────────────
|
|
1537
|
+
if (raw[start] === '#') {
|
|
1538
|
+
const afterHash = skipWhitespace(raw, start + 1);
|
|
1539
|
+
if (startsWithKeyword(raw, 'define', afterHash)) {
|
|
1540
|
+
const afterKw = skipWhitespace(raw, afterHash + 'define'.length);
|
|
1541
|
+
if (readIdent(raw, afterKw)) matched = true;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
// ── namespace / class / struct / union / enum (incl. `enum class`) ──
|
|
1546
|
+
// Tip: also handle a leading `template <…>` by skipping over it.
|
|
1547
|
+
let probeIdx = start;
|
|
1548
|
+
if (startsWithKeyword(raw, 'template', probeIdx)) {
|
|
1549
|
+
// skip "template" + optional whitespace + `<…>` if present
|
|
1550
|
+
let j = skipWhitespace(raw, probeIdx + 'template'.length);
|
|
1551
|
+
if (raw[j] === '<') {
|
|
1552
|
+
let depth = 1;
|
|
1553
|
+
j += 1;
|
|
1554
|
+
while (j < raw.length && depth > 0) {
|
|
1555
|
+
if (raw[j] === '<') depth += 1;
|
|
1556
|
+
else if (raw[j] === '>') depth -= 1;
|
|
1557
|
+
j += 1;
|
|
1558
|
+
}
|
|
1559
|
+
probeIdx = skipWhitespace(raw, j);
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
const typeHit = consumeAnyKeyword(raw, ['class', 'struct', 'union', 'enum', 'namespace'], probeIdx);
|
|
1563
|
+
if (typeHit) {
|
|
1564
|
+
let after = skipWhitespace(raw, typeHit.nextIdx);
|
|
1565
|
+
// `enum class Color` — accept either form
|
|
1566
|
+
if (typeHit.keyword === 'enum' && startsWithKeyword(raw, 'class', after)) {
|
|
1567
|
+
after = skipWhitespace(raw, after + 'class'.length);
|
|
1568
|
+
}
|
|
1569
|
+
if (readIdent(raw, after)) matched = true;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
// ── typedef … name; ──────────────────────────────────────────
|
|
1573
|
+
if (!matched && startsWithKeyword(raw, 'typedef', start)) {
|
|
1574
|
+
// very permissive — just require a `;` somewhere after typedef
|
|
1575
|
+
if (raw.indexOf(';', start) !== -1) matched = true;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
// ── using name = … ───────────────────────────────────────────
|
|
1579
|
+
if (!matched && startsWithKeyword(raw, 'using', start)) {
|
|
1580
|
+
const afterKw = skipWhitespace(raw, start + 'using'.length);
|
|
1581
|
+
const id = readIdent(raw, afterKw);
|
|
1582
|
+
if (id) {
|
|
1583
|
+
const afterId = skipWhitespace(raw, id.nextIdx);
|
|
1584
|
+
if (raw[afterId] === '=' && raw[afterId + 1] !== '=') matched = true;
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
// ── Function definition: <type-tokens> name(…) ───────────────
|
|
1589
|
+
// Walk past at least one type-ish token before the function name.
|
|
1590
|
+
// The "type-ish" tokens are either keywords from C_TYPE_KEYWORDS
|
|
1591
|
+
// or any plain identifier (could be a user-defined type) — we
|
|
1592
|
+
// require AT LEAST TWO tokens before the `(` so a bare call
|
|
1593
|
+
// `foo(x)` isn't misidentified.
|
|
1594
|
+
if (!matched) {
|
|
1595
|
+
let j = probeIdx;
|
|
1596
|
+
let tokensBeforeParen = 0;
|
|
1597
|
+
let lastWasIdent = false;
|
|
1598
|
+
while (j < raw.length) {
|
|
1599
|
+
// pointer / reference / qualifiers in between tokens
|
|
1600
|
+
if (raw[j] === '*' || raw[j] === '&') { j += 1; continue; }
|
|
1601
|
+
j = skipWhitespace(raw, j);
|
|
1602
|
+
if (j >= raw.length) break;
|
|
1603
|
+
if (raw[j] === '(') break;
|
|
1604
|
+
// accept a templated type like `vector<int>` — skip the `<…>`
|
|
1605
|
+
if (raw[j] === '<' && lastWasIdent) {
|
|
1606
|
+
let depth = 1; j += 1;
|
|
1607
|
+
while (j < raw.length && depth > 0) {
|
|
1608
|
+
if (raw[j] === '<') depth += 1;
|
|
1609
|
+
else if (raw[j] === '>') depth -= 1;
|
|
1610
|
+
j += 1;
|
|
1611
|
+
}
|
|
1612
|
+
continue;
|
|
1613
|
+
}
|
|
1614
|
+
// qualifier keyword?
|
|
1615
|
+
const kw = consumeAnyKeyword(raw, C_TYPE_KEYWORDS, j);
|
|
1616
|
+
if (kw) { j = kw.nextIdx; tokensBeforeParen += 1; lastWasIdent = false; continue; }
|
|
1617
|
+
// plain identifier (possibly `Foo::bar`)
|
|
1618
|
+
const id = readIdent(raw, j);
|
|
1619
|
+
if (!id) break;
|
|
1620
|
+
j = id.nextIdx;
|
|
1621
|
+
// handle `Foo::bar` and similar
|
|
1622
|
+
while (raw[j] === ':' && raw[j + 1] === ':') {
|
|
1623
|
+
j += 2;
|
|
1624
|
+
const more = readIdent(raw, j);
|
|
1625
|
+
if (!more) break;
|
|
1626
|
+
j = more.nextIdx;
|
|
1627
|
+
}
|
|
1628
|
+
tokensBeforeParen += 1;
|
|
1629
|
+
lastWasIdent = true;
|
|
1630
|
+
}
|
|
1631
|
+
if (raw[j] === '(' && tokensBeforeParen >= 2) {
|
|
1632
|
+
// Reject "looks like a call" — `name(args);` ending tail.
|
|
1633
|
+
// For a definition we expect either `) {` or just `,` (multi-line)
|
|
1634
|
+
// or `)` ending the line. A call ends with `);`.
|
|
1635
|
+
const endsWithCallSemi = trimmedEndsWith(raw, ');');
|
|
1636
|
+
if (!endsWithCallSemi) matched = true;
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
// ── Constructor / destructor: `Foo::Foo(...)` / `Foo::~Foo(...)` ──
|
|
1641
|
+
if (!matched) {
|
|
1642
|
+
const id1 = readIdent(raw, start);
|
|
1643
|
+
if (id1 && raw[id1.nextIdx] === ':' && raw[id1.nextIdx + 1] === ':') {
|
|
1644
|
+
let k = id1.nextIdx + 2;
|
|
1645
|
+
if (raw[k] === '~') k += 1;
|
|
1646
|
+
const id2 = readIdent(raw, k);
|
|
1647
|
+
if (id2) {
|
|
1648
|
+
const afterName = skipWhitespace(raw, id2.nextIdx);
|
|
1649
|
+
if (raw[afterName] === '(') matched = true;
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
// publicOnly is a no-op for C — left intact for API parity with
|
|
1655
|
+
// _parseJS. Could later mean "header-public only".
|
|
1656
|
+
void publicOnly;
|
|
1657
|
+
|
|
1658
|
+
if (matched) {
|
|
1659
|
+
if (withComments && pendingComments.length > 0) {
|
|
1660
|
+
for (const c of pendingComments) entries.push(c);
|
|
1661
|
+
}
|
|
1662
|
+
entries.push({ line: lineNum, text: raw, kind: 'signature' });
|
|
1663
|
+
pendingComments = [];
|
|
1664
|
+
} else {
|
|
1665
|
+
pendingComments = [];
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
return entries;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
export default CodeMapTool;
|