Commit graph

507 commits

Author SHA1 Message Date
Paul Gauthier
8f194c8313 Add reflection tracking and limit to Coder class. 2024-05-17 19:11:48 -07:00
Paul Gauthier
4b0c38254e added lint reflection 2024-05-17 16:58:04 -07:00
Paul Gauthier
819fccc7a4 added temp param, prompt strong that files message is truth 2024-05-16 08:52:30 -07:00
Paul Gauthier
ecc46bd3e3 16x 2024-05-14 14:04:45 -07:00
Paul Gauthier
73e6949287 refac 2024-05-14 11:12:36 -07:00
Paul Gauthier
6638efbee4 better prompting for LLM to suggest files 2024-05-14 06:02:16 -07:00
Paul Gauthier
292250db4f prompt and token adjustments when no files in chat with repo 2024-05-13 12:30:42 -07:00
Paul Gauthier
edc70bdf84 Handle multiline tool_error() better 2024-05-13 11:42:22 -07:00
Paul Gauthier
ea05cf05e1 Added --restore-chat-history 2024-05-13 11:09:28 -07:00
Paul Gauthier
90c0a5b9a4 reflect multiple messages; do not strip edit error messages 2024-05-11 16:40:37 -07:00
Paul Gauthier
0f9e314bb2 emit edit errors as proper tool_error() markdown 2024-05-11 15:38:03 -07:00
Paul Gauthier
602a0c7c31 refac utils.split_chat_history_markdown 2024-05-11 07:52:06 -07:00
paul-gauthier
45b2ba8a10
Merge pull request #591 from paul-gauthier/restore-chat-history
Restore prior chat history on launch
2024-05-11 07:49:43 -07:00
Paul Gauthier
1098b428e6 prompt tweaks, retry on httpx.ReadTimeout 2024-05-11 07:47:53 -07:00
Paul Gauthier
3171789b1f look for mentions with trailing : 2024-05-10 19:38:05 -07:00
Paul Gauthier
4eec60f42c updated assistant auto-reply to no files 2024-05-09 11:56:11 -07:00
Paul Gauthier
444d17de93 reverted prompt closer to e9da401, added helpful assistant replies to repo and files messages 2024-05-09 11:27:13 -07:00
Paul Gauthier
7a98953fae split repo map and added files into 2 user messages 2024-05-08 14:13:50 -07:00
Paul Gauthier
738c3b8e5e fall back to global repo map if files in chat are disjoint from rest of repo 2024-05-08 13:56:06 -07:00
Paul Gauthier
48fd67485c add a user message during --show-prompts 2024-05-08 13:49:38 -07:00
Paul Gauthier
9e7f2ec790 cleanup 2024-05-08 13:41:24 -07:00
Paul Gauthier
f256b43043 wip 2024-05-08 13:35:34 -07:00
Paul Gauthier
9ff6770a04 refactored litellm to avoid duplicating workarounds 2024-05-08 08:05:15 -07:00
Paul Gauthier
04b224962e send the reminder if unknown context window size 2024-05-07 08:42:33 -07:00
Paul Gauthier
e61857ef09 summarize as many messages as will fit into the summarizer context 2024-05-06 09:47:14 -07:00
Paul Gauthier
64470955d4 pass max_chat_history_tokens into ChatSummary 2024-05-06 09:29:21 -07:00
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
Paul Gauthier
eac8e4cb8f announce reload of chat history 2024-05-05 19:08:00 -07:00
Paul Gauthier
00c12efd3f cleanup 2024-05-05 19:04:24 -07:00
Paul Gauthier
b3e19cf5be reload history 2024-05-05 19:03:17 -07:00
Paul Gauthier
7bcce6e8c6 move reminder after examples 2024-05-04 08:00:39 -07:00
Paul Gauthier
b5bb453378 examples_as_sys_msg 2024-05-03 15:24:36 -07:00
Paul Gauthier
5d32dd77fc Added diff-fenced coder 2024-05-03 13:50:15 -07:00
Paul Gauthier
921c7ceb80 Merge branch 'main' into gemini-editblock-and-examples 2024-05-03 13:17:23 -07:00
Paul Gauthier
e76d1c0cfa accepts_multi_system_msgs -> reminder_as_sys_msg 2024-05-01 10:30:41 -07:00
Paul Gauthier
862c0dd0d7 stronger code base switch prompt 2024-05-01 09:40:47 -07:00
Paul Gauthier
0fb08896e3 Merge branch 'main' into gemini-editblock-and-examples 2024-05-01 09:02:08 -07:00
Paul Gauthier
7fd3b8aeee Tell the AI we are switching code bases 2024-04-30 20:51:24 -07:00
Paul Gauthier
d51cada163 make the examples part of the chat 2024-04-30 20:45:49 -07:00
Paul Gauthier
256a9a454c move cloning into Coder.create, summarize chat history if edit format changes 2024-04-30 17:31:58 -07:00
Paul Gauthier
8e9a00006b carry conversation history to switched model 2024-04-30 16:25:47 -07:00
Paul Gauthier
a3a4d87a0c treat litellm.exceptions.BadRequestError as a 400 error and do not retry 2024-04-30 15:40:28 -07:00
Paul Gauthier
d38a38f0dd implemented accepts_multi_system_msgs 2024-04-30 07:57:29 -07:00
Paul Gauthier
2d16ee16ac Make lazy prompt configurable 2024-04-30 07:45:16 -07:00
Paul Gauthier
65dccb6205 Merge branch 'main' into gemini-editblock 2024-04-29 20:42:52 -07:00
Paul Gauthier
ec9fac2500 simpler launch of streamlit 2024-04-28 14:48:40 -07:00
Paul Gauthier
ca6349069c noop 2024-04-28 12:38:25 -07:00
Paul Gauthier
0f8efa3714 Coder.drop_rel_fname 2024-04-28 07:15:48 -07:00
Paul Gauthier
296a336d22 yield from 2024-04-27 11:47:18 -07:00
Paul Gauthier
701103a9cc chat works, with commits and reflected messages 2024-04-27 08:09:13 -07:00