From 4a7fc084ce2933bacc63cbc0a5e00262d1ba02af Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 11 Dec 2024 15:07:30 -0800 Subject: [PATCH] refactor: move watch prompt text to separate module --- aider/watch.py | 8 ++------ aider/watch_prompts.py | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 aider/watch_prompts.py diff --git a/aider/watch.py b/aider/watch.py index c346b1341..4d0f21edd 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -9,6 +9,7 @@ from pathspec.patterns import GitWildMatchPattern from watchfiles import watch from aider.dump import dump # noqa +from aider.watch_prompts import watch_prompt def is_source_file(path: Path) -> bool: @@ -186,12 +187,7 @@ class FileWatcher: self.analytics.event("ai-comments execute") self.io.tool_output("Processing your request...") - res = """ -The "AI" comments below marked with █ can be found in the code files I've shared with you. -They contain your instructions. -Make the requested changes. -Be sure to remove all these "AI" comments from the code! -""" + res = watch_prompt # Refresh all AI comments from tracked files for fname in self.coder.abs_fnames: diff --git a/aider/watch_prompts.py b/aider/watch_prompts.py new file mode 100644 index 000000000..138651d82 --- /dev/null +++ b/aider/watch_prompts.py @@ -0,0 +1,6 @@ +watch_prompt = """ +Find the "AI" comments below (marked with █) in the code files I've shared with you. +They contain your instructions. +Make the requested changes. +Be sure to remove all these "AI" comments from the code! +"""