Files
lobehub/apps
Innei b010ab9da8 ♻️ refactor(fileSearch): File/Content Search by Platform (#12074)
* ♻️ refactor(fileSearch): consolidate determineContentType to base class and use os.homedir()

- Move determineContentType method to FileSearchImpl base class with merged type mappings
- Replace process.env.HOME with os.homedir() in macOS and Linux implementations
- Replace process.env.USERPROFILE with os.homedir() in Windows implementation
- Remove duplicate implementation from three platform-specific classes

* refactor: content search service

* chore: add engine text

* fix: show engine

* test: add unit tests for contentSearch and fileSearch modules

- Add base.test.ts and index.test.ts for contentSearch module
- Add base.test.ts and index.test.ts for fileSearch module
- Test buildGrepArgs, determineContentType, escapeGlobPattern, etc.
- Test factory functions for platform-specific implementations

* 🐛 fix(contentSearch): use correct ripgrep glob patterns for nested path exclusion

Change `!node_modules` and `!.git` to `!**/node_modules/**` and `!**/.git/**`
to properly exclude nested directories as per ripgrep documentation.

* fix: types
2026-02-11 12:58:46 +08:00
..