Closed nicovank closed 1 year ago
One more thing: I wonder if it would make sense to offer an option to exclude files not in the current path or set of paths. I tried it with a LaTeX build error and I think all the includes throw it off (with just the source, GPT-4 figured out the error).
Maybe something like header-filter
in clang
, specifying with a regex which paths to include/exclude?
Maybe - Scalene by default uses only local files, and has options to profile-all
and profile-exclude
(the latter uses substrings). AFAICT the default for clang-tidy
is to include all by default, and then only include the ones listed in header-filter
. This seems like a lot of complexity. It might just be the case that includes are only a problem for LaTeX, and we could solve this with a latex / pdflatex wrapper.
Various prompt changes, which hopefully help GPT produce better error messages / diffs.
max-error-tokens
andmax-code-tokens
instead ofmax-context
. I set the default to 2048 - 128 = 1920 for each to leave a bit of space for other parts of the prompt.A sample prompt before this change (note that overriding the default max context is necessary).
```` % g++ -x c++ `./tests/anonymizer.py tests/c++/missing-hash.cpp` |& cwhy --max-context=10 --show-prompt This is my code: File `/tmp/tmpdi_yyfvl` line 6 to 15: ``` struct Node { const std::pairThe same sample prompt now.
```` % g++ -x c++ `./tests/anonymizer.py tests/c++/missing-hash.cpp` |& cwhy --show-prompt This is my code: File `/tmp/tmpiegd__jl`: ``` 7 struct Node { 8 const std::pair