feat(grep): added grep CLI, diff highlighting, FileReader abstraction, and markdown improvements

- Added grep CLI subcommand with support for pattern matching, file globbing, context lines, and multiple output modes (content, files-with-matches, count).
- Added diff syntax highlighting support with distinct colors for inserted and deleted lines in code output.
- Implemented FileReader abstraction for cross-platform file reading with mmap support and 4MB size limit.
- Refactored worker pool initialization to support both compiled and development build environments using resolveWorkerSpecifier utility.
- Enhanced markdown rendering with improved inline style context handling and blockquote formatting with text wrapping.
- Replaced external strip-ansi dependency with Bun's built-in stripANSI method across all packages.
This commit is contained in:
can1357
2026-01-31 01:27:36 +01:00
parent d1a18a29e5
commit a07f38b16e
25 changed files with 441 additions and 73 deletions
@@ -2049,6 +2049,8 @@ function getHighlightColors(t: Theme): NativeHighlightColors {
type: t.getFgAnsi("syntaxType"),
operator: t.getFgAnsi("syntaxOperator"),
punctuation: t.getFgAnsi("syntaxPunctuation"),
inserted: t.getFgAnsi("toolDiffAdded"),
deleted: t.getFgAnsi("toolDiffRemoved"),
};
}
return cachedHighlightColors;