aider/aider
Paul Gauthier 1747525418 aider: Added max_chat_history_tokens as an explicit argument to the Coder.__init__ method and passed args.max_chat_history_tokens when creating the Coder instance in main().
# Aider chat conversation:

USER: don't use kwargs, add it as an explicit arg

ASSISTANT: Here is the *SEARCH/REPLACE block* to add `max_chat_history_tokens` as an explicit argument instead of using `**kwargs`:

aider/coders/base_coder.py
```python
<<<<<<< SEARCH
    def __init__(
        self,
        main_model,
        io,
        fnames=None,
        git_dname=None,
        pretty=True,
        show_diffs=False,
        auto_commits=True,
        dirty_commits=True,
        dry_run=False,
        map_tokens=1024,
        verbose=False,
        assistant_output_color="blue",
        code_theme="default",
        stream=True,
        use_git=True,
        voice_language=None,
        aider_ignore_file=None,
        cur_messages=None,
        done_messages=None,
    ):
=======
    def __init__(
        self,
        main_model,
        io,
        fnames=None,
        git_dname=None,
        pretty=True,
        show_diffs=False,
        auto_commits=True,
        dirty_commits=True,
        dry_run=False,
        map_tokens=1024,
        verbose=False,
        assistant_output_color="blue",
        code_theme="default",
        stream=True,
        use_git=True,
        voice_language=None,
        aider_ignore_file=None,
        cur_messages=None,
        done_messages=None,
        max_chat_history_tokens=None,
    ):
>>>>>>> REPLACE
```

aider/main.py
```python
<<<<<<< SEARCH
        coder = Coder.create(
            main_model=main_model,
            edit_format=args.edit_format,
            io=io,
            ##
            fnames=fnames,
            git_dname=git_dname,
            pretty=args.pretty,
            show_diffs=args.show_diffs,
            auto_commits=args.auto_commits,
            dirty_commits=args.dirty_commits,
            dry_run=args.dry_run,
            map_tokens=args.map_tokens,
            verbose=args.verbose,
            assistant_output_color=args.assistant_output_color,
            code_theme=args.code_theme,
            stream=args.stream,
            use_git=args.git,
            voice_language=args.voice_language,
            aider_ignore_file=args.aiderignore,
        )
=======
        coder = Coder.create(
            main_model=main_model,
            edit_format=args.edit_format,
            io=io,
            ##
            fnames=fnames,
            git_dname=git_dname,
            pretty=args.pretty,
            show_diffs=args.show_diffs,
            auto_commits=args.auto_commits,
            dirty_commits=args.dirty_commits,
            dry_run=args.dry_run,
            map_tokens=args.map_tokens,
            verbose=args.verbose,
            assistant_output_color=args.assistant_output_color,
            code_theme=args.code_theme,
            stream=args.stream,
            use_git=args.git,
            voice_language=args.voice_language,
            aider_ignore_file=args.aiderignore,
            max_chat_history_tokens=args.max_chat_history_tokens,
        )
>>>>>>> REPLACE
```

This adds `max_chat_history_tokens` as an explicit argument to the `Coder.__init__` method, and passes `args.max_chat_history_tokens` when creating the `Coder` instance in `main()`.
2024-05-06 09:25:04 -07:00
..
coders aider: Added max_chat_history_tokens as an explicit argument to the Coder.__init__ method and passed args.max_chat_history_tokens when creating the Coder instance in main(). 2024-05-06 09:25:04 -07:00
queries fix(tree-sitter-typescript-tags.scm): Add additional queries. 2024-03-04 15:03:55 -07:00
__init__.py set version to 0.31.2-dev 2024-05-02 12:50:18 -07:00
args.py aider: Added a --max-chat-history-tokens switch and passed it to ChatSummary in Coder. 2024-05-06 09:23:37 -07:00
commands.py added autocomplete for model names 2024-04-30 16:29:10 -07:00
diffs.py use utf-8 2023-07-05 20:51:35 -07:00
dump.py isort 2023-05-28 22:47:38 -07:00
gui.py browser blog post 2024-05-02 10:39:33 -07:00
history.py refactored summarize_chat_history_markdown 2024-05-05 18:58:16 -07:00
io.py Remove unnecessary comment and method call in Commands class. 2023-12-11 22:24:02 +13:00
main.py aider: Added max_chat_history_tokens as an explicit argument to the Coder.__init__ method and passed args.max_chat_history_tokens when creating the Coder instance in main(). 2024-05-06 09:25:04 -07:00
mdstream.py catch shutdown errors 2024-01-23 10:45:58 -08:00
models.py gpt-4-0314 with examples as sys 2024-05-04 07:52:22 -07:00
prompts.py On /undo, ask GPT to wait before retrying the changes #450 2024-01-22 13:05:38 -08:00
repo.py Do not require gpt-3.5 in GitRepo 2024-04-20 09:47:43 -07:00
repomap.py cleanup 2024-04-19 12:14:58 -07:00
scrape.py added docstrings 2024-05-01 15:14:14 -07:00
sendchat.py max_time not max_tries 2024-05-04 17:48:01 -07:00
utils.py Tell the AI we are switching code bases 2024-04-30 20:51:24 -07:00
versioncheck.py aider: Add --check-update to make aider check for update and return status in the exit code. 2024-01-04 12:27:31 -08:00
voice.py Quiet litellm 2024-04-23 10:37:43 -07:00