Commit Graph

5 Commits

Author SHA1 Message Date
Kazuki Yamada
c5fb07cdbe fix(cli): Show relative path for skill output when under cwd
When the skill directory is under the current working directory,
show a relative path (e.g., .claude/skills/my-skill) instead of
an absolute path for better readability.
2025-12-10 00:27:43 +09:00
Kazuki Yamada
72735cfdb1 test(coverage): Improve test coverage for CLI and core modules
Added comprehensive test coverage for critical CLI and core functionality:

- Created new test file for cliSpinner with 15 tests covering:
  * Spinner start/stop/update operations
  * Quiet/verbose/stdout mode handling
  * Success/fail message display
  * Interval management

- Enhanced initAction tests (11→17 tests):
  * Added isCancel handling for user cancellation
  * Added return value validation tests
  * Covered config and ignore file creation flows

- Enhanced cliReport tests (8→15 tests):
  * Added git diffs/logs reporting tests
  * Added security check reporting for git content
  * Added single vs multiple issue message handling

- Enhanced permissionCheck tests (13→16 tests):
  * Added macOS-specific error message tests
  * Added platform-specific error handling tests
  * Added unknown error code handling

- Enhanced outputGenerate tests (7→12 tests):
  * Added git diffs/logs inclusion tests
  * Added JSON format output tests
  * Added file/directory structure exclusion tests

Overall improvements:
- Test count: 804 → 840 (+36 tests)
- Code coverage: 70.63% → 71.00% (+0.37%)
- Branch coverage: 77.64% → 78.55% (+0.91%)
- Significant improvement in CLI modules (cliSpinner: 25% → 59.61%)
2025-10-31 01:18:21 +09:00
Kazuki Yamada
8bf797114b feat(cli): Report files detected as binary by content inspection
Add new "Binary Files Detected" section to CLI output that shows files which were
skipped due to binary content detection (not extension-based). This addresses issue #752
where users were not informed about files being silently excluded.

Changes:
- Update fileRead.ts to return detailed skip reasons (binary-extension, binary-content, size-limit, encoding-error)
- Modify file collection pipeline to track and propagate skipped files
- Add reportSkippedFiles function to display binary-content detected files
- Show files with relative paths and helpful exclusion messages
- Only display section when binary-content files are found
- Add comprehensive test coverage for new functionality

The implementation follows existing security check reporting patterns and provides
users clear visibility into why files were excluded from output.
2025-08-23 14:35:54 +09:00
Kazuki Yamada
5b5ee862a0 feat(cli): Add --include-logs option for git commit history
This feature allows users to include git log information in the output to help AI understand development patterns and file change relationships.

Key changes:
- Added --include-logs and --include-logs-count CLI options
- Default to 50 commits, configurable via CLI and config file
- Includes commit date, message, and changed file paths (excludes commit hashes)
- Added security checks and metrics calculation for git logs
- Updated output templates to include git logs section
- Comprehensive test coverage and TypeScript fixes

Resolves user request for including git commit history to provide development context for AI analysis.
2025-08-22 14:09:58 +09:00
Kazuki Yamada
2e584c1436 refactor(cli): rename cliPrint to cliReport and reorganize reporting functions
- Rename cliPrint.ts to cliReport.ts with all functions changed from print* to report*
- Move printResults from defaultAction to cliReport as reportResults for better organization
- Move reportTokenCountTree to cli/reporters/tokenCountTreeReporter.ts for cleaner separation
- Move test-only functions (buildTokenCountStructure, convertToOutput) from core module to test files
- Update all imports and test files to reflect new naming conventions
- Maintain all functionality while improving code organization and module cohesion

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 16:26:30 +09:00