mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
refactor: Refactor ChatSummary initialization and remove max_chat_history_tokens param from Coder
This commit is contained in:
parent
2ee34ac189
commit
aa3e17dae6
2 changed files with 10 additions and 6 deletions
|
@ -477,6 +477,11 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
|
||||
commands = Commands(io, None, verify_ssl=args.verify_ssl)
|
||||
|
||||
summarizer = ChatSummary(
|
||||
[main_model, main_model.weak_model],
|
||||
args.max_chat_history_tokens,
|
||||
)
|
||||
|
||||
try:
|
||||
coder = Coder.create(
|
||||
main_model=main_model,
|
||||
|
@ -495,13 +500,13 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
code_theme=args.code_theme,
|
||||
stream=args.stream,
|
||||
use_git=args.git,
|
||||
max_chat_history_tokens=args.max_chat_history_tokens,
|
||||
restore_chat_history=args.restore_chat_history,
|
||||
auto_lint=args.auto_lint,
|
||||
auto_test=args.auto_test,
|
||||
lint_cmds=lint_cmds,
|
||||
test_cmd=args.test_cmd,
|
||||
commands=commands,
|
||||
summarizer=summarizer,
|
||||
)
|
||||
|
||||
except ValueError as err:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue