From 29e6002275ecd73977aff9cadf816a9c81e0a0d0 Mon Sep 17 00:00:00 2001 From: Chrissy LeMaire Date: Fri, 18 Oct 2024 14:05:03 +0200 Subject: [PATCH] prompt fixes /changes --- .aider/prompts/fix-parms.ps1 | 10 ++++++++++ .aider/prompts/fix-template.md | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .aider/prompts/fix-parms.ps1 diff --git a/.aider/prompts/fix-parms.ps1 b/.aider/prompts/fix-parms.ps1 new file mode 100644 index 0000000000..880f5014f6 --- /dev/null +++ b/.aider/prompts/fix-parms.ps1 @@ -0,0 +1,10 @@ +# loop through all files in the tests directory that matches HaveParameter +$tests = Get-ChildItem -Path /workspace/tests -Filter *.Tests.ps1 + +$prompt = "When testing HaveParameter, we should have used type full names and we used type short names.Consult types.md and apply the appropriate replacements. Do not remove any arrays ([]), just replace the type names." + + +foreach ($test in $tests) { + Write-Host "Processing $test" + aider --message "$prompt" --file $test.FullName --model azure/gpt-4o-mini --no-stream --cache-prompts --read /workspace/.aider/prompts/types.md +} diff --git a/.aider/prompts/fix-template.md b/.aider/prompts/fix-template.md index 94c1b64d24..a39d56febd 100644 --- a/.aider/prompts/fix-template.md +++ b/.aider/prompts/fix-template.md @@ -1,7 +1,7 @@ Analyze and update the Pester test file for the dbatools PowerShell module at /workspace/tests/--CMDNAME--.Tests.ps1. Focus on the following: 1. Review the provided errors and their line numbers. -2. ONLY FOR SCOPING ERRORS: We should have used type full names and we used type short names. For any type errors, consult types.md and apply the appropriate replacements. Do not remove any arrays ([]), just replace the type names. Do not replace type names not causing errors. +2. ONLY FOR TYPE ERRORS: We should have used type full names and we used type short names. For any type errors, consult types.md and apply the appropriate replacements. Do not remove any arrays ([]), just replace the type names. Do not replace type names not causing errors. 3. Remember these are primarily INTEGRATION tests. Only mock when absolutely necessary. 4. Make minimal changes required to make the tests pass. Avoid over-engineering. 5. For SQL Server-specific testing scenarios, implement necessary adjustments while preserving test integrity.