Commit Graph

10 Commits

Author SHA1 Message Date
4da03d9e37 Find Duplicate Files and prompts to delete them. 2026-01-13 19:13:26 +05:30
10e508fa0e refactor: reorganize file operations and extract test modules
- Extract mover and undo functionality into dedicated modules (mover/ and undo/ subdirectories)
- Move cross-platform file operations to separate file_ops.rs module for reusability
- Extract batch and categorizer tests into separate test files (batch_test.rs, categorizer_test.rs)
- Refactor orchestrator.rs with extracted helper functions for improved readability
  - Separate cache and undo log initialization
  - Extract path resolution and offline mode determination logic
  - Simplify main organization flow by delegating to helper functions
- Update module exports to expose new types and functions (MoveError, MoveSummary, UndoError, UndoSummary)
- Reduce code duplication of move_file_cross_platform implementation
2026-01-10 21:08:00 +05:30
23b14e6a7f added more tests 2026-01-10 00:05:26 +05:30
b6db79774a fix the warnings 2026-01-09 17:45:13 +05:30
ba0ea3f221 perf: eliminate unnecessary clones and improve API ergonomics
- PromptBuilder::new now takes &[String] instead of Vec<String>
- GeminiClient::new now takes &str, &[String] instead of owned values
- FileBatch::from_path now takes &Path instead of PathBuf
- categorize_files_offline now takes Vec<String> (ownership) instead of &[String]
- handle_offline_organization now takes FileBatch by value

These changes eliminate ~5-50 KB of unnecessary allocations for typical
file counts, reduce allocator pressure, and improve API clarity by properly
expressing ownership semantics.

No functional changes - all tests pass.
2026-01-08 23:42:10 +05:30
eb5db4f4e6 feat: add offline mode with extension-based file categorization
- Add --offline flag to force offline mode
- Automatic detection when Gemini API is unavailable
- Prompt user to continue with offline mode on API failure
- Extension-based categorization for 80+ file extensions
- Add Video category to default categories
- Skip files with unknown extensions in offline mode
2026-01-08 22:30:22 +05:30
282e032086 Fix critical Windows compatibility issues and implement file batching
- Fix critical HOME variable bug that crashed on Windows
  * Replace hardcoded HOME env var with Config::get_data_dir()
  * Now uses cross-platform directories crate
  * Resolves to %APPDATA% on Windows, ~/.config on Linux/macOS

- Fix Unix-style path separators in display output
  * Use std::path::MAIN_SEPARATOR for OS-appropriate paths
  * Windows now shows backslashes, Unix shows forward slashes

- Implement batching for large file lists (100+ files)
  * Split file processing into batches of 50 files
  * Prevents network timeouts and API payload size issues
  * Added progress feedback for batch processing
  * Increased timeout from 30s to 120s per batch

- Bump version to 1.0.3

All tests passing, clippy clean, fully cross-platform compatible
2025-12-30 19:43:19 +05:30
7c551126cc update README with new modular file structure and fix unused import
- Updated Project Structure section to reflect new modular architecture
- Added detailed module breakdown (cli, files, gemini, models, settings, storage)
- Included Module Overview with descriptions of each module's purpose
- Removed HACKATHON_REVIEW.md file
- Fixed unused import warning in src/files/batch.rs
2025-12-30 02:24:44 +05:30
2211057e4f fixed formatting 2025-12-30 02:10:00 +05:30
33784d8f1d refactored every component thoroughly. 2025-12-30 02:08:26 +05:30