mirror of
https://github.com/yoshiko-pg/difit.git
synced 2026-09-19 05:03:24 +08:00
dd5e6d1b09
* Add untracked file detection with CLI prompt - Add checkUntrackedFiles() function to detect untracked files when viewing working directory changes (commitish = '.') - Prompt user to add files with --intent-to-add to include them in diff - Only activates for working directory diffs, not commit comparisons - Uses simple-git and readline for Git operations and user interaction 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Refactor CLI logic: Extract untracked files handling into separate functions Extracted handling of untracked files into dedicated functions (handleUntrackedFiles, promptUserToIncludeUntracked) for improved readability. Moved shared logic (findUntrackedFiles, markFilesIntentToAdd, promptUser) to utils.ts. Replaced manual readline handling with readline/promises API for cleaner asynchronous prompting. * Support checking untracked files in tui mode * Improve dev script: Add constants, process cleanup, and documentation - Extract CLI_SERVER_READY_MESSAGE constant for maintainability - Fix resource leak by tracking and killing Vite process on shutdown - Add comments explaining stdout piping rationale and design decisions - Improve graceful shutdown handling for both CLI and Vite processes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * merge main * Fix git reset command suggestion for untracked files Change from 'git reset --mixed' to 'git reset -- <files>' to specifically unstage only the intent-to-add files rather than all staged changes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: improve comment writing * chore: remove unused function --------- Co-authored-by: Claude <noreply@anthropic.com>