fix: exclude desktop.ini from rule file ingestion #11384
Draft
+12
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #11381
Description
This PR attempts to address Issue #11381. On Windows,
desktop.inifiles are frequently auto-generated by the OS in folders and were being read as custom rule files, polluting the system prompt with gibberish.The fix adds
"desktop.ini"to thecachePatternsarray in theshouldIncludeRuleFile()function insrc/core/prompts/sections/custom-instructions.ts, matching the existing pattern used forThumbs.db(exact basename match).Feedback and guidance are welcome.
Test Procedure
desktop.inito the existing "should filter out cache files" test incustom-instructions.spec.tsdesktop.iniis excluded from rule file reads, matching the same verification pattern used forThumbs.db,.DS_Store, etc.cd src && npx vitest run core/prompts/sections/__tests__/custom-instructions.spec.tsPre-Submission Checklist
Screenshots / Videos
N/A - no UI changes.
Documentation Updates
Additional Notes
Minimal, targeted fix: adds a single entry (
"desktop.ini") to the existing exclusion list, consistent with howThumbs.dbis already handled.Important
Exclude
desktop.inifrom rule file ingestion by adding it to the exclusion list inshouldIncludeRuleFile()incustom-instructions.ts.desktop.inifrom rule file ingestion by adding it tocachePatternsinshouldIncludeRuleFile()incustom-instructions.ts.Thumbs.db.custom-instructions.spec.tsto verifydesktop.iniis excluded, similar toThumbs.dband.DS_Store.This description was created by
for 454372a. You can customize this summary. It will automatically update as commits are pushed.