Skip to content

fix: recognize dotfiles (.env, .gitignore) in file path extraction and triage - #72

Open
TerminalGravity wants to merge 3 commits into
mainfrom
fix/dotfile-extraction
Open

fix: recognize dotfiles (.env, .gitignore) in file path extraction and triage#72
TerminalGravity wants to merge 3 commits into
mainfrom
fix/dotfile-extraction

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

Standalone dotfiles like .env, .gitignore, .env.local were invisible to both extractFilePaths() and the triage hasFileRefs() check. This caused prompts like "update .env" to be incorrectly classified as ambiguous (missing file targets).

Changes:

  • extractFilePaths() now matches standalone dotfiles via a second regex pass
  • hasFileRefs() in triage recognizes dotfile patterns
  • 4 new extraction tests + 1 triage test (70 total, all passing)
  • Clean build

Adds Ollama as a local embedding provider option. Uses the /api/embed
endpoint with batch support. Defaults to nomic-embed-text model.

Configurable base URL, model name, and dimensions for flexibility
with different Ollama models.

Closes #6
- Extract extractFilePaths, detectAmbiguity, estimateComplexity,
  splitSubtasks into src/lib/preflight-helpers.ts
- Update preflight-check.ts to import from shared module
- Add 19 tests covering all extracted helpers
- All 66 tests pass, build clean
…d triage

Previously, standalone dotfiles like .env were not detected by
extractFilePaths() or the triage hasFileRefs() check, causing prompts
like 'update .env' to be incorrectly classified as ambiguous.

- Updated extractFilePaths regex to match standalone dotfiles
- Updated triage hasFileRefs to recognize dotfile patterns
- Added 4 new tests for dotfile extraction
- Added triage test for dotfile recognition
- 70 tests passing

@TerminalGravity TerminalGravity left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch on dotfiles — .env and .gitignore are exactly the kind of files that trip up naive path extraction. CI green.

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.

1 participant