@ai-dev-tools/csharp-copilot-core 0.0.19
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/ai-dev-tools-csharp-copilot-core-0.0.19.tgz +0 -0
- package/azure-pipelines.yml +52 -0
- package/out/analyze/cecil.d.ts +1 -0
- package/out/analyze/cecil.js +42 -0
- package/out/analyze/cecil.js.map +1 -0
- package/out/analyze/checkCodeSyntax.d.ts +7 -0
- package/out/analyze/checkCodeSyntax.js +67 -0
- package/out/analyze/checkCodeSyntax.js.map +1 -0
- package/out/analyze/generateCodeDependency.d.ts +6 -0
- package/out/analyze/generateCodeDependency.js +122 -0
- package/out/analyze/generateCodeDependency.js.map +1 -0
- package/out/analyze/installAnalyzerTool.d.ts +1 -0
- package/out/analyze/installAnalyzerTool.js +82 -0
- package/out/analyze/installAnalyzerTool.js.map +1 -0
- package/out/atmpCache/deps/EplantRequestCategoryCondition_Conditions_Eplant_Workflows_SharedSegmentsPlugins_SharedSegments_SharedSegments_CSServiceFundamental_code_D.deps +281 -0
- package/out/atmpCache/deps/IdentitySelectAnalyzer_ToListinatorAnalyzers_src_AIUnitTestExample_code_d.deps +1 -0
- package/out/atmpCache/deps/SqmidHelperTests_Utils_HttpRequestParser_Overview_Workflows_SharedSegmentsTests_SharedSegments_SharedSegments_CSServiceFundamental_code_D.deps +1 -0
- package/out/atmpCache/deps/SqmidHelper_Utils_HttpRequestParser_Overview_Workflows_SharedSegmentsPlugins_SharedSegments_SharedSegments_CSServiceFundamental_code_D.deps +1 -0
- package/out/atmpCache/deps/ToListCountAnalyzerTests_ToListinatorTests_test_AIUnitTestExample_code_d.deps +4037 -0
- package/out/atmpCache/deps/ToListCountAnalyzer_ToListinatorAnalyzers_src_AIUnitTestExample_code_d.deps +1 -0
- package/out/atmpCache/deps/ToListCountCodeFixProvider_ToListinatorCodeFixes_src_AIUnitTestExample_code_d.deps +1 -0
- package/out/atmpCache/deps/ToListForEachAnalyzer_ToListinatorAnalyzers_src_AIUnitTestExample_code_d.deps +1 -0
- package/out/atmpCache/dllref/ToListinatorTests_ToListinatorTests_test_AIUnitTestExample_code_d.dllref +202 -0
- package/out/batch/generateCodeTests.d.ts +6 -0
- package/out/batch/generateCodeTests.js +147 -0
- package/out/batch/generateCodeTests.js.map +1 -0
- package/out/batch/getFolderCodeFile.d.ts +1 -0
- package/out/batch/getFolderCodeFile.js +19 -0
- package/out/batch/getFolderCodeFile.js.map +1 -0
- package/out/batch/getProjectCodeFile.d.ts +4 -0
- package/out/batch/getProjectCodeFile.js +87 -0
- package/out/batch/getProjectCodeFile.js.map +1 -0
- package/out/batch/getSolutionCodeFile.d.ts +8 -0
- package/out/batch/getSolutionCodeFile.js +70 -0
- package/out/batch/getSolutionCodeFile.js.map +1 -0
- package/out/benchmark/formatToMarkdown.d.ts +2 -0
- package/out/benchmark/formatToMarkdown.js +101 -0
- package/out/benchmark/formatToMarkdown.js.map +1 -0
- package/out/benchmark/generateBenchmarkReport.d.ts +1 -0
- package/out/benchmark/generateBenchmarkReport.js +82 -0
- package/out/benchmark/generateBenchmarkReport.js.map +1 -0
- package/out/codeCoverage/codeCoverage.d.ts +6 -0
- package/out/codeCoverage/codeCoverage.js +35 -0
- package/out/codeCoverage/codeCoverage.js.map +1 -0
- package/out/codeCoverage/codeCoverageReport.d.ts +6 -0
- package/out/codeCoverage/codeCoverageReport.js +72 -0
- package/out/codeCoverage/codeCoverageReport.js.map +1 -0
- package/out/codeCoverage/extractCodeCoverageInfo.d.ts +2 -0
- package/out/codeCoverage/extractCodeCoverageInfo.js +80 -0
- package/out/codeCoverage/extractCodeCoverageInfo.js.map +1 -0
- package/out/codeCoverage/generateCodeCoverageReport.d.ts +1 -0
- package/out/codeCoverage/generateCodeCoverageReport.js +27 -0
- package/out/codeCoverage/generateCodeCoverageReport.js.map +1 -0
- package/out/codeCoverage/getCodeCoverageSetting.d.ts +1 -0
- package/out/codeCoverage/getCodeCoverageSetting.js +58 -0
- package/out/codeCoverage/getCodeCoverageSetting.js.map +1 -0
- package/out/codeCoverage/reportTool.d.ts +2 -0
- package/out/codeCoverage/reportTool.js +22 -0
- package/out/codeCoverage/reportTool.js.map +1 -0
- package/out/codeCoverage/simplifyCoverageXml.d.ts +2 -0
- package/out/codeCoverage/simplifyCoverageXml.js +116 -0
- package/out/codeCoverage/simplifyCoverageXml.js.map +1 -0
- package/out/codebk/250804prompt/buildAfGuidelines.liquid +15 -0
- package/out/codebk/250804prompt/general/generalBuildAutofixGuidelines.liquid +13 -0
- package/out/codebk/250804prompt/general/generalUtGuidelines.liquid +18 -0
- package/out/codebk/250804prompt/generateUtAutoFix.liquid +19 -0
- package/out/codebk/250804prompt/generateUtGuidelines.liquid +13 -0
- package/out/codebk/250804prompt/generateUtSystem.liquid +5 -0
- package/out/codebk/250804prompt/generateUtUserInput.liquid +27 -0
- package/out/codebk/250804prompt/testAfGuidelines.liquid +6 -0
- package/out/codebk/250804prompt/xap/xapBuildAutofixGuidelines.liquid +13 -0
- package/out/codebk/250804prompt/xap/xapCodeCodeDependency.liquid +0 -0
- package/out/codebk/250804prompt/xap/xapCodeSample.liquid +38 -0
- package/out/codebk/250804prompt/xap/xapUtGuideline-240804.liquid +36 -0
- package/out/codebk/250804prompt/xap/xapUtGuideline.liquid +36 -0
- package/out/codebk/childProcessManager.d.ts +1 -0
- package/out/codebk/childProcessManager.js +50 -0
- package/out/codebk/childProcessManager.js.map +1 -0
- package/out/codebk/msBuidSpawn.d.ts +1 -0
- package/out/codebk/msBuidSpawn.js +58 -0
- package/out/codebk/msBuidSpawn.js.map +1 -0
- package/out/codebk/msBuild.d.ts +1 -0
- package/out/codebk/msBuild.js +123 -0
- package/out/codebk/msBuild.js.map +1 -0
- package/out/codebk/old/generateXapTestAutoFix.liquid +12 -0
- package/out/codebk/old/generateXapTestGuidelines-fm.liquid +68 -0
- package/out/codebk/old/generateXapTestGuidelines.liquid +28 -0
- package/out/codebk/old/xapGuideline-fm.liquid +149 -0
- package/out/codebk/old/xapGuideline.liquid +37 -0
- package/out/codebk/oldExec/checkCodeSyntax.d.ts +1 -0
- package/out/codebk/oldExec/checkCodeSyntax.js +81 -0
- package/out/codebk/oldExec/checkCodeSyntax.js.map +1 -0
- package/out/codebk/oldExec/codeCoverage.d.ts +1 -0
- package/out/codebk/oldExec/codeCoverage.js +54 -0
- package/out/codebk/oldExec/codeCoverage.js.map +1 -0
- package/out/codebk/oldExec/codeCoverageReport.d.ts +1 -0
- package/out/codebk/oldExec/codeCoverageReport.js +64 -0
- package/out/codebk/oldExec/codeCoverageReport.js.map +1 -0
- package/out/codebk/oldExec/containsMethods.d.ts +1 -0
- package/out/codebk/oldExec/containsMethods.js +74 -0
- package/out/codebk/oldExec/containsMethods.js.map +1 -0
- package/out/codebk/oldExec/generateCodeDependency.d.ts +1 -0
- package/out/codebk/oldExec/generateCodeDependency.js +95 -0
- package/out/codebk/oldExec/generateCodeDependency.js.map +1 -0
- package/out/codebk/oldExec/msBuild.d.ts +1 -0
- package/out/codebk/oldExec/msBuild.js +53 -0
- package/out/codebk/oldExec/msBuild.js.map +1 -0
- package/out/codebk/oldExec/vsTest.d.ts +1 -0
- package/out/codebk/oldExec/vsTest.js +71 -0
- package/out/codebk/oldExec/vsTest.js.map +1 -0
- package/out/codebk/prompts/general/generalUnitTestGuidelines-20250702.liquid +56 -0
- package/out/codebk/prompts/generateXapTestGuidelines-20250704.liquid +21 -0
- package/out/codebk/prompts/generateXapTestGuidelines-o.liquid +29 -0
- package/out/codebk/prompts/xap/xapGuideline-o.liquid +45 -0
- package/out/codebk/testbuildkill.d.ts +1 -0
- package/out/codebk/testbuildkill.js +37 -0
- package/out/codebk/testbuildkill.js.map +1 -0
- package/out/command/index.d.ts +2 -0
- package/out/command/index.js +85 -0
- package/out/command/index.js.map +1 -0
- package/out/command/utGenWrapper.d.ts +3 -0
- package/out/command/utGenWrapper.js +40 -0
- package/out/command/utGenWrapper.js.map +1 -0
- package/out/exit/childProcessManager.d.ts +2 -0
- package/out/exit/childProcessManager.js +43 -0
- package/out/exit/childProcessManager.js.map +1 -0
- package/out/exit/setupProcessSignalHandler.d.ts +1 -0
- package/out/exit/setupProcessSignalHandler.js +18 -0
- package/out/exit/setupProcessSignalHandler.js.map +1 -0
- package/out/gen/autoFix.d.ts +4 -0
- package/out/gen/autoFix.js +125 -0
- package/out/gen/autoFix.js.map +1 -0
- package/out/gen/csharpUtGen.d.ts +2 -0
- package/out/gen/csharpUtGen.js +151 -0
- package/out/gen/csharpUtGen.js.map +1 -0
- package/out/gen/ensureValidLLMResponse.d.ts +1 -0
- package/out/gen/ensureValidLLMResponse.js +19 -0
- package/out/gen/ensureValidLLMResponse.js.map +1 -0
- package/out/gen/postGen/extractCodeFromResponse.d.ts +1 -0
- package/out/gen/postGen/extractCodeFromResponse.js +37 -0
- package/out/gen/postGen/extractCodeFromResponse.js.map +1 -0
- package/out/gen/postGen/postGenProcess.d.ts +1 -0
- package/out/gen/postGen/postGenProcess.js +36 -0
- package/out/gen/postGen/postGenProcess.js.map +1 -0
- package/out/gen/postGen/removeComments.d.ts +1 -0
- package/out/gen/postGen/removeComments.js +92 -0
- package/out/gen/postGen/removeComments.js.map +1 -0
- package/out/gen/postGen/removeSingleLines.d.ts +1 -0
- package/out/gen/postGen/removeSingleLines.js +28 -0
- package/out/gen/postGen/removeSingleLines.js.map +1 -0
- package/out/gen/postGen/repairRequiredNameSpaces.d.ts +1 -0
- package/out/gen/postGen/repairRequiredNameSpaces.js +116 -0
- package/out/gen/postGen/repairRequiredNameSpaces.js.map +1 -0
- package/out/gen/postGen/validateTestCode.d.ts +1 -0
- package/out/gen/postGen/validateTestCode.js +14 -0
- package/out/gen/postGen/validateTestCode.js.map +1 -0
- package/out/gen/preGen/excludeFileName.d.ts +1 -0
- package/out/gen/preGen/excludeFileName.js +49 -0
- package/out/gen/preGen/excludeFileName.js.map +1 -0
- package/out/gen/preGen/excludeSpecificTag.d.ts +1 -0
- package/out/gen/preGen/excludeSpecificTag.js +18 -0
- package/out/gen/preGen/excludeSpecificTag.js.map +1 -0
- package/out/gen/preGen/preGenProcess.d.ts +1 -0
- package/out/gen/preGen/preGenProcess.js +22 -0
- package/out/gen/preGen/preGenProcess.js.map +1 -0
- package/out/gen/preGen/validateCode.d.ts +3 -0
- package/out/gen/preGen/validateCode.js +62 -0
- package/out/gen/preGen/validateCode.js.map +1 -0
- package/out/index.d.ts +2 -0
- package/out/index.js +8 -0
- package/out/index.js.map +1 -0
- package/out/llm/model/Gpt4o.d.ts +1 -0
- package/out/llm/model/Gpt4o.js +91 -0
- package/out/llm/model/Gpt4o.js.map +1 -0
- package/out/llm/model/claude4.d.ts +1 -0
- package/out/llm/model/claude4.js +3 -0
- package/out/llm/model/claude4.js.map +1 -0
- package/out/llm/preparePrompt.d.ts +2 -0
- package/out/llm/preparePrompt.js +110 -0
- package/out/llm/preparePrompt.js.map +1 -0
- package/out/llm/prompt/buildAfGuidelines.liquid +15 -0
- package/out/llm/prompt/general/generalBuildAutofixGuidelines.liquid +13 -0
- package/out/llm/prompt/general/generalUtGuidelines.liquid +16 -0
- package/out/llm/prompt/generateUtAutoFix.liquid +19 -0
- package/out/llm/prompt/generateUtDependency.liquid +3 -0
- package/out/llm/prompt/generateUtGuidelines.liquid +29 -0
- package/out/llm/prompt/generateUtSystem.liquid +5 -0
- package/out/llm/prompt/generateUtTemplate.liquid +30 -0
- package/out/llm/prompt/generateUtUserInput.liquid +4 -0
- package/out/llm/prompt/testAfGuidelines.liquid +6 -0
- package/out/llm/prompt/userCustomPrompt.liquid +0 -0
- package/out/llm/prompt/xap/xapBuildAutofixGuidelines.liquid +13 -0
- package/out/llm/prompt/xap/xapCodeCodeDependency.liquid +0 -0
- package/out/llm/prompt/xap/xapCodeSample.liquid +38 -0
- package/out/llm/prompt/xap/xapUtGuideline-240804.liquid +36 -0
- package/out/llm/prompt/xap/xapUtGuideline.liquid +37 -0
- package/out/llm/sendRequestToLLM.d.ts +4 -0
- package/out/llm/sendRequestToLLM.js +12 -0
- package/out/llm/sendRequestToLLM.js.map +1 -0
- package/out/llm/sendRequestToSelfHostLLM.d.ts +4 -0
- package/out/llm/sendRequestToSelfHostLLM.js +41 -0
- package/out/llm/sendRequestToSelfHostLLM.js.map +1 -0
- package/out/metrics/appInsightTelemetry.d.ts +6 -0
- package/out/metrics/appInsightTelemetry.js +77 -0
- package/out/metrics/appInsightTelemetry.js.map +1 -0
- package/out/metrics/machineId.d.ts +11 -0
- package/out/metrics/machineId.js +85 -0
- package/out/metrics/machineId.js.map +1 -0
- package/out/setup/setup.d.ts +1 -0
- package/out/setup/setup.js +10 -0
- package/out/setup/setup.js.map +1 -0
- package/out/setup/setupConsole.d.ts +1 -0
- package/out/setup/setupConsole.js +23 -0
- package/out/setup/setupConsole.js.map +1 -0
- package/out/setup/setupLLMRequest.d.ts +2 -0
- package/out/setup/setupLLMRequest.js +10 -0
- package/out/setup/setupLLMRequest.js.map +1 -0
- package/out/tools/devenvcom.cmd +13 -0
- package/out/tools/devenvexe.cmd +13 -0
- package/out/tools/msbuildexe.cmd +13 -0
- package/out/tools/vstestexe.cmd +13 -0
- package/out/types/benchmark.d.ts +11 -0
- package/out/types/benchmark.js +3 -0
- package/out/types/benchmark.js.map +1 -0
- package/out/types/buildResult.d.ts +8 -0
- package/out/types/buildResult.js +3 -0
- package/out/types/buildResult.js.map +1 -0
- package/out/types/constants.d.ts +3 -0
- package/out/types/constants.js +7 -0
- package/out/types/constants.js.map +1 -0
- package/out/types/genResult.d.ts +10 -0
- package/out/types/genResult.js +3 -0
- package/out/types/genResult.js.map +1 -0
- package/out/types/testResult.d.ts +12 -0
- package/out/types/testResult.js +3 -0
- package/out/types/testResult.js.map +1 -0
- package/out/types/verifyResult.d.ts +8 -0
- package/out/types/verifyResult.js +3 -0
- package/out/types/verifyResult.js.map +1 -0
- package/out/utils/checkTestProject.d.ts +2 -0
- package/out/utils/checkTestProject.js +79 -0
- package/out/utils/checkTestProject.js.map +1 -0
- package/out/utils/checkXapCode.d.ts +2 -0
- package/out/utils/checkXapCode.js +59 -0
- package/out/utils/checkXapCode.js.map +1 -0
- package/out/utils/delay.d.ts +1 -0
- package/out/utils/delay.js +7 -0
- package/out/utils/delay.js.map +1 -0
- package/out/utils/detectTestFramework.d.ts +1 -0
- package/out/utils/detectTestFramework.js +32 -0
- package/out/utils/detectTestFramework.js.map +1 -0
- package/out/utils/fileUtils.d.ts +2 -0
- package/out/utils/fileUtils.js +42 -0
- package/out/utils/fileUtils.js.map +1 -0
- package/out/utils/generateCodeSha256.d.ts +1 -0
- package/out/utils/generateCodeSha256.js +46 -0
- package/out/utils/generateCodeSha256.js.map +1 -0
- package/out/utils/getCodeStructurePath.d.ts +5 -0
- package/out/utils/getCodeStructurePath.js +155 -0
- package/out/utils/getCodeStructurePath.js.map +1 -0
- package/out/utils/getOrCreateDir.d.ts +2 -0
- package/out/utils/getOrCreateDir.js +63 -0
- package/out/utils/getOrCreateDir.js.map +1 -0
- package/out/utils/getTestCodeInfo.d.ts +2 -0
- package/out/utils/getTestCodeInfo.js +121 -0
- package/out/utils/getTestCodeInfo.js.map +1 -0
- package/out/utils/getTestFile.d.ts +13 -0
- package/out/utils/getTestFile.js +295 -0
- package/out/utils/getTestFile.js.map +1 -0
- package/out/utils/parseBuildResult.d.ts +3 -0
- package/out/utils/parseBuildResult.js +44 -0
- package/out/utils/parseBuildResult.js.map +1 -0
- package/out/utils/parseSyntaxCheckResult.d.ts +2 -0
- package/out/utils/parseSyntaxCheckResult.js +38 -0
- package/out/utils/parseSyntaxCheckResult.js.map +1 -0
- package/out/utils/parseVstestResult.d.ts +3 -0
- package/out/utils/parseVstestResult.js +61 -0
- package/out/utils/parseVstestResult.js.map +1 -0
- package/out/utils/removeFailedTestMethods.d.ts +3 -0
- package/out/utils/removeFailedTestMethods.js +207 -0
- package/out/utils/removeFailedTestMethods.js.map +1 -0
- package/out/utils/runCommand.d.ts +1 -0
- package/out/utils/runCommand.js +14 -0
- package/out/utils/runCommand.js.map +1 -0
- package/out/utils/spawnExec.d.ts +1 -0
- package/out/utils/spawnExec.js +80 -0
- package/out/utils/spawnExec.js.map +1 -0
- package/out/utils/verifyBuildErrorCausedFile.d.ts +1 -0
- package/out/utils/verifyBuildErrorCausedFile.js +60 -0
- package/out/utils/verifyBuildErrorCausedFile.js.map +1 -0
- package/out/utils/verifyTestCode.d.ts +2 -0
- package/out/utils/verifyTestCode.js +25 -0
- package/out/utils/verifyTestCode.js.map +1 -0
- package/out/utils/writeGenCode.d.ts +1 -0
- package/out/utils/writeGenCode.js +50 -0
- package/out/utils/writeGenCode.js.map +1 -0
- package/out/vs/msBuild.d.ts +13 -0
- package/out/vs/msBuild.js +81 -0
- package/out/vs/msBuild.js.map +1 -0
- package/out/vs/vsTest.d.ts +15 -0
- package/out/vs/vsTest.js +107 -0
- package/out/vs/vsTest.js.map +1 -0
- package/out/vs/vsTools.d.ts +7 -0
- package/out/vs/vsTools.js +177 -0
- package/out/vs/vsTools.js.map +1 -0
- package/out/vsPlugin/getVsPluginVerifyResult.d.ts +2 -0
- package/out/vsPlugin/getVsPluginVerifyResult.js +41 -0
- package/out/vsPlugin/getVsPluginVerifyResult.js.map +1 -0
- package/out/vsPlugin/interactionConstants.d.ts +2 -0
- package/out/vsPlugin/interactionConstants.js +10 -0
- package/out/vsPlugin/interactionConstants.js.map +1 -0
- package/out/vsPlugin/sendStdToVsPlugin.d.ts +1 -0
- package/out/vsPlugin/sendStdToVsPlugin.js +12 -0
- package/out/vsPlugin/sendStdToVsPlugin.js.map +1 -0
- package/out/vsPlugin/stdListener.d.ts +3 -0
- package/out/vsPlugin/stdListener.js +57 -0
- package/out/vsPlugin/stdListener.js.map +1 -0
- package/package.json +33 -0
- package/tools/devenvcom.cmd +13 -0
- package/tools/devenvexe.cmd +13 -0
- package/tools/msbuildexe.cmd +13 -0
- package/tools/vstestexe.cmd +13 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactionConstants.js","sourceRoot":"","sources":["../../src/vsPlugin/interactionConstants.ts"],"names":[],"mappings":";;;AAAA,4DAA4D;AAC5D,kFAAkF;AACrE,QAAA,cAAc,GAAG,sBAAsB,CAAC;AAErD,8BAA8B;AAC9B,oEAAoE;AACvD,QAAA,cAAc,GAAG,qBAAqB,CAAC","sourcesContent":["// interaction commands between vs plugin and csharp-ut-core\r\n// these commands are used to communicate between the vs plugin and csharp-ut-core\r\nexport const VERIFYTESTCODE = \"__VERIFY_TEST_CODE__\";\r\n\r\n// interaction tag for logging\r\n// this tag is used to identify the interaction messages in the logs\r\nexport const INTERACTIONTAG = \"__INTERACTION_TAG__\";"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sendStdToVsPlugin(command: string, testFilePath: string): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendStdToVsPlugin = sendStdToVsPlugin;
|
|
4
|
+
const interactionConstants_1 = require("./interactionConstants");
|
|
5
|
+
function sendStdToVsPlugin(command, testFilePath) {
|
|
6
|
+
const payload = {
|
|
7
|
+
command,
|
|
8
|
+
testFilePath
|
|
9
|
+
};
|
|
10
|
+
console.log(`[${interactionConstants_1.INTERACTIONTAG}] ${JSON.stringify(payload)}`);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=sendStdToVsPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendStdToVsPlugin.js","sourceRoot":"","sources":["../../src/vsPlugin/sendStdToVsPlugin.ts"],"names":[],"mappings":";;AAEA,8CAMC;AARD,iEAAwD;AAExD,SAAgB,iBAAiB,CAAC,OAAe,EAAE,YAAoB;IACrE,MAAM,OAAO,GAAG;QACd,OAAO;QACP,YAAY;KACb,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,IAAI,qCAAc,KAAK,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import { INTERACTIONTAG } from \"./interactionConstants\";\r\n\r\nexport function sendStdToVsPlugin(command: string, testFilePath: string) {\r\n const payload = {\r\n command,\r\n testFilePath\r\n };\r\n console.log(`[${INTERACTIONTAG}] ${JSON.stringify(payload)}`);\r\n}\r\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.vsPluginEventEmitter = exports.readLineInterface = void 0;
|
|
7
|
+
exports.startStdListener = startStdListener;
|
|
8
|
+
const events_1 = __importDefault(require("events"));
|
|
9
|
+
const interactionConstants_1 = require("./interactionConstants");
|
|
10
|
+
const readline_1 = __importDefault(require("readline"));
|
|
11
|
+
function startStdListener() {
|
|
12
|
+
process.stdin.setEncoding('utf8');
|
|
13
|
+
exports.readLineInterface = readline_1.default.createInterface({ input: process.stdin });
|
|
14
|
+
exports.vsPluginEventEmitter = new events_1.default();
|
|
15
|
+
console.log("VS plugin std listener starting...");
|
|
16
|
+
exports.readLineInterface.on("line", async (line) => {
|
|
17
|
+
line = line.trim();
|
|
18
|
+
if (!line)
|
|
19
|
+
return;
|
|
20
|
+
try {
|
|
21
|
+
await handleMessage(line);
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
console.error(`Failed to parse message: ${line}`);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
exports.readLineInterface.on("close", () => {
|
|
28
|
+
console.error("readLineInterface closed. Node.js process exiting.");
|
|
29
|
+
process.exit(0);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
async function handleMessage(line) {
|
|
33
|
+
try {
|
|
34
|
+
const msg = JSON.parse(line);
|
|
35
|
+
if (!msg?.command) {
|
|
36
|
+
console.log(`No command in msg: ${msg}`);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
console.log(`Received command: ${msg}`);
|
|
40
|
+
dispatchCommand(msg);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
console.log("invalid JSON: " + line);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function dispatchCommand(msg) {
|
|
48
|
+
switch (msg.command) {
|
|
49
|
+
case interactionConstants_1.VERIFYTESTCODE:
|
|
50
|
+
console.log("Received VERIFYTESTCODE command response." + JSON.stringify(msg));
|
|
51
|
+
exports.vsPluginEventEmitter.emit(interactionConstants_1.VERIFYTESTCODE, msg);
|
|
52
|
+
break;
|
|
53
|
+
default:
|
|
54
|
+
console.log(`Unknown command: ${msg.command}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=stdListener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdListener.js","sourceRoot":"","sources":["../../src/vsPlugin/stdListener.ts"],"names":[],"mappings":";;;;;;AA0BA,4CAqBC;AA/CD,oDAAkC;AAClC,iEAAwD;AACxD,wDAAgC;AAwBhC,SAAgB,gBAAgB;IAC5B,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,yBAAiB,GAAI,kBAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACxE,4BAAoB,GAAG,IAAI,gBAAY,EAAE,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;IAElD,yBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACxC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACnB,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,IAAI,CAAC;YACD,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC;QACtD,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,yBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QAC/B,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACP,CAAC;AAGD,KAAK,UAAU,aAAa,CAAC,IAAY;IACrC,IAAI,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAE7B,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC;YAChB,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,EAAE,CAAC,CAAC;YACzC,OAAO;QACX,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;QACxC,eAAe,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;QACrC,OAAO;IACX,CAAC;AACL,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,GAAG;IAC9B,QAAQ,GAAG,CAAC,OAAO,EAAE,CAAC;QAClB,KAAK,qCAAc;YACf,OAAO,CAAC,GAAG,CAAC,2CAA2C,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/E,4BAAoB,CAAC,IAAI,CAAC,qCAAc,EAAE,GAAG,CAAC,CAAC;YAC/C,MAAM;QAEV;YACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACvD,CAAC;AACL,CAAC","sourcesContent":["import EventEmitter from \"events\";\r\nimport { VERIFYTESTCODE } from \"./interactionConstants\";\r\nimport readline from 'readline';\r\n\r\n// export function startStdListener() {\r\n// console.log(\"VS plugin std listener starting...\");\r\n\r\n// process.stdin.setEncoding('utf8');\r\n\r\n// let buffer = '';\r\n// process.stdin.on('data', async (chunk: string) => {\r\n// buffer += chunk;\r\n// let newlineIndex: number;\r\n// while ((newlineIndex = buffer.indexOf('\\n')) >= 0) {\r\n// const line = buffer.slice(0, newlineIndex).trim();\r\n// buffer = buffer.slice(newlineIndex + 1);\r\n// if (line) {\r\n// handleMessage(line)\r\n// }\r\n// }\r\n// });\r\n// }\r\n\r\nexport let readLineInterface;\r\nexport let vsPluginEventEmitter;\r\n\r\nexport function startStdListener() {\r\n process.stdin.setEncoding('utf8');\r\n readLineInterface = readline.createInterface({ input: process.stdin });\r\n vsPluginEventEmitter = new EventEmitter();\r\n console.log(\"VS plugin std listener starting...\");\r\n\r\n readLineInterface.on(\"line\", async (line) => {\r\n line = line.trim();\r\n if (!line) return;\r\n\r\n try {\r\n await handleMessage(line);\r\n } catch (err: any) {\r\n console.error(`Failed to parse message: ${line}`);\r\n }\r\n });\r\n\r\n readLineInterface.on(\"close\", () => {\r\n console.error(\"readLineInterface closed. Node.js process exiting.\");\r\n process.exit(0);\r\n });\r\n}\r\n\r\n\r\nasync function handleMessage(line: string) {\r\n try {\r\n const msg = JSON.parse(line);\r\n\r\n if (!msg?.command) {\r\n console.log(`No command in msg: ${msg}`);\r\n return;\r\n }\r\n\r\n console.log(`Received command: ${msg}`);\r\n dispatchCommand(msg);\r\n } catch {\r\n console.log(\"invalid JSON: \" + line);\r\n return;\r\n }\r\n}\r\n\r\nasync function dispatchCommand(msg) {\r\n switch (msg.command) {\r\n case VERIFYTESTCODE:\r\n console.log(\"Received VERIFYTESTCODE command response.\" + JSON.stringify(msg));\r\n vsPluginEventEmitter.emit(VERIFYTESTCODE, msg);\r\n break;\r\n\r\n default:\r\n console.log(`Unknown command: ${msg.command}`);\r\n }\r\n}"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ai-dev-tools/csharp-copilot-core",
|
|
3
|
+
"version": "0.0.19",
|
|
4
|
+
"description": "Core library for csharp-copilot",
|
|
5
|
+
"main": "out/index.js",
|
|
6
|
+
"typings": "out/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc && npm run copy-script",
|
|
9
|
+
"copy-script": "cpy \"src/**/*.liquid\" \"tools/\" out",
|
|
10
|
+
"setup-npm-auth": "npm install -g @microsoft/artifacts-npm-credprovider --registry https://pkgs.dev.azure.com/mseng/226da8e7-b1c0-4167-9678-53f461e07706/_packaging/AzureArtifacts/npm/registry/ && set NUGET_CREDENTIALPROVIDER_VSTS_TOKENTYPE=SelfDescribing && artifacts-npm-credprovider"
|
|
11
|
+
},
|
|
12
|
+
"bin": {
|
|
13
|
+
"csharputc": "./out/command/index.js"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@types/node": "^22.15.29",
|
|
17
|
+
"@types/node-fetch": "^2.6.12",
|
|
18
|
+
"cpy-cli": "^5.0.0",
|
|
19
|
+
"typescript": "^5.8.3"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@azure/identity": "1.5.2",
|
|
23
|
+
"@types/yargs": "^17.0.33",
|
|
24
|
+
"applicationinsights": "1.8.10",
|
|
25
|
+
"edge-js": "^24.0.4",
|
|
26
|
+
"fast-glob": "^3.3.3",
|
|
27
|
+
"fast-xml-parser": "^5.2.5",
|
|
28
|
+
"liquidjs": "^10.21.1",
|
|
29
|
+
"node-fetch": "^2.7.0",
|
|
30
|
+
"tree-kill": "^1.2.2",
|
|
31
|
+
"yargs": "^17.7.2"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@echo OFF
|
|
2
|
+
|
|
3
|
+
IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.com" (
|
|
4
|
+
SET DEVENVCOM="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.com"
|
|
5
|
+
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.com" (
|
|
6
|
+
SET DEVENVCOM="C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.com"
|
|
7
|
+
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.com" (
|
|
8
|
+
SET DEVENVCOM="C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.com"
|
|
9
|
+
) ELSE (
|
|
10
|
+
SET DEVENVCOM="devenv.com"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
%DEVENVCOM% %*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@echo OFF
|
|
2
|
+
|
|
3
|
+
IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe" (
|
|
4
|
+
SET DEVENVEXE="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe"
|
|
5
|
+
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" (
|
|
6
|
+
SET DEVENVEXE="C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe"
|
|
7
|
+
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe" (
|
|
8
|
+
SET DEVENVEXE="C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe"
|
|
9
|
+
) ELSE (
|
|
10
|
+
SET DEVENVEXE="devenv.exe"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
%DEVENVEXE% %*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@echo OFF
|
|
2
|
+
|
|
3
|
+
IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\MSbuild.exe" (
|
|
4
|
+
SET MSBUILDEXE="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\MSbuild.exe"
|
|
5
|
+
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSbuild.exe" (
|
|
6
|
+
SET MSBUILDEXE="C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSbuild.exe"
|
|
7
|
+
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\MSbuild.exe" (
|
|
8
|
+
SET MSBUILDEXE="C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\MSbuild.exe"
|
|
9
|
+
) ELSE (
|
|
10
|
+
SET MSBUILDEXE="msbuild.exe"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
%MSBUILDEXE% %*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@echo OFF
|
|
2
|
+
|
|
3
|
+
IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" (
|
|
4
|
+
SET VSTESTEXE="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
|
|
5
|
+
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" (
|
|
6
|
+
SET VSTESTEXE="C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
|
|
7
|
+
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" (
|
|
8
|
+
SET VSTESTEXE="C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
|
|
9
|
+
) ELSE (
|
|
10
|
+
SET VSTESTEXE="vstest.console.exe"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
%VSTESTEXE% %*
|