Fix empty code chunks
Currently there is an edge case that we didn't handle properly: if the cursor location is at the beginning or the end of a function, the prompt-engine will return the test case where either code_before
is empty or code_after
is empty. This is the correct behaviour on the prompt-engine side, however such cases should be filtered out in the pipeline.
This MR handles the edge case and modifies the CodeChunker
to skip a code chunk if either code_before
or code_after
is empty.