Commit graph

818 commits

Author SHA1 Message Date
Paul Gauthier
a907d17377 added 2048 example 2023-05-12 22:28:18 -07:00
Paul Gauthier
3a5f412795 aider: Added Pong game example to the list of example transcripts in README.md.
# Context:
USER: add pong to the README
ASSISTANT: Here's the update to the `examples/README.md` file to include the Pong example:

```python
examples/README.md
<<<<<<< ORIGINAL
Here are some example transcripts that show how you can chat with Aider to generate and edit code with GPT-4:

1. [**Hello World Flask App**](hello-world-flask.md): This example demonstrates how to create a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence.

2. [**Semantic Search & Replace**](semantic-search-replace.md): This example showcases Aider's ability to perform semantic search and replace operations in code, dealing with various formatting and semantic differences in the calls that it updates.
=======
Here are some example transcripts that show how you can chat with Aider to generate and edit code with GPT-4:

1. [**Hello World Flask App**](hello-world-flask.md): This example demonstrates how to create a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence.

2. [**Semantic Search & Replace**](semantic-search-replace.md): This example showcases Aider's ability to perform semantic search and replace operations in code, dealing with various formatting and semantic differences in the calls that it updates.

3. [**Pong Game with Pygame**](pong.md): This example demonstrates how to create a simple Pong game using the Pygame library, with customizations for paddle size and color, and ball speed adjustments.
>>>>>>> UPDATED
```

This change adds the Pong game example to the list of example transcripts in the `examples/README.md` file.

_Applied edit to examples/README.md_
_Commit 5d3a1b7 aider: Added Pong game example to the list of example transcripts in README.md._
2023-05-12 21:42:14 -07:00
Paul Gauthier
3706f9f164 pong transcript 2023-05-12 21:41:01 -07:00
Paul Gauthier
669a2fce60 Changed prompts to include more detailed steps and added new description to examples/README. 2023-05-12 21:23:57 -07:00
Paul Gauthier
a0ee097f9c copy 2023-05-12 16:19:00 -07:00
Paul Gauthier
639471de35 aider: Updated links in bolded titles of examples in examples/README.md.
# Context:
USER: can you link to the examples from the bolded title of each list entry?
ASSISTANT: Sure, I can update the `examples/README.md` file to include links in the bolded titles of each list entry.

```markdown
examples/README.md
<<<<<<< ORIGINAL
1. **Hello World Flask App**: This example demonstrates how to create a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence. [View the example here](examples/hello-world-flask.md).

2. **Semantic Search & Replace**: This example showcases Aider's ability to perform semantic search and replace operations in code, dealing with various formatting and semantic differences in the calls that it updates. [View the example here](examples/semantic-search-replace.md).
=======
1. [**Hello World Flask App**](examples/hello-world-flask.md): This example demonstrates how to create a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence.

2. [**Semantic Search & Replace**](examples/semantic-search-replace.md): This example showcases Aider's ability to perform semantic search and replace operations in code, dealing with various formatting and semantic differences in the calls that it updates.
>>>>>>> UPDATED
```
2023-05-12 16:18:28 -07:00
Paul Gauthier
5966787566 copy 2023-05-12 16:17:02 -07:00
Paul Gauthier
88e3b286a8 initial 2023-05-12 16:15:45 -07:00
Paul Gauthier
15ac06f4a1 Removed Aider examples from README.md. 2023-05-12 16:15:13 -07:00
Paul Gauthier
21bce20f42 aider: Added README.md file with descriptions and links to the two examples.
# Context:
USER: add a README.md that describes and links to the 2 examples
ASSISTANT: ```python
README.md
<<<<<<< ORIGINAL

=======
# Aider Examples

This repository contains two examples demonstrating the capabilities of Aider. Below is a brief description of each example and a link to their respective markdown files.

1. **Hello World Flask App**: This example demonstrates how to create a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence. [View the example here](examples/hello-world-flask.md).

2. **Semantic Search & Replace**: This example showcases Aider's ability to perform semantic search and replace operations in code, dealing with various formatting and semantic differences in the calls that it updates. [View the example here](examples/semantic-search-replace.md).
>>>>>>> UPDATED
```

I've added a README.md file with descriptions and links to the two examples.
2023-05-12 16:14:41 -07:00
Paul Gauthier
c1d551d970 wip: Removed writing to ".aider.last.md" file. 2023-05-12 15:50:38 -07:00
Paul Gauthier
87a22d6a42 better 2023-05-12 15:49:04 -07:00
Paul Gauthier
f7769210d2 better 2023-05-12 15:48:54 -07:00
Paul Gauthier
5ea104875e better 2023-05-12 15:48:33 -07:00
Paul Gauthier
580459f53a better 2023-05-12 15:47:08 -07:00
Paul Gauthier
98a2adb056 better 2023-05-12 15:44:45 -07:00
Paul Gauthier
238287312e Added new files to the git repo message 2023-05-12 15:44:36 -07:00
Paul Gauthier
2e2eae0616 better 2023-05-12 15:40:38 -07:00
Paul Gauthier
860279a23f better 2023-05-12 15:39:19 -07:00
Paul Gauthier
ae7d5c33b4 Refactored get_rel_fname method and updated print statement in Coder class. 2023-05-12 15:36:45 -07:00
Paul Gauthier
a1cb2e0cd2 Refactor Coder class to use get_rel_fname method instead of os.path.relpath. 2023-05-12 15:30:43 -07:00
Paul Gauthier
888ab713f9 better 2023-05-12 15:24:55 -07:00
Paul Gauthier
bddef03323 wip: Changed chat history format and added italics to some messages. 2023-05-12 15:23:36 -07:00
Paul Gauthier
1a76815998 better 2023-05-12 15:23:17 -07:00
Paul Gauthier
11f8beae1d better 2023-05-12 15:21:46 -07:00
Paul Gauthier
cb4b1115d3 better 2023-05-12 15:21:15 -07:00
Paul Gauthier
f79bec7994 better 2023-05-12 15:20:06 -07:00
Paul Gauthier
6539dd5bf2 better 2023-05-12 15:19:31 -07:00
Paul Gauthier
38388e05ba better 2023-05-12 15:19:20 -07:00
Paul Gauthier
f0e23671bd better 2023-05-12 15:19:04 -07:00
Paul Gauthier
91ecfe8e88 better 2023-05-12 15:18:23 -07:00
Paul Gauthier
1beffbde0f better 2023-05-12 15:17:50 -07:00
Paul Gauthier
a226692413 initial 2023-05-12 15:14:40 -07:00
Paul Gauthier
bc12ecf82c Changed print statement to avoid logging or further colorizing. 2023-05-12 15:06:29 -07:00
Paul Gauthier
69d5e8a624 wip: Updated print statements and appended new line character to session start message. 2023-05-12 15:03:12 -07:00
Paul Gauthier
10376a9175 cleanup 2023-05-12 14:52:58 -07:00
Paul Gauthier
991e143b63 aider: Added date/time stamp to the "New session started" message.
# Context:
USER: add a date/time stamp to the New session started msg
ASSISTANT: To add a date/time stamp to the "New session started" message, we will import the `datetime` module and use the `datetime.now()` function to get the current date and time. Then, we will format the date/time string and append it to the message.

Here's the change to the `aider/getinput.py` file:

```python
aider/getinput.py
<<<<<<< ORIGINAL
import sys
import time
import random
from pathlib import Path
=======
import sys
import time
import random
from pathlib import Path
from datetime import datetime
>>>>>>> UPDATED

aider/getinput.py
<<<<<<< ORIGINAL
    def __init__(self, pretty, yes, input_history_file, chat_history_file):
        self.pretty = pretty
        self.yes = yes
        self.input_history_file = input_history_file
        self.chat_history_file = Path(chat_history_file)

        if pretty:
            self.console = Console()
        else:
            self.console = Console(force_terminal=True, no_color=True)

        self.append_chat_history('# New session started', False)
=======
    def __init__(self, pretty, yes, input_history_file, chat_history_file):
        self.pretty = pretty
        self.yes = yes
        self.input_history_file = input_history_file
        self.chat_history_file = Path(chat_history_file)

        if pretty:
            self.console = Console()
        else:
            self.console = Console(force_terminal=True, no_color=True)

        current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
        self.append_chat_history(f'# New session started at {current_time}', False)
>>>>>>> UPDATED
```
2023-05-12 14:49:33 -07:00
Paul Gauthier
0d11873683 wip: Added chat history message for new session. 2023-05-12 14:48:29 -07:00
Paul Gauthier
ca6a214b1a Added a condition to check if silent is False before outputting ai response. 2023-05-12 14:44:18 -07:00
Paul Gauthier
6a94c3756a wip: Added ai_output method to InputOutput class and modified append_chat_history method to handle linebreaks and trailing spaces. 2023-05-12 14:42:34 -07:00
Paul Gauthier
4a8c4af902 cleanup 2023-05-12 14:34:18 -07:00
Paul Gauthier
5aebad9198 cleanup 2023-05-12 14:33:40 -07:00
Paul Gauthier
7830faa94a cleanu 2023-05-12 14:32:42 -07:00
Paul Gauthier
cd2fe5de05 Added example 2023-05-12 14:32:03 -07:00
Paul Gauthier
54c32283ee use trailing spaces for linebreaks 2023-05-12 14:31:37 -07:00
Paul Gauthier
73b3151f6a wip: Added chat history logging to InputOutput class. 2023-05-12 14:23:21 -07:00
Paul Gauthier
129f70dba8 Added chat history file to InputOutput constructor. 2023-05-12 14:02:10 -07:00
Paul Gauthier
e44677327f aider: Added a new argument --chat-history-file with a default value of .aider.chat.history.md.
# Context:
USER: add a new arg --chat-history-file arg which is similar to --input-history-file but has a default of .aider.chat.history.md
ASSISTANT: To add the new argument `--chat-history-file`, you can add a new `parser.add_argument()` call in the `aider/main.py` file. Here's the change:

```python
aider/main.py
<<<<<<< ORIGINAL
    parser.add_argument(
        "--input-history-file",
        metavar="INPUT_HISTORY_FILE",
        default=os.environ.get(f"{env_prefix}INPUT_HISTORY_FILE", ".aider.input.history"),
        help=(
            "Specify the chat input history file (default: .aider.input.history,"
            f" ${env_prefix}INPUT_HISTORY_FILE)"
        ),
    )
=======
    parser.add_argument(
        "--input-history-file",
        metavar="INPUT_HISTORY_FILE",
        default=os.environ.get(f"{env_prefix}INPUT_HISTORY_FILE", ".aider.input.history"),
        help=(
            "Specify the chat input history file (default: .aider.input.history,"
            f" ${env_prefix}INPUT_HISTORY_FILE)"
        ),
    )
    parser.add_argument(
        "--chat-history-file",
        metavar="CHAT_HISTORY_FILE",
        default=os.environ.get(f"{env_prefix}CHAT_HISTORY_FILE", ".aider.chat.history.md"),
        help=(
            "Specify the chat history file (default: .aider.chat.history.md,"
            f" ${env_prefix}CHAT_HISTORY_FILE)"
        ),
    )
>>>>>>> UPDATED
```

This will add the new `--chat-history-file` argument with a default value of `.aider.chat.history.md`.
2023-05-12 14:00:12 -07:00
Paul Gauthier
200ecf5a1f wip: Changed history_file to input_history_file in InputOutput constructor. 2023-05-12 13:57:45 -07:00
Paul Gauthier
841dfd0a4a aider: Changed --history-file to --input-history-file, updated env var and default file name.
# Context:
USER: change --history-file to be --input-history-file. change the env var too. change the default fname to .aider.input.history
ASSISTANT: ```python
aider/main.py
<<<<<<< ORIGINAL
    parser.add_argument(
        "--history-file",
        metavar="HISTORY_FILE",
        default=os.environ.get(f"{env_prefix}HISTORY_FILE", ".aider.history"),
        help=(
            "Specify the chat input history file (default: .aider.history,"
            f" ${env_prefix}HISTORY_FILE)"
        ),
    )
=======
    parser.add_argument(
        "--input-history-file",
        metavar="INPUT_HISTORY_FILE",
        default=os.environ.get(f"{env_prefix}INPUT_HISTORY_FILE", ".aider.input.history"),
        help=(
            "Specify the chat input history file (default: .aider.input.history,"
            f" ${env_prefix}INPUT_HISTORY_FILE)"
        ),
    )
>>>>>>> UPDATED
```

I've updated the argument name, environment variable, and default file name as requested.
2023-05-12 13:56:48 -07:00