From 5d7e44082e83f67a866ac1a9b9bb3b49fefa8080 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 29 Sep 2023 13:07:56 -0700 Subject: [PATCH] print warning if cur wd is different than git wd, per discussion in #188 --- aider/main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aider/main.py b/aider/main.py index 23fcc1014..ffad5f454 100644 --- a/aider/main.py +++ b/aider/main.py @@ -522,6 +522,15 @@ def main(argv=None, input=None, output=None, force_git_root=None): io.tool_output("Use /help to see in-chat commands, run with --help to see cmd line args") + if git_root and Path.cwd().resolve() != Path(git_root).resolve(): + io.tool_error( + "Note: in-chat filenames are always relative to the git working dir, not the current" + " working dir." + ) + + io.tool_error(f"Cur working dir: {Path.cwd()}") + io.tool_error(f"Git working dir: {git_root}") + if args.message: io.tool_output() coder.run(with_message=args.message)