mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
Merge branch 'main' into dotdotdot
This commit is contained in:
commit
ddc8fa6f0b
9 changed files with 35 additions and 41 deletions
|
@ -8,13 +8,13 @@ Each change is automatically committed to git with a sensible commit message.
|
|||
|
||||
Here are some example transcripts that show how you can chat with `aider` to generate and edit code with GPT-4.
|
||||
|
||||
* [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.
|
||||
* [Hello World Flask App](examples/hello-world-flask.md): Creating a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence.
|
||||
|
||||
* [2048 Game Modification](examples/2048-game.md): This example demonstrates how to explore and modify an open-source javascript 2048 game codebase, including adding randomness to the scoring system.
|
||||
* [Pong Game with Pygame](examples/pong.md): Creating a simple Pong game using the Pygame library, with customizations for paddle size and color, and ball speed adjustments.
|
||||
|
||||
* [Pong Game with Pygame](examples/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.
|
||||
* [2048 Game Modification](examples/2048-game.md): Exploring and modifying an open-source javascript repo for the 2048 game, including adding randomness to the scoring system.
|
||||
|
||||
* [Complex Multi-file Change with Debugging](examples/complex-change.md): This example demonstrates a complex code change involving multiple source files and debugging with the help of `aider`.
|
||||
* [Complex Multi-file Change with Debugging](examples/complex-change.md): A complex code change involving multiple source files and debugging.
|
||||
|
||||
You can find more chat transcripts on the [examples page](examples/README.md).
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Notice that GPT-4 asks to see a particular source file, and aider automatically
|
|||
|
||||
## Chat transcript
|
||||
|
||||
> 2048$ aider
|
||||
> $ aider
|
||||
#### > what is this repo?
|
||||
|
||||
Based on the file names you provided, it seems like this repository is for a web-based game, possibly a 2048 game clone. The files include JavaScript files for game logic, HTML and CSS files for the user interface, and various meta files for icons and touch startup images.
|
||||
|
|
|
@ -1,33 +1,27 @@
|
|||
# Example chats using `aider` to code with GPT-4
|
||||
# What's it like to code with GPT-4?
|
||||
|
||||
Below are some example chat transcripts that show how you can chat with
|
||||
the `aider` command line tool
|
||||
to generate and edit code with GPT-4.
|
||||
Below are some chat transcripts showing what it's like to code with the help of GPT-4. They were recorded using the [aider command line tool](https://github.com/paul-gauthier/aider).
|
||||
In the chats, you'll see a varity of coding tasks like generating new code, editing existing code, debugging, exploring unfamiliar code, etc. It's worth noting that:
|
||||
|
||||
There are a few things worth taking note of:
|
||||
- Each time GPT-4 suggests a code change, `aider` automatically applies it to the source files.
|
||||
- After applying the edits, `aider` commits them to git with a senisble commit message.
|
||||
- `aider` notes each time a source file is added to the chat session. Once added, these files are available for review and editing by GPT-4. The user adds files either via the command line or the in-chat `/add` command. If GPT-4 asks to see specific files, `aider` asks the user for permission to add them to the chat.
|
||||
|
||||
- `aider` will note when source files are added to the chat session. Once added, these files are available for review and editing by GPT-4. Files can be added from the command line, or in-chat with the `/add` command. Sometimes GPT-4 requests to see specific files, and `aider` adds them after the user approves.
|
||||
- Code edits that GPT-4 suggests are automatically applied to the source files by `aider`.
|
||||
- After applying the edits, `aider` will commit them to git with a senisble commit message.
|
||||
## Chat transcripts of coding sessions with GPT-4
|
||||
|
||||
## Example chat transcripts
|
||||
* [Hello World Flask App](hello-world-flask.md): Creating a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence.
|
||||
|
||||
There are a varity of example coding chat sessions included,
|
||||
accomplishing both greenfield generation of new code as well as simple and more complex edits to larger codebases:
|
||||
* [Pong Game with Pygame](pong.md): Creating a simple Pong game using the Pygame library, with customizations for paddle size and color, and ball speed adjustments.
|
||||
|
||||
* [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.
|
||||
* [2048 Game Modification](2048-game.md): Exploring and modifying an open-source javascript repo for the 2048 game, including adding randomness to the scoring system.
|
||||
|
||||
* [2048 Game Modification](2048-game.md): This example demonstrates how to explore and modify an open-source javascript 2048 game codebase, including adding randomness to the scoring system.
|
||||
* [Complex Multi-file Change with Debugging](complex-change.md): A complex code change involving multiple source files and debugging.
|
||||
|
||||
* [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.
|
||||
* [Semantic Search & Replace](semantic-search-replace.md): Updating a collection of function calls, which requires dealing with various formatting and semantic differences in the various function call sites.
|
||||
|
||||
* [Complex Multi-file Change with Debugging](complex-change.md): This example demonstrates a complex code change involving multiple source files and debugging with the help of `aider`.
|
||||
* [CSS Exercise: Animation Dropdown Menu](css-exercises.md): A small CSS exercise involving adding animation to a dropdown menu.
|
||||
|
||||
* [Semantic Search & Replace](semantic-search-replace.md): This example showcases `aider` performing semantic search and replace operations in code, dealing with various formatting and semantic differences in the function calls that it updates.
|
||||
|
||||
* [CSS Exercise: Animation Dropdown Menu](css-exercises.md): This example demonstrates how to complete a CSS exercise involving adding animation to a dropdown menu, creating a bounce illusion when the dropdown expands close to its final end state.
|
||||
|
||||
* [Automatically Update Docs](update-docs.md): This example demonstrates how to use `aider` to automatically update documentation based on the latest version of the main() function in the code.
|
||||
* [Automatically Update Docs](update-docs.md): Automatically updating documentation based on the latest version of the main() function.
|
||||
|
||||
## Transcript formatting
|
||||
|
||||
|
@ -36,13 +30,13 @@ accomplishing both greenfield generation of new code as well as simple and more
|
|||
#### > The user's chat messages are bold and shown on a prompt line like this. They contain they user's change requests, clarifications, etc.
|
||||
|
||||
Responses from GPT-4 are in a plain font like this, and often include colorized "edit blocks" that specify edits to the code.
|
||||
Here's a sample edit block that switches from printing a blank line to printing "hello world" in the file `hello.py`:
|
||||
Here's a sample edit block that switches from printing "hello" to "goodbye":
|
||||
|
||||
```python
|
||||
hello.py
|
||||
<<<<<<< ORIGINAL
|
||||
print()
|
||||
print("hello")
|
||||
=======
|
||||
print("Hello world!")
|
||||
print("goodbye")
|
||||
>>>>>>> UPDATED
|
||||
```
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
This is a chat transcript of a fairly complex code change. The user is trying to update tests to use an input mock provided by prompt_toolkit. This requires changes to multiple source files.
|
||||
|
||||
Some things to notice:
|
||||
- The initial changes from `aider` don't work, so the user provides error messages and doc snippets to collaboratively debug and solve the problem.
|
||||
- The initial changes don't work, so the user provides error messages and doc snippets to collaboratively debug and solve the problem.
|
||||
- The user edits a file outside the chat using their editor. `aider` notices these out-of-band changes and offers to commit them.
|
||||
- At one point the user hits `^C` to interrupt the GPT-4 response, since it's not a useful response. The user gives clarifications and gets a better result on the next reply.
|
||||
|
||||
## Chat transcript
|
||||
|
||||
> aider-repo$ aider tests/test_main.py aider/getinput.py
|
||||
> $ aider tests/test_main.py aider/getinput.py
|
||||
> Added tests/test_main.py to the chat
|
||||
> Added aider/getinput.py to the chat
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
# Complete a css exercise with aider and GPT-4
|
||||
|
||||
In this chat transcript, the user asks aider about the CSS Exercises repo https://github.com/TheOdinProject/css-exercises/tree/main and completes an animation exercise.
|
||||
In this chat transcript, the user asks about the CSS Exercises repo https://github.com/TheOdinProject/css-exercises/tree/main and completes an animation exercise.
|
||||
|
||||
## Chat transcript
|
||||
|
||||
> css-exercises$ aider
|
||||
> $ aider
|
||||
#### > what is this repo?
|
||||
|
||||
Based on the file list provided, it seems like this repository contains a collection of CSS and HTML exercises, solutions, and examples. The exercises cover various topics such as Flexbox, Grid, Animation, Foundations, and Margin & Padding. The repository also includes images and other assets used in the exercises.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
# Create a simple flask app with aider and gpt-4
|
||||
|
||||
In this chat transcript, the user asks aider to make a simple flask app with various endpoints.
|
||||
In this chat transcript, the user asks to make a simple flask app with various endpoints.
|
||||
|
||||
## Chat transcript
|
||||
|
||||
> hello-world-flask$ aider app.py
|
||||
> $ aider app.py
|
||||
> Creating empty file app.py
|
||||
> Added app.py to the chat
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
# Build pong with aider, gpt-4 and pygame.
|
||||
|
||||
In this chat transcript, the user asks aider to make a pong game using pygame.
|
||||
In this chat transcript, the user asks to make a pong game using pygame.
|
||||
After setting up a basic game, the user asks for some customization of the colors and game mechanics.
|
||||
|
||||
## Chat transcript
|
||||
|
||||
> pong$ aider
|
||||
> $ aider
|
||||
|
||||
#### > can you make a simple game of pong with pygame?
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# Semantic search & replace code with aider and gpt-4
|
||||
|
||||
In this chat transcript, the user asks aider to modify a series of function calls.
|
||||
In this chat transcript, the user asks to modify a series of function calls.
|
||||
|
||||
Notice that it isn't replacing exact strings.
|
||||
Aider deals with various formatting and semantic differences in the calls that it is updating.
|
||||
Making the change requires dealing with various formatting and semantic differences in the calls that it is updating.
|
||||
|
||||
Some edits were elided from this transcript for brevity.
|
||||
|
||||
## Chat transcript
|
||||
|
||||
> aider-repo$ aider aider/coder.py
|
||||
> $ aider aider/coder.py
|
||||
> Added aider/coder.py to the chat
|
||||
|
||||
#### > replace all the self.console.print() calls that contain [red] with calls to self.io.tool_error() with [red] removed from the string
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# Automatically update docs with aider and gpt-4
|
||||
|
||||
> In this chat transcript, the user asks aider to automatically update the Usage docs based on the latest version of the main() function in the code.
|
||||
> In this chat transcript, the user asks to automatically update the Usage docs based on the latest version of the main() function in the code.
|
||||
|
||||
## Chat transcript
|
||||
|
||||
> aider-repo$ aider ./README.md aider/main.py
|
||||
> $ aider ./README.md aider/main.py
|
||||
> Added README.md to the chat
|
||||
> Added aider/main.py to the chat
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue