mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-12 15:45:00 +00:00
fix: Improve prompt caching and repo map refresh logic
This commit is contained in:
parent
f8b80548fd
commit
34dc7cc37d
5 changed files with 14 additions and 7 deletions
|
@ -205,13 +205,13 @@ def get_parser(default_config_files, git_root):
|
|||
"--map-refresh",
|
||||
choices=["auto", "always", "files", "manual"],
|
||||
default="auto",
|
||||
help="Control when the repo map is refreshed (default: auto)",
|
||||
help="Control how often the repo map is refreshed (default: auto)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--cache-prompts",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=False,
|
||||
help="Enable caching of prompts (forces map_refresh='files') (default: False)",
|
||||
help="Enable caching of prompts (default: False)",
|
||||
)
|
||||
group.add_argument(
|
||||
"--max-chat-history-tokens",
|
||||
|
|
|
@ -1017,7 +1017,7 @@ class Commands:
|
|||
except Exception as e:
|
||||
self.io.tool_error(f"Error processing clipboard content: {e}")
|
||||
|
||||
def cmd_read(self, args):
|
||||
def cmd_read_only(self, args):
|
||||
"Add a file to the chat that is for reference, not to be edited"
|
||||
if not args.strip():
|
||||
self.io.tool_error("Please provide a filename to read.")
|
||||
|
|
|
@ -507,7 +507,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
args.max_chat_history_tokens or main_model.max_chat_history_tokens,
|
||||
)
|
||||
|
||||
if args.cache_prompts:
|
||||
if args.cache_prompts and args.map_refresh == "auto":
|
||||
args.map_refresh = "files"
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue