Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Feb 10, 2026

Related GitHub Issue

Closes: #11381

Description

This PR attempts to address Issue #11381. On Windows, desktop.ini files 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 the cachePatterns array in the shouldIncludeRuleFile() function in src/core/prompts/sections/custom-instructions.ts, matching the existing pattern used for Thumbs.db (exact basename match).

Feedback and guidance are welcome.

Test Procedure

  • Added desktop.ini to the existing "should filter out cache files" test in custom-instructions.spec.ts
  • The test verifies that desktop.ini is excluded from rule file reads, matching the same verification pattern used for Thumbs.db, .DS_Store, etc.
  • All 41 tests in the test file pass.
  • Run: cd src && npx vitest run core/prompts/sections/__tests__/custom-instructions.spec.ts

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes.
  • Documentation Impact: No documentation updates are required.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

N/A - no UI changes.

Documentation Updates

  • No documentation updates are required.

Additional Notes

Minimal, targeted fix: adds a single entry ("desktop.ini") to the existing exclusion list, consistent with how Thumbs.db is already handled.

Important

Exclude desktop.ini from rule file ingestion by adding it to the exclusion list in shouldIncludeRuleFile() in custom-instructions.ts.

  • Behavior:
    • Excludes desktop.ini from rule file ingestion by adding it to cachePatterns in shouldIncludeRuleFile() in custom-instructions.ts.
    • Matches existing exclusion pattern for Thumbs.db.
  • Tests:
    • Updated test in custom-instructions.spec.ts to verify desktop.ini is excluded, similar to Thumbs.db and .DS_Store.
    • All tests pass, confirming the exclusion works as intended.

This description was created by Ellipsis for 454372a. You can customize this summary. It will automatically update as commits are pushed.

@roomote
Copy link
Contributor Author

roomote bot commented Feb 10, 2026

Rooviewer Clock   See task

Review complete. No issues found. The change is minimal, correct, and consistent with existing patterns (Thumbs.db exclusion). Tests are comprehensive.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] desktop.ini is ingested as a rule

1 participant