Skip to content
Merged
14 changes: 14 additions & 0 deletions .github/instructions/base.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ repomix/
- Description should be clear and concise in present tense
- Description must start with a capital letter

## Pull Request Guidelines
- All pull requests must follow the template:
```md
<!-- Please include a summary of the changes -->

## Checklist

- [ ] Run `npm run test`
- [ ] Run `npm run lint`
```
Comment thread
yamadashy marked this conversation as resolved.
- Include a clear summary of the changes at the top of the pull request description
- Reference any related issues using the format `#issue-number`


## Dependencies and Testing
- Inject dependencies through a deps object parameter for testability
- Example:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ repomix-output.md

# aider
.aider*

# private files
.cursor/rules/
.github/todo.md
6 changes: 5 additions & 1 deletion src/cli/cliPrint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,15 @@ export const printTopFiles = (
.sort((a, b) => b[1] - a[1])
.slice(0, topFilesLength);

// Calculate total token count
const totalTokens = Object.values(fileTokenCounts).reduce((sum, count) => sum + count, 0);
Comment thread
yamadashy marked this conversation as resolved.

topFiles.forEach(([filePath, charCount], index) => {
const tokenCount = fileTokenCounts[filePath];
const percentageOfTotal = ((tokenCount / totalTokens) * 100).toFixed(1);
Comment thread
yamadashy marked this conversation as resolved.
Outdated
Comment thread
yamadashy marked this conversation as resolved.
Outdated
const indexString = `${index + 1}.`.padEnd(3, ' ');
logger.log(
`${pc.white(`${indexString}`)} ${pc.white(filePath)} ${pc.dim(`(${charCount.toLocaleString()} chars, ${tokenCount.toLocaleString()} tokens)`)}`,
`${pc.white(`${indexString}`)} ${pc.white(filePath)} ${pc.dim(`(${charCount.toLocaleString()} chars, ${tokenCount.toLocaleString()} tokens, ${percentageOfTotal}%)`)}`,
);
Comment thread
yamadashy marked this conversation as resolved.
});
};
Expand Down