aider/aider
Paul Gauthier 24b40f6982 aider: Removed common directory prefix from file paths in get_input function.
# Context:
USER: in get_input, instead of showing the full file paths... remove the common directory prefix that they all share
ASSISTANT: To remove the common directory prefix from the file paths, we can use the `os.path.commonprefix()` function and then remove the common prefix from each file path. Here's the change:

```python
aider/getinput.py
<<<<<<< ORIGINAL
def get_input(history_file, fnames):
    show = ' '.join(fnames)
=======
import os

def get_input(history_file, fnames):
    common_prefix = os.path.commonprefix(fnames)
    short_fnames = [fname.replace(common_prefix, '', 1) for fname in fnames]
    show = ' '.join(short_fnames)
>>>>>>> UPDATED
    show += "\n> "
```
2023-05-10 10:04:14 -07:00
..
__init__.py initial 2023-05-09 11:00:32 -07:00
coder.py ask user if new files should be added to git 2023-05-10 09:47:59 -07:00
dump.py moved into subdir 2023-05-09 10:52:18 -07:00
getinput.py aider: Removed common directory prefix from file paths in get_input function. 2023-05-10 10:04:14 -07:00
main.py added aider: prefix to gpt generated edits 2023-05-09 14:06:26 -07:00
prompts.py added prompt to explain how gpt can create new files 2023-05-10 09:38:54 -07:00
test_utils.py moved into subdir 2023-05-09 10:52:18 -07:00
utils.py aider: Added display_fname arg to quoted_file and updated call to quoted_file to pass relative file path. 2023-05-10 09:24:27 -07:00