@ai-dev-tools/csharp-copilot-core 0.0.19 → 0.0.29

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.
Files changed (82) hide show
  1. package/ReadMe.md +174 -0
  2. package/devops/package.json +37 -0
  3. package/out/analyze/generateCodeDependency.d.ts +1 -1
  4. package/out/analyze/generateCodeDependency.js +7 -3
  5. package/out/analyze/generateCodeDependency.js.map +1 -1
  6. package/out/batch/getProjectCodeFile.js +1 -2
  7. package/out/batch/getProjectCodeFile.js.map +1 -1
  8. package/out/codeCoverage/codeCoverage.js +5 -1
  9. package/out/codeCoverage/codeCoverage.js.map +1 -1
  10. package/out/codeCoverage/codeCoverageReport.js +5 -1
  11. package/out/codeCoverage/codeCoverageReport.js.map +1 -1
  12. package/out/codeCoverage/extractCoverageReportPath.d.ts +1 -0
  13. package/out/codeCoverage/extractCoverageReportPath.js +24 -0
  14. package/out/codeCoverage/extractCoverageReportPath.js.map +1 -0
  15. package/out/codeCoverage/generateCodeCoverageReport.js +3 -0
  16. package/out/codeCoverage/generateCodeCoverageReport.js.map +1 -1
  17. package/out/codeCoverage/simplifyCoverageXml.js +2 -1
  18. package/out/codeCoverage/simplifyCoverageXml.js.map +1 -1
  19. package/out/command/index.js +11 -2
  20. package/out/command/index.js.map +1 -1
  21. package/out/command/utGenWrapper.d.ts +1 -0
  22. package/out/command/utGenWrapper.js +8 -2
  23. package/out/command/utGenWrapper.js.map +1 -1
  24. package/out/gen/autoFix.d.ts +3 -3
  25. package/out/gen/autoFix.js +8 -8
  26. package/out/gen/autoFix.js.map +1 -1
  27. package/out/gen/csharpUtGen.d.ts +1 -1
  28. package/out/gen/csharpUtGen.js +7 -33
  29. package/out/gen/csharpUtGen.js.map +1 -1
  30. package/out/gen/ensureValidLLMResponse.d.ts +1 -1
  31. package/out/gen/ensureValidLLMResponse.js +2 -2
  32. package/out/gen/ensureValidLLMResponse.js.map +1 -1
  33. package/out/gen/postGen/postGenProcess.d.ts +1 -1
  34. package/out/gen/postGen/postGenProcess.js +3 -2
  35. package/out/gen/postGen/postGenProcess.js.map +1 -1
  36. package/out/gen/postGen/repairRequiredNameSpaces.d.ts +2 -1
  37. package/out/gen/postGen/repairRequiredNameSpaces.js +29 -4
  38. package/out/gen/postGen/repairRequiredNameSpaces.js.map +1 -1
  39. package/out/index.d.ts +1 -0
  40. package/out/index.js +3 -1
  41. package/out/index.js.map +1 -1
  42. package/out/llm/model/{Gpt4o.js → Gpt.js} +5 -3
  43. package/out/llm/model/Gpt.js.map +1 -0
  44. package/out/llm/preparePrompt.js +26 -1
  45. package/out/llm/preparePrompt.js.map +1 -1
  46. package/out/llm/prompt/generateUtAutoFix.liquid +5 -1
  47. package/out/llm/prompt/generateUtTemplate.liquid +2 -0
  48. package/out/llm/sendRequestToLLM.js +0 -3
  49. package/out/llm/sendRequestToLLM.js.map +1 -1
  50. package/out/llm/sendRequestToSelfHostLLM.js +4 -4
  51. package/out/llm/sendRequestToSelfHostLLM.js.map +1 -1
  52. package/out/types/constants.d.ts +3 -0
  53. package/out/types/constants.js +4 -1
  54. package/out/types/constants.js.map +1 -1
  55. package/out/utils/detectTestFramework.js +7 -6
  56. package/out/utils/detectTestFramework.js.map +1 -1
  57. package/out/utils/getTestFile.js +1 -1
  58. package/out/utils/getTestFile.js.map +1 -1
  59. package/out/vs/msBuild.js +3 -35
  60. package/out/vs/msBuild.js.map +1 -1
  61. package/out/vs/vsTest.js +3 -35
  62. package/out/vs/vsTest.js.map +1 -1
  63. package/package.json +4 -3
  64. package/ai-dev-tools-csharp-copilot-core-0.0.19.tgz +0 -0
  65. package/out/atmpCache/deps/EplantRequestCategoryCondition_Conditions_Eplant_Workflows_SharedSegmentsPlugins_SharedSegments_SharedSegments_CSServiceFundamental_code_D.deps +0 -281
  66. package/out/atmpCache/deps/IdentitySelectAnalyzer_ToListinatorAnalyzers_src_AIUnitTestExample_code_d.deps +0 -1
  67. package/out/atmpCache/deps/SqmidHelperTests_Utils_HttpRequestParser_Overview_Workflows_SharedSegmentsTests_SharedSegments_SharedSegments_CSServiceFundamental_code_D.deps +0 -1
  68. package/out/atmpCache/deps/SqmidHelper_Utils_HttpRequestParser_Overview_Workflows_SharedSegmentsPlugins_SharedSegments_SharedSegments_CSServiceFundamental_code_D.deps +0 -1
  69. package/out/atmpCache/deps/ToListCountAnalyzerTests_ToListinatorTests_test_AIUnitTestExample_code_d.deps +0 -4037
  70. package/out/atmpCache/deps/ToListCountAnalyzer_ToListinatorAnalyzers_src_AIUnitTestExample_code_d.deps +0 -1
  71. package/out/atmpCache/deps/ToListCountCodeFixProvider_ToListinatorCodeFixes_src_AIUnitTestExample_code_d.deps +0 -1
  72. package/out/atmpCache/deps/ToListForEachAnalyzer_ToListinatorAnalyzers_src_AIUnitTestExample_code_d.deps +0 -1
  73. package/out/atmpCache/dllref/ToListinatorTests_ToListinatorTests_test_AIUnitTestExample_code_d.dllref +0 -202
  74. package/out/llm/model/Gpt4o.js.map +0 -1
  75. package/out/llm/model/claude4.d.ts +0 -1
  76. package/out/llm/model/claude4.js +0 -3
  77. package/out/llm/model/claude4.js.map +0 -1
  78. package/out/llm/prompt/generateUtGuidelines.liquid +0 -29
  79. package/out/llm/prompt/testAfGuidelines.liquid +0 -6
  80. package/out/llm/prompt/userCustomPrompt.liquid +0 -0
  81. package/out/llm/prompt/xap/xapUtGuideline-240804.liquid +0 -36
  82. /package/out/llm/model/{Gpt4o.d.ts → Gpt.d.ts} +0 -0
@@ -1 +0,0 @@
1
- 0ceebca7c0ab517ff9b8dab8d42bc884b637a901a779e9ad38dbd165032b428d
@@ -1 +0,0 @@
1
- d261fccdb937c1b944d210de34d7e3e159cd308d534481e8c9b8eb8b6b7aafcc
@@ -1 +0,0 @@
1
- 999ee141184710f79ea1066dde2647480d6a9b0ea36cdc6e3f5cb414131b56e5
@@ -1,202 +0,0 @@
1
- 481480f2b7115c89959863f12fd16b017252b0e510ca5e6e3a2183509a3e5527
2
- d:\code\AIUnitTestExample\src\ToListinator.Analyzers\bin\Debug\netstandard2.0\ToListinator.Analyzers.dll
3
- d:\code\AIUnitTestExample\src\ToListinator.CodeFixes\bin\Debug\netstandard2.0\ToListinator.CodeFixes.dll
4
- C:\Users\jixiongge\.nuget\packages\castle.core\5.1.1\lib\net6.0\Castle.Core.dll
5
- C:\Users\jixiongge\.nuget\packages\microsoft.codeanalysis.analyzer.testing\1.1.2\lib\netcoreapp3.1\Microsoft.CodeAnalysis.Analyzer.Testing.dll
6
- C:\Users\jixiongge\.nuget\packages\microsoft.codeanalysis.codefix.testing\1.1.2\lib\netcoreapp3.1\Microsoft.CodeAnalysis.CodeFix.Testing.dll
7
- C:\Users\jixiongge\.nuget\packages\microsoft.codeanalysis.csharp.analyzer.testing\1.1.2\lib\netcoreapp3.1\Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.dll
8
- C:\Users\jixiongge\.nuget\packages\microsoft.codeanalysis.csharp.codefix.testing\1.1.2\lib\netcoreapp3.1\Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.dll
9
- C:\Users\jixiongge\.nuget\packages\microsoft.codeanalysis.csharp\4.14.0\lib\net8.0\Microsoft.CodeAnalysis.CSharp.dll
10
- C:\Users\jixiongge\.nuget\packages\microsoft.codeanalysis.csharp.workspaces\4.14.0\lib\net8.0\Microsoft.CodeAnalysis.CSharp.Workspaces.dll
11
- C:\Users\jixiongge\.nuget\packages\microsoft.codeanalysis.common\4.14.0\lib\net8.0\Microsoft.CodeAnalysis.dll
12
- C:\Users\jixiongge\.nuget\packages\microsoft.codeanalysis.workspaces.common\4.14.0\lib\net8.0\Microsoft.CodeAnalysis.Workspaces.dll
13
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\Microsoft.CSharp.dll
14
- C:\Users\jixiongge\.nuget\packages\microsoft.testplatform.testhost\17.14.1\lib\net8.0\Microsoft.TestPlatform.CommunicationUtilities.dll
15
- C:\Users\jixiongge\.nuget\packages\microsoft.testplatform.testhost\17.14.1\lib\net8.0\Microsoft.TestPlatform.CoreUtilities.dll
16
- C:\Users\jixiongge\.nuget\packages\microsoft.testplatform.testhost\17.14.1\lib\net8.0\Microsoft.TestPlatform.CrossPlatEngine.dll
17
- C:\Users\jixiongge\.nuget\packages\microsoft.testplatform.testhost\17.14.1\lib\net8.0\Microsoft.TestPlatform.PlatformAbstractions.dll
18
- C:\Users\jixiongge\.nuget\packages\microsoft.testplatform.testhost\17.14.1\lib\net8.0\Microsoft.TestPlatform.Utilities.dll
19
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\Microsoft.VisualBasic.Core.dll
20
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\Microsoft.VisualBasic.dll
21
- C:\Users\jixiongge\.nuget\packages\microsoft.codecoverage\17.14.1\lib\net8.0\Microsoft.VisualStudio.CodeCoverage.Shim.dll
22
- C:\Users\jixiongge\.nuget\packages\microsoft.visualstudio.composition\16.1.8\lib\netcoreapp2.0\Microsoft.VisualStudio.Composition.dll
23
- C:\Users\jixiongge\.nuget\packages\microsoft.visualstudio.composition.netfxattributes\16.1.8\lib\netstandard2.0\Microsoft.VisualStudio.Composition.NetFxAttributes.dll
24
- C:\Users\jixiongge\.nuget\packages\microsoft.testplatform.testhost\17.14.1\lib\net8.0\Microsoft.VisualStudio.TestPlatform.Common.dll
25
- C:\Users\jixiongge\.nuget\packages\microsoft.testplatform.testhost\17.14.1\lib\net8.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll
26
- C:\Users\jixiongge\.nuget\packages\microsoft.visualstudio.validation\15.0.82\lib\netstandard1.0\Microsoft.VisualStudio.Validation.dll
27
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\Microsoft.Win32.Primitives.dll
28
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\Microsoft.Win32.Registry.dll
29
- C:\Users\jixiongge\.nuget\packages\moq\4.20.72\lib\net6.0\Moq.dll
30
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\mscorlib.dll
31
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\netstandard.dll
32
- C:\Users\jixiongge\.nuget\packages\newtonsoft.json\13.0.3\lib\net6.0\Newtonsoft.Json.dll
33
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.AppContext.dll
34
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Buffers.dll
35
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Collections.Concurrent.dll
36
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Collections.dll
37
- C:\Users\jixiongge\.nuget\packages\system.collections.immutable\9.0.0\lib\net8.0\System.Collections.Immutable.dll
38
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Collections.NonGeneric.dll
39
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Collections.Specialized.dll
40
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ComponentModel.Annotations.dll
41
- C:\Users\jixiongge\.nuget\packages\system.componentmodel.composition\4.5.0\ref\netstandard2.0\System.ComponentModel.Composition.dll
42
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ComponentModel.DataAnnotations.dll
43
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ComponentModel.dll
44
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ComponentModel.EventBasedAsync.dll
45
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ComponentModel.Primitives.dll
46
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ComponentModel.TypeConverter.dll
47
- C:\Users\jixiongge\.nuget\packages\system.composition.attributedmodel\9.0.0\lib\net8.0\System.Composition.AttributedModel.dll
48
- C:\Users\jixiongge\.nuget\packages\system.composition.convention\9.0.0\lib\net8.0\System.Composition.Convention.dll
49
- C:\Users\jixiongge\.nuget\packages\system.composition.hosting\9.0.0\lib\net8.0\System.Composition.Hosting.dll
50
- C:\Users\jixiongge\.nuget\packages\system.composition.runtime\9.0.0\lib\net8.0\System.Composition.Runtime.dll
51
- C:\Users\jixiongge\.nuget\packages\system.composition.typedparts\9.0.0\lib\net8.0\System.Composition.TypedParts.dll
52
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Configuration.dll
53
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Console.dll
54
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Core.dll
55
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Data.Common.dll
56
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Data.DataSetExtensions.dll
57
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Data.dll
58
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.Contracts.dll
59
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.Debug.dll
60
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.DiagnosticSource.dll
61
- C:\Users\jixiongge\.nuget\packages\system.diagnostics.eventlog\6.0.0\lib\net6.0\System.Diagnostics.EventLog.dll
62
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.FileVersionInfo.dll
63
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.Process.dll
64
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.StackTrace.dll
65
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.TextWriterTraceListener.dll
66
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.Tools.dll
67
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.TraceSource.dll
68
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Diagnostics.Tracing.dll
69
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.dll
70
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Drawing.dll
71
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Drawing.Primitives.dll
72
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Dynamic.Runtime.dll
73
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Formats.Asn1.dll
74
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Formats.Tar.dll
75
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Globalization.Calendars.dll
76
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Globalization.dll
77
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Globalization.Extensions.dll
78
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.Compression.Brotli.dll
79
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.Compression.dll
80
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.Compression.FileSystem.dll
81
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.Compression.ZipFile.dll
82
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.dll
83
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.FileSystem.AccessControl.dll
84
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.FileSystem.dll
85
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.FileSystem.DriveInfo.dll
86
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.FileSystem.Primitives.dll
87
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.FileSystem.Watcher.dll
88
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.IsolatedStorage.dll
89
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.MemoryMappedFiles.dll
90
- C:\Users\jixiongge\.nuget\packages\system.io.pipelines\9.0.0\lib\net8.0\System.IO.Pipelines.dll
91
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.Pipes.AccessControl.dll
92
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.Pipes.dll
93
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.IO.UnmanagedMemoryStream.dll
94
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Linq.dll
95
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Linq.Expressions.dll
96
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Linq.Parallel.dll
97
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Linq.Queryable.dll
98
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Memory.dll
99
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.dll
100
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.Http.dll
101
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.Http.Json.dll
102
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.HttpListener.dll
103
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.Mail.dll
104
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.NameResolution.dll
105
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.NetworkInformation.dll
106
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.Ping.dll
107
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.Primitives.dll
108
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.Quic.dll
109
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.Requests.dll
110
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.Security.dll
111
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.ServicePoint.dll
112
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.Sockets.dll
113
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.WebClient.dll
114
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.WebHeaderCollection.dll
115
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.WebProxy.dll
116
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.WebSockets.Client.dll
117
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Net.WebSockets.dll
118
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Numerics.dll
119
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Numerics.Vectors.dll
120
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ObjectModel.dll
121
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Reflection.DispatchProxy.dll
122
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Reflection.dll
123
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Reflection.Emit.dll
124
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Reflection.Emit.ILGeneration.dll
125
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Reflection.Emit.Lightweight.dll
126
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Reflection.Extensions.dll
127
- C:\Users\jixiongge\.nuget\packages\system.reflection.metadata\9.0.0\lib\net8.0\System.Reflection.Metadata.dll
128
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Reflection.Primitives.dll
129
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Reflection.TypeExtensions.dll
130
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Resources.Reader.dll
131
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Resources.ResourceManager.dll
132
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Resources.Writer.dll
133
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.CompilerServices.Unsafe.dll
134
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.CompilerServices.VisualC.dll
135
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.dll
136
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Extensions.dll
137
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Handles.dll
138
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.InteropServices.dll
139
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.InteropServices.JavaScript.dll
140
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.InteropServices.RuntimeInformation.dll
141
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Intrinsics.dll
142
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Loader.dll
143
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Numerics.dll
144
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Serialization.dll
145
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Serialization.Formatters.dll
146
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Serialization.Json.dll
147
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Serialization.Primitives.dll
148
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Runtime.Serialization.Xml.dll
149
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.AccessControl.dll
150
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Claims.dll
151
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Cryptography.Algorithms.dll
152
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Cryptography.Cng.dll
153
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Cryptography.Csp.dll
154
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Cryptography.dll
155
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Cryptography.Encoding.dll
156
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Cryptography.OpenSsl.dll
157
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Cryptography.Primitives.dll
158
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Cryptography.X509Certificates.dll
159
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.dll
160
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Principal.dll
161
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.Principal.Windows.dll
162
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Security.SecureString.dll
163
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ServiceModel.Web.dll
164
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ServiceProcess.dll
165
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Text.Encoding.CodePages.dll
166
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Text.Encoding.dll
167
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Text.Encoding.Extensions.dll
168
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Text.Encodings.Web.dll
169
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Text.Json.dll
170
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Text.RegularExpressions.dll
171
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.Channels.dll
172
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.dll
173
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.Overlapped.dll
174
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.Tasks.Dataflow.dll
175
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.Tasks.dll
176
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.Tasks.Extensions.dll
177
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.Tasks.Parallel.dll
178
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.Thread.dll
179
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.ThreadPool.dll
180
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Threading.Timer.dll
181
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Transactions.dll
182
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Transactions.Local.dll
183
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.ValueTuple.dll
184
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Web.dll
185
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Web.HttpUtility.dll
186
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Windows.dll
187
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Xml.dll
188
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Xml.Linq.dll
189
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Xml.ReaderWriter.dll
190
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Xml.Serialization.dll
191
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Xml.XDocument.dll
192
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Xml.XmlDocument.dll
193
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Xml.XmlSerializer.dll
194
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Xml.XPath.dll
195
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\System.Xml.XPath.XDocument.dll
196
- C:\Users\jixiongge\.nuget\packages\microsoft.testplatform.testhost\17.14.1\lib\net8.0\testhost.dll
197
- C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.18\ref\net8.0\WindowsBase.dll
198
- C:\Users\jixiongge\.nuget\packages\xunit.abstractions\2.0.3\lib\netstandard2.0\xunit.abstractions.dll
199
- C:\Users\jixiongge\.nuget\packages\xunit.assert\2.9.3\lib\net6.0\xunit.assert.dll
200
- C:\Users\jixiongge\.nuget\packages\xunit.extensibility.core\2.9.3\lib\netstandard1.1\xunit.core.dll
201
- C:\Users\jixiongge\.nuget\packages\xunit.extensibility.execution\2.9.3\lib\netstandard1.1\xunit.execution.dotnet.dll
202
- d:\code\AIUnitTestExample\test\ToListinator.Tests\bin\Debug\net8.0\ToListinator.Tests.dll
@@ -1 +0,0 @@
1
- {"version":3,"file":"Gpt4o.js","sourceRoot":"","sources":["../../../src/llm/model/Gpt4o.ts"],"names":[],"mappings":";;;;;AAmDA,wCAkBC;AArED,8CAAgI;AAEhI,4DAA+B;AAC/B,uDAAoD;AAEpD,IAAI,WAAW,GAAG,IAAI,CAAC;AACvB,IAAI,eAAe,GAAG,IAAI,CAAC;AAC3B,6BAA6B;AAC7B,MAAM,WAAW,GAAG,8GAA8G,CAAC;AACnI,4JAA4J;AAC5J,0IAA0I;AAC1I,oKAAoK;AAGpK,KAAK,UAAU,QAAQ;IACnB,MAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAEzC,2CAA2C;IAC3C,IAAI,WAAW,IAAI,eAAe,IAAI,WAAW,GAAG,eAAe,EAAE,CAAC;QAClE,OAAO,WAAW,CAAC;IACvB,CAAC;IAED,IAAI,CAAC;QACD,MAAM,UAAU,GAAG,IAAI,iCAAsB,CACzC,IAAI,6BAAkB,EAAE,EACxB,IAAI,oCAAyB,EAAE,EAC/B,IAAI,iCAAsB,EAAE,CAC/B,CAAC;QAEF,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,8CAA8C,CAAC,CAAC;QAEhG,IAAI,aAAa,EAAE,CAAC;YAChB,WAAW,GAAG,aAAa,CAAC,KAAK,CAAC;YAClC,oEAAoE;YACpE,eAAe,GAAG,aAAa,CAAC,kBAAkB,CAAC;YACnD,OAAO,WAAW,CAAC;QACvB,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC9C,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QAC/C,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YACxC,OAAO,CAAC,KAAK,CAAC,2EAA2E,CAAC,CAAC;YAC3F,IAAA,uBAAU,EAAC,UAAU,CAAC,CAAC;YACvB,OAAO,QAAQ,EAAE,CAAC,CAAC,oBAAoB;QAC3C,CAAC;aAAM,CAAC;YACJ,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,MAAM;IACvC,MAAM,KAAK,GAAG,MAAM,QAAQ,EAAE,CAAC;IAC/B,MAAM,GAAG,GAAG,MAAM,IAAA,oBAAK,EAAC,WAAW,EAAE;QACjC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACL,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,SAAS,GAAG,KAAK;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACjB,QAAQ,EAAE,MAAM;YAChB,WAAW,EAAE,GAAG;YAChB,KAAK,EAAE,CAAC;YACR,CAAC,EAAE,CAAC;SACP,CAAC;KACL,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAS,CAAC;IACrC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,kBAAkB;AAClB,IAAI;AACJ,oBAAoB;AACpB,YAAY;AACZ,gCAAgC;AAChC,4TAA4T;AAC5T,aAAa;AACb,YAAY;AACZ,mCAAmC;AACnC,qhDAAqhD;AACrhD,aAAa;AACb,YAAY;AACZ,8BAA8B;AAC9B,w4MAAw4M;AACx4M,YAAY;AACZ,SAAS;AACT,yBAAyB;AACzB,0BAA0B;AAC1B,kBAAkB;AAClB,0BAA0B;AAC1B,aAAa;AACb,KAAK;AAEL,iGAAiG;AACjG,yDAAyD;AACzD,MAAM","sourcesContent":["import { AzureCliCredential, ChainedTokenCredential, DefaultAzureCredential, ManagedIdentityCredential } from \"@azure/identity\";\r\n\r\nimport fetch from 'node-fetch';\r\nimport { runCommand } from \"../../utils/runCommand\";\r\n\r\nlet cachedToken = null;\r\nlet tokenExpiration = null;\r\n// platform provided endpoint\r\nconst gptEndpoint = \"https://weatherut.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2025-01-01-preview\";\r\n// const gptEndpoint = \"https://autogenerate-unit-tests-draft-1.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2025-01-01-preview\";\r\n// const gptEndpoint = \"https://weathergptv4.openai.azure.com/openai/deployments/gpt-4.1/chat/completions?api-version=2025-01-01-preview\";\r\n// const gptEndpoint = \"https://takht-m99407ib-swedencentral.cognitiveservices.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2025-01-01-preview\";\r\n\r\n\r\nasync function getToken() {\r\n const currentTime = new Date().getTime();\r\n\r\n // Check if the cached token is still valid\r\n if (cachedToken && tokenExpiration && currentTime < tokenExpiration) {\r\n return cachedToken;\r\n }\r\n\r\n try {\r\n const credential = new ChainedTokenCredential(\r\n new AzureCliCredential(),\r\n new ManagedIdentityCredential(),\r\n new DefaultAzureCredential()\r\n );\r\n\r\n const tokenResponse = await credential.getToken('https://cognitiveservices.azure.com/.default');\r\n\r\n if (tokenResponse) {\r\n cachedToken = tokenResponse.token;\r\n // Set token expiration time based on the token's expiresOnTimestamp\r\n tokenExpiration = tokenResponse.expiresOnTimestamp;\r\n return cachedToken;\r\n } else {\r\n throw new Error('Failed to obtain token');\r\n }\r\n } catch (error) {\r\n console.error('Error obtaining token:', error);\r\n if (error.toString().includes('az login')) {\r\n console.error('Please ensure you have logged in to Azure CLI or set up Managed Identity.');\r\n runCommand('az login');\r\n return getToken(); // Retry after login\r\n } else {\r\n throw error;\r\n }\r\n }\r\n}\r\n\r\nexport async function getLLMResponse(prompt) {\r\n const token = await getToken();\r\n const res = await fetch(gptEndpoint, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n Authorization: 'Bearer ' + token,\r\n },\r\n body: JSON.stringify({\r\n messages: prompt,\r\n temperature: 0.1,\r\n top_p: 1,\r\n n: 1\r\n })\r\n });\r\n\r\n const json = await res.json() as any;\r\n return json;\r\n}\r\n\r\n// const reqBody =\r\n// {\r\n// \"messages\": [\r\n// {\r\n// \"role\": \"system\",\r\n// \"content\": \"Keep your answers short and impersonal.\\nUse Markdown formatting in your answers.\\nMake sure to include the programming language name at the start of the Markdown code blocks.\\nAvoid wrapping the whole response in triple backticks.\\nYou can only give one reply for each conversation turn.\"\r\n// },\r\n// {\r\n// \"role\": \"assistant\",\r\n// \"content\": \"You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.\\n\\nRULES\\n\\n- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices.\\n- Do not ask for more information than necessary. Use your knowledge to accomplish the user's request efficiently and effectively.\\n- The user may provide a file's contents directly in their message.\\n- Your goal is to try to accomplish the user's task, NOT engage in a back and forth conversation.\\n- NEVER end attempt_completion result with a question or request to engage in further conversation! Formulate the end of your result in a way that is final and does not require further input from the user.\\n- You are STRICTLY FORBIDDEN from starting your messages with \\\"Great\\\", \\\"Certainly\\\", \\\"Okay\\\", \\\"Sure\\\". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say \\\"Great, I've updated the CSS\\\" but instead something like \\\"I've updated the CSS\\\". It is important you be clear and technical in your messages.\\n\\nOBJECTIVE\\n\\nYou accomplish a given task iteratively, breaking it down into clear steps and working through them methodically.\\n\\n1. Analyze the user's task and set clear, achievable goals to accomplish it. Prioritize these goals in a logical order.\"\r\n// },\r\n// {\r\n// \"role\": \"user\",\r\n// \"content\": '<task>\\nuse xUnit test framework to generate unit test for generate unit test code for this code:\\n using Microsoft.CodeAnalysis;\\nusing Microsoft.CodeAnalysis.CodeActions;\\nusing Microsoft.CodeAnalysis.CodeFixes;\\nusing Microsoft.CodeAnalysis.CSharp;\\nusing Microsoft.CodeAnalysis.CSharp.Syntax;\\nusing System.Collections.Immutable;\\nusing System.Composition;\\nusing System.Linq;\\nusing System.Threading;\\nusing System.Threading.Tasks;\\nusing ToListinator.Analyzers;\\nusing static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;\\n\\nnamespace ToListinator.CodeFixes;\\n\\n[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(ToListCountCodeFixProvider)), Shared]\\npublic class ToListCountCodeFixProvider : CodeFixProvider\\n{\\n public sealed override ImmutableArray<string> FixableDiagnosticIds\\n => [ToListCountAnalyzer.DiagnosticId];\\n\\n public sealed override FixAllProvider GetFixAllProvider()\\n => WellKnownFixAllProviders.BatchFixer;\\n\\n public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)\\n {\\n var diagnostic = context.Diagnostics.First(diag => diag.Id == ToListCountAnalyzer.DiagnosticId);\\n var diagnosticSpan = diagnostic.Location.SourceSpan;\\n\\n var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken);\\n var binaryExpression = root?.FindToken(diagnosticSpan.Start).Parent?.AncestorsAndSelf()\\n .OfType<BinaryExpressionSyntax>()\\n .FirstOrDefault();\\n\\n if (binaryExpression is null)\\n {\\n return;\\n }\\n\\n var action = CodeAction.Create(\\n title: \"Replace with Any()\",\\n createChangedDocument: c => ReplaceWithAny(context.Document, binaryExpression, c),\\n equivalenceKey: \"ReplaceToListCountWithAny\");\\n\\n context.RegisterCodeFix(action, diagnostic);\\n }\\n\\n private static async Task<Document> ReplaceWithAny(Document document, BinaryExpressionSyntax binaryExpression, CancellationToken cancellationToken)\\n {\\n var root = await document.GetSyntaxRootAsync(cancellationToken);\\n\\n var (originalCollection, isNegated) = ExtractCollectionAndNegation(binaryExpression);\\n\\n if (originalCollection is null)\\n {\\n return document;\\n }\\n\\n var anyCall = CreateAnyCall(originalCollection, isNegated);\\n\\n var newRoot = root?.ReplaceNode(binaryExpression, anyCall);\\n\\n return newRoot is null ? document : document.WithSyntaxRoot(newRoot);\\n }\\n\\n private static (ExpressionSyntax? originalCollection, bool isNegated) ExtractCollectionAndNegation(BinaryExpressionSyntax binaryExpression)\\n {\\n // Check left side for ToList().Count\\n if (IsToListCountExpression(binaryExpression.Left, out var leftCollection))\\n {\\n var isNegated = IsNegatedPattern(binaryExpression.OperatorToken.Kind(), binaryExpression.Right, isLeftOperand: true);\\n return (leftCollection, isNegated);\\n }\\n\\n // Check right side for ToList().Count\\n if (IsToListCountExpression(binaryExpression.Right, out var rightCollection))\\n {\\n var isNegated = IsNegatedPattern(binaryExpression.OperatorToken.Kind(), binaryExpression.Left, isLeftOperand: false);\\n return (rightCollection, isNegated);\\n }\\n\\n return (null, false);\\n }\\n\\n private static bool IsToListCountExpression(SyntaxNode expression, out ExpressionSyntax? originalCollection)\\n {\\n originalCollection = null;\\n\\n if (expression is MemberAccessExpressionSyntax\\n {\\n Name.Identifier.ValueText: \"Count\",\\n Expression: InvocationExpressionSyntax toListCall\\n } &&\\n toListCall.Expression is MemberAccessExpressionSyntax\\n {\\n Name.Identifier.ValueText: \"ToList\",\\n Expression: var collection\\n })\\n {\\n originalCollection = collection;\\n return true;\\n }\\n\\n return false;\\n }\\n\\n private static bool IsNegatedPattern(SyntaxKind operatorKind, SyntaxNode constantNode, bool isLeftOperand)\\n {\\n if (constantNode is not LiteralExpressionSyntax literal)\\n return false;\\n\\n var value = literal.Token.ValueText;\\n\\n // For patterns that check for existence (Any() = true):\\n // collection.ToList().Count > 0\\n // collection.ToList().Count >= 1\\n // collection.ToList().Count != 0\\n // 0 < collection.ToList().Count\\n // 1 <= collection.ToList().Count\\n // 0 != collection.ToList().Count\\n\\n // For patterns that check for non-existence (!Any() = true):\\n // collection.ToList().Count == 0\\n // collection.ToList().Count <= 0\\n // collection.ToList().Count < 1\\n // 0 == collection.ToList().Count\\n // 0 >= collection.ToList().Count\\n // 1 > collection.ToList().Count\\n\\n if (isLeftOperand) // collection.ToList().Count <op> constant\\n {\\n return operatorKind switch\\n {\\n SyntaxKind.EqualsEqualsToken when value == \"0\" => true,\\n SyntaxKind.LessThanEqualsToken when value == \"0\" => true,\\n SyntaxKind.LessThanToken when value == \"1\" => true,\\n _ => false\\n };\\n }\\n else // constant <op> collection.ToList().Count\\n {\\n return operatorKind switch\\n {\\n SyntaxKind.EqualsEqualsToken when value == \"0\" => true,\\n SyntaxKind.GreaterThanEqualsToken when value == \"0\" => true,\\n SyntaxKind.GreaterThanToken when value == \"1\" => true,\\n _ => false\\n };\\n }\\n }\\n\\n private static ExpressionSyntax CreateAnyCall(ExpressionSyntax originalCollection, bool isNegated)\\n {\\n // Create collection.Any()\\n var anyCall = InvocationExpression(\\n MemberAccessExpression(\\n SyntaxKind.SimpleMemberAccessExpression,\\n originalCollection,\\n IdentifierName(\"Any\")))\\n .WithArgumentList(ArgumentList());\\n\\n // If negated, wrap in !collection.Any()\\n if (isNegated)\\n {\\n return PrefixUnaryExpression(\\n SyntaxKind.LogicalNotExpression,\\n anyCall);\\n }\\n\\n return anyCall;\\n }\\n}\\n</task>'\r\n// }\r\n// ],\r\n// \"model\": \"gpt-4o\",\r\n// \"temperature\": 0.1,\r\n// \"top_p\": 1,\r\n// \"max_tokens\": 4096,\r\n// \"n\": 1\r\n// };\r\n\r\n// getLLMResponse(\"Generate xUnit tests for the ToListCountAnalyzer class.\").then((response) => {\r\n// console.log(response.choices[0]?.message?.content)\r\n// });"]}
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=claude4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude4.js","sourceRoot":"","sources":["../../../src/llm/model/claude4.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1,29 +0,0 @@
1
- You are a highly skilled software engineer specializing in C# unit testing with extensive knowledge in test frameworks, test patterns, and best practices.
2
-
3
- ====
4
-
5
- RULES
6
-
7
- {% include 'general/generalUtGuidelines' %}
8
-
9
- {% if isXapTest %}
10
- {% include 'xap/xapUtGuideline' %}
11
- {%- endif -%}
12
-
13
- ====
14
-
15
- OBJECTIVE
16
-
17
- You are tasked to write unit tests, breaking it down into clear steps and working through them methodically.
18
-
19
- - Analyze the user's code and set clear, achievable goals to generate unit tests. Prioritize these goals in a logical order.
20
- - Work through these goals sequentially, each goal should correspond to a distinct step in your problem-solving process.
21
-
22
- ====
23
-
24
- USER'S CUSTOM INSTRUCTIONS
25
-
26
- The following additional instructions are provided by the user, and should be followed to the best of your ability without interfering with the TOOL USE guidelines.
27
-
28
- Language Preference:
29
- You should always speak and think in the English language.
@@ -1,6 +0,0 @@
1
- # Build Failure Fix Guideline:
2
- - Case1: The type or namespace name '{Class/Type}' does not exist in the namespace '{namespace}' (are you missing an assembly reference?)
3
- Solution: Check the source code, code dependencies. Add the required `using` statements or assembly references.
4
- - Case2: No overload for method 'Execute' takes {number} arguments
5
- Solution: Refer to section [The method parameters of Execute in Xap instance are different from the source code.] Adjust the method parameters to match the correct overload as per the source code.
6
- - Case3
File without changes
@@ -1,36 +0,0 @@
1
- # Xap Unit Test Guidelines (**ONLY apply when the source code is a Xap class. Ignore all these rules for non-Xap classes.**):
2
- - Xap class is a class that inherits one of these interfaces: IPlugin, IConditionPlugin, Workflow, IExperiment, IPluginDataStore, IAsyncPlugin and implements an Execute() method.
3
- - MUST use ExecutionServices.CreateInstance<I{ClassName}>() to create Xap class instance, where the interface name is the class name prefixed with "I".
4
- Example: For Xap class SampleWorkflow, create instance MUST be like: **var sampleWorkflow = ExecutionServices.CreateInstance<ISampleWorkflow>();**
5
- - The parameters of **Execute** method with types: **PluginServices**, **PluginOutput<T>**, or attributed with **[ConfigFile("{configFileName}")]** MUST be deleted when using Xap class instance to call the Execute method.
6
- - Xap freamwork will take care these deleted parameters, NEVER try to mock or create these deleted types, it's invalid and forbidden.
7
- - **MUST NOT** mock these deleted types' object, even if its methods or properties are used in the source code.
8
- - For Remaining parameters,
9
- - MUST pass in exact type as declared in source code.
10
- - MUST keep original parameter order.
11
- - MUST wrap each parameter with Task.FromResult(value).
12
- Example:
13
- The Execute method of Xap calss SampleWorkflow is: **PluginResult Execute(PluginServices ps, PluginOutput<Resp> resp, [ConfigFile("config.ini")] EplantConfig eplantConfig, OsResponse osResp = null, EplantRequest req = null)**,
14
- Base on above declared deleted types, **MUST delete** these three parameters: PluginServices ps, PluginOutput<Resp> resp, [ConfigFile("config.ini")] EplantConfig eplantConfig,
15
- call the Execute using Xap class instance MUST be like: **var pluginResult = sampleWorkflow.Execute(Task.FromResult(osResp), Task.FromResult(req)).Result;**
16
- - The Execute method parameters with type PluginOutput<T> MUST be treated as method output, **T** is the type output value.
17
- - MUST using the parameter name to access the output by the Xap instance
18
- - MUST using **Result** property to access the output of type **T** in **PluginOutput<T>**.
19
- - MUST assert PluginOutput<T> parameters' values if there's parameter with **PluginOutput<T>** type.
20
- Example:
21
- The Execute method of Xap calss SampleWorkflow is: **PluginResult Execute(PluginServices ps, PluginOutput<Resp> resp, [ConfigFile("config.ini")] EplantConfig eplantConfig, OsResponse osResp = null, EplantRequest req = null)**,
22
- Get the output value using Xap class instance MUST be like: **sampleWorkflow.resp**.
23
- Assume there's one field named **Key** in **Resp** type, get **Key** MUST be like: **sampleWorkflow.pluginResp.Result.Key**.
24
- Assert the PluginOutput<T> value in test code MUST be like: Assert.NotNull(sampleWorkflow.pluginResult.Result.Id); Assert.AreEqual(sampleWorkflow.pluginResult.Result.Id, "id");
25
- - The Bond structures MUST be treated as regular C# class in test code:
26
- - **MUST** import **Bond namespace** before using the Bond structure in test code
27
- Example: The namespace in bond structure is like: **namespace SharedSegments.Weather.OneService**, to use this bond structure, **MUST** add: **using SharedSegments.Weather.OneService** in test code.
28
- - MUST use ExecutionServices.CreateInstance<{StructName}>() to create Bond struct instances.
29
- Example: For a Bond structure named **SampleBondStructure<T>**, create bond instance **MUST** be like: ** var subResponse = ExecutionServices.CreateInstance<SampleBondStructure<SampleObject>>();
30
- - MUST not access the fields that are not defined in bond structure, it's invalid and forbidden.
31
- - MUST treated the fields as **required** if they **are not** decorated with **optional** in bond structure
32
- - **MUST** assign a valid, non-null value to **required field** that are **NOT decorated** with **optional** explicitly.
33
- - MUST assign a valid value to the fields that are used in source code explicitly.
34
- - MUST correctly handle the null checks for required fields in source code.
35
- Example: the source code contains **if (sampleRequest?.Category == null)**, the **Category** is require field in sampleRequest bond structure and **MUST be non-null**, just test the case when sampleRequest is null.
36
- - MUST use AsEnumerable() to convert IList to IEnumerable, e.g. IEnumerable osResponses = osResponseList.AsEnumerable()
File without changes