Closed simonw closed 3 months ago
Do you want to accept multiple args for path
? or add a new option like --files
?
cat files_to_prompt/cli.py | llm -m opus --system ' Modify this file. It should take multiple arguments in a variable called paths. Each of those argumets might be a path to a file or it might be a path to a directory - if any of the arguments do not correspoind to a file or directory it should raise a click error.
It should then do what it does already but for all files or files-recursively-contained-within-folders that are passed to it.
It should still obey the gitignore logic.'
https://gist.github.com/simonw/345f16a54f9e753852ea0af4bd7c2abc
files-to-prompt files_to_prompt tests | llm -m opus --system \
'rewrite the tests to cover the ability to pass multiple files and folders to the tool'
https://gist.github.com/simonw/c3b021f7b4f8b1e30b79f95210cc5702
files-to-prompt files_to_prompt tests | llm -m opus --system \
'add one last test which tests .gitignore and include_hidden against an example that mixes single files and directories of files together in one invocation'
https://gist.github.com/simonw/a578bae9fe409cb29533ae28a348cb27
I decided to make that last test a bit easier to read.
symbex test_mixed_paths_with_options | llm -m opus --system \
'rewrite this test so the filenames are more obvious, thinks like ignored_in_gitignore.txt'
llm -c 'add a last bit to that test for ["test_dir", "single_file.txt", "--ignore-gitignore", "--include-hidden"]'
https://gist.github.com/simonw/a637f3e244ef1330e657221bfa84dfae
That way you could send just specific files like this: