mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
feat: Add --cache-prompts bool option, default false
This commit is contained in:
parent
f9ed868076
commit
8326bd04dd
2 changed files with 10 additions and 0 deletions
|
@ -207,6 +207,12 @@ def get_parser(default_config_files, git_root):
|
||||||
default="auto",
|
default="auto",
|
||||||
help="Control when the repo map is refreshed (default: auto)",
|
help="Control when 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)",
|
||||||
|
)
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
"--max-chat-history-tokens",
|
"--max-chat-history-tokens",
|
||||||
type=int,
|
type=int,
|
||||||
|
|
|
@ -508,6 +508,9 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if args.cache_prompts:
|
||||||
|
args.map_refresh = "files"
|
||||||
|
|
||||||
coder = Coder.create(
|
coder = Coder.create(
|
||||||
main_model=main_model,
|
main_model=main_model,
|
||||||
edit_format=args.edit_format,
|
edit_format=args.edit_format,
|
||||||
|
@ -533,6 +536,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||||
commands=commands,
|
commands=commands,
|
||||||
summarizer=summarizer,
|
summarizer=summarizer,
|
||||||
map_refresh=args.map_refresh,
|
map_refresh=args.map_refresh,
|
||||||
|
cache_prompts=args.cache_prompts,
|
||||||
)
|
)
|
||||||
|
|
||||||
except ValueError as err:
|
except ValueError as err:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue