From fe2e36afdad0af5ee0fb85435a770aabdcef653c Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 9 Sep 2024 14:51:33 -0700 Subject: [PATCH] cache ro+repo or just ro if no repo --- aider/coders/chat_chunks.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/aider/coders/chat_chunks.py b/aider/coders/chat_chunks.py index 881e781f2..060099a61 100644 --- a/aider/coders/chat_chunks.py +++ b/aider/coders/chat_chunks.py @@ -31,10 +31,12 @@ class ChatChunks: else: self.add_cache_control(self.system) - if self.readonly_files: - self.add_cache_control(self.readonly_files) - else: + if self.repo: + # this will mark both the readonly_files and repomap chunk as cacheable self.add_cache_control(self.repo) + else: + # otherwise, just cache readonly_files if there are any + self.add_cache_control(self.readonly_files) self.add_cache_control(self.chat_files)