Commit Graph

7 Commits

Author SHA1 Message Date
Kazuki Yamada
54a1391e30 refactor(cli): Use cliOptions directly for skillName and skillDir
Instead of creating separate variables and passing them through the task,
directly update cliOptions.skillName and cliOptions.skillDir. This simplifies
the code flow and removes redundant fields from DefaultActionTask interface.
2025-12-10 00:35:09 +09:00
Kazuki Yamada
46094b8cd8 fix(cli): Show correct skill output path in summary
When Personal Skills location is selected, the summary was showing
a relative path (.claude/skills/) instead of the actual path
(~/.claude/skills/). Now passes the computed skillDir to reportResults.
2025-12-10 00:27:43 +09:00
Kazuki Yamada
ea1cc485c2 chore(config): disable organizeImports for src/index.ts
Added override configuration to disable Biome's organizeImports feature
specifically for src/index.ts to allow manual import order management
while keeping automatic import organization enabled for other files.
2025-09-21 13:54:12 +09:00
Kazuki Yamada
681e377361 refactor(shared): improve error handling and cleanup code
- Use class names for RepomixError type checking instead of hardcoded strings
- Remove unused RepomixError import from fileProcess.ts
- Simplify comments in errorHandle.ts and fileProcess.ts
- Clean up constructor-based error checking logic
2025-09-17 00:59:58 +09:00
Kazuki Yamada
a9698bb74a refactor(cli): move tokenCountTree parsing to Commander.js level
- Move string-to-number parsing from defaultAction to Commander.js option parser
- Update CLI types to reflect Commander.js parsed values (boolean | number)
- Simplify buildCliConfig by removing redundant parsing logic
- Update tests to match new type expectations

This approach follows the same pattern as --top-files-len and centralizes
input validation at the CLI parsing level where it belongs.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 21:05:50 +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
Kazuki Yamada
eabbfa098b refactor(cli): reorganize CLI options and move tokenCountTree to cliPrint
Major restructuring of CLI options and tokenCountTree functionality:

CLI Options:
- Reorganized options into logical groups: "CLI Input/Output Options", "Repomix Output Options", and "File Selection Options"
- Moved --verbose, --quiet, --stdout, --stdin, --copy, --token-count-tree, --top-files-len to CLI I/O group
- Renamed --summarize-token-counts to --token-count-tree for clarity
- Updated README.md documentation to reflect new option organization

TokenCountTree Refactoring:
- Moved tokenCountTree functionality from saveTokenCounts.ts to cliPrint.ts as printTokenCountTree
- Deleted saveTokenCounts.ts (no longer needed)
- Removed handleTokenCountTree function from defaultAction.ts
- Integrated printTokenCountTree into printResults workflow for consistency
- Updated threshold calculation to be handled within printTokenCountTree

Configuration:
- Added tokenCountTree option to config schema with default value false
- Changed schema from z.union([z.boolean(), z.string()]) to z.union([z.boolean(), z.number()])
- CLI now converts string thresholds to numbers during buildCliConfig

Optimizations:
- Modified calculateMetrics to calculate all file tokens when tokenCountTree is enabled
- Prevents double token calculation for better performance

Display:
- Changed emoji from 📊 to 🔢 for Token Count Tree
- Updated title from "Token Count Summary" to "Token Count Tree"

Tests:
- Renamed and updated test files to match new structure
- Updated tests to work with new printTokenCountTree function signature
- All tests pass with new implementation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-03 15:53:28 +09:00