diff --git a/src/cli/cliReport.ts b/src/cli/cliReport.ts index 743a63e1..107589c9 100644 --- a/src/cli/cliReport.ts +++ b/src/cli/cliReport.ts @@ -169,7 +169,7 @@ export const reportSkippedFiles = (rootDir: string, skippedFiles: SkippedFileInf } logger.log(pc.white('📄 Binary Files Detected:')); - logger.log(pc.dim('──────────────────────────')); + logger.log(pc.dim('─────────────────────────')); if (binaryContentFiles.length === 1) { logger.log(pc.yellow('1 file detected as binary by content inspection:')); @@ -180,7 +180,6 @@ export const reportSkippedFiles = (rootDir: string, skippedFiles: SkippedFileInf binaryContentFiles.forEach((file, index) => { const relativeFilePath = path.relative(rootDir, file.path); logger.log(`${pc.white(`${index + 1}.`)} ${pc.white(relativeFilePath)}`); - logger.log(pc.dim(' - Detected as binary despite text extension')); }); logger.log(pc.yellow('\nThese files have been excluded from the output.')); diff --git a/src/core/file/workers/fileCollectWorker.ts b/src/core/file/workers/fileCollectWorker.ts index cf0205ad..564dc381 100644 --- a/src/core/file/workers/fileCollectWorker.ts +++ b/src/core/file/workers/fileCollectWorker.ts @@ -1,6 +1,6 @@ import path from 'node:path'; -import { logger, setLogLevelByWorkerData } from '../../../shared/logger.js'; -import { readRawFile } from '../fileRead.js'; +import { setLogLevelByWorkerData } from '../../../shared/logger.js'; +import { FileSkipReason, readRawFile } from '../fileRead.js'; import type { RawFile } from '../fileTypes.js'; // Initialize logger configuration from workerData at module load time @@ -15,7 +15,7 @@ export interface FileCollectTask { export interface SkippedFileInfo { path: string; - reason: string; + reason: FileSkipReason; } export interface FileCollectResult { diff --git a/tests/cli/cliReport.binaryFiles.test.ts b/tests/cli/cliReport.binaryFiles.test.ts index 51f7e283..68a52444 100644 --- a/tests/cli/cliReport.binaryFiles.test.ts +++ b/tests/cli/cliReport.binaryFiles.test.ts @@ -30,7 +30,6 @@ describe('reportSkippedFiles', () => { expect(logger.log).toHaveBeenCalledWith(expect.stringContaining('📄 Binary Files Detected:')); expect(logger.log).toHaveBeenCalledWith(expect.stringContaining('1 file detected as binary')); expect(logger.log).toHaveBeenCalledWith(expect.stringContaining('dir/malformed.txt')); - expect(logger.log).toHaveBeenCalledWith(expect.stringContaining('Detected as binary despite text extension')); }); test('should report multiple binary-content files', () => {