mufeedvh / code2prompt

A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
MIT License
1.45k stars 77 forks source link

handle no clipboard more gracefully, prints to stdout #30

Closed perstarkse closed 3 weeks ago

perstarkse commented 1 month ago

Small change to handle no clipboard error without panicking, will print to sdtout if no clipboard. Will close #26

Seems like some minor formatting changes got included as well due to auto-formatter, let me know if that's a issue.

HmmIsThisThingOn commented 1 month ago

This fixed the the clipboard panic error for me, but the exclude function isn't working as intended with globs, listing many filetypes

perstarkse commented 1 month ago

This fixed the the clipboard panic error for me, but the exclude function isn't working as intended with globs, listing many filetypes

And the exclude function works as normal when not using this commit? I see there’s a reported issue about the exclude functionality. #31

HmmIsThisThingOn commented 1 month ago

The other commit didn't work for me, but yeah, probably not your issue :) Sorry, I'm by all measures unqualified to have a github account

perstarkse commented 1 month ago

The other commit didn't work for me, but yeah, probably not your issue :) Sorry, I'm by all measures unqualified to have a github account

No worries at all, reporting bugs and testing are large parts to making open source software great! Looking at the code affected by this commit I suspect that the bug isn’t introduced here, but sometimes unexpected things happen :)

mufeedvh commented 3 weeks ago

Thank you so much @perstarkse for the PR! Merging now! ❤️ 🙌