Commit graph

907 commits

Author SHA1 Message Date
Paul Gauthier
9a413d351d black formatting 2023-05-17 18:24:35 -07:00
Paul Gauthier
3c26f90269 aider: Added --show-source argument to flake8 hook in .pre-commit-config.yaml.
# Context:
USER: can we make flake8 output the actual lines that have each error?
ASSISTANT: Yes, we can modify the `.pre-commit-config.yaml` file to include the `--show-source` argument for flake8. This will show the source code lines that have errors.

Here's the change:

```yaml
.pre-commit-config.yaml
<<<<<<< ORIGINAL
  - repo: https://github.com/pycqa/flake8
    rev: 6.0.0
    hooks:
      - id: flake8
=======
  - repo: https://github.com/pycqa/flake8
    rev: 6.0.0
    hooks:
      - id: flake8
        args: ["--show-source"]
>>>>>>> UPDATED
```
2023-05-17 17:55:40 -07:00
Paul Gauthier
bdae74a9a8 Ask the user to retry their cmd if we interrupt with an autocommit 2023-05-17 16:19:15 -07:00
Paul Gauthier
cc0ee034f4 aider: Added a check to ensure that part appears in whole exactly once in try_dotdotdots.
# Context:
USER: in try_dotdotdots, after checking that part is in whole add a check that part is in whole exactly 1 time
ASSISTANT: ```python
aider/utils.py
<<<<<<< ORIGINAL
        if part not in whole:
            raise ValueError("No perfect matching chunk in edit block with ...")

        whole = whole.replace(part, replace)
=======
        if whole.count(part) != 1:
            raise ValueError("No perfect matching chunk in edit block with ... or part appears more than once")

        whole = whole.replace(part, replace, 1)
>>>>>>> UPDATED
```
2023-05-17 16:15:09 -07:00
Paul Gauthier
de69a3095a aider: Removed all the save_stdin stuff.
# Context:
USER: remove all the save_stdin stuff
ASSISTANT: ```python
tests/test_main.py
<<<<<<< ORIGINAL
            save_stdin = sys.stdin
            sys.stdin = pipe_input
            main([], input=pipe_input, output=DummyOutput())
            sys.stdin = save_stdin
=======
            main([], input=pipe_input, output=DummyOutput())
>>>>>>> UPDATED
```

```python
tests/test_main.py
<<<<<<< ORIGINAL
            save_stdin = sys.stdin
            sys.stdin = pipe_input
            main(["foo.txt"], input=pipe_input, output=DummyOutput())
            sys.stdin = save_stdin
=======
            main(["foo.txt"], input=pipe_input, output=DummyOutput())
>>>>>>> UPDATED
```

```python
tests/test_main.py
<<<<<<< ORIGINAL
            save_stdin = sys.stdin
            sys.stdin = pipe_input
            main(["--yes", "foo.txt"], input=pipe_input, output=DummyOutput())
            sys.stdin = save_stdin
=======
            main(["--yes", "foo.txt"], input=pipe_input, output=DummyOutput())
>>>>>>> UPDATED
```
2023-05-17 16:13:01 -07:00
Paul Gauthier
2e53e59cf3 aider: Changed print statement to show actual repo directory instead of working tree.
# Context:
USER: after Using git repo print the actual repo dir, not the working tree
ASSISTANT: To print the actual repo directory instead of the working tree, you can use the `git rev-parse --git-dir` command. I need to see the relevant code file where you want to implement this change.
^C KeyboardInterrupt
USER: Please note that I shared content of these additional files: aider/coder.py
ASSISTANT: I apologize for the oversight. Here's the change to print the actual repo directory instead of the working tree in the `aider/coder.py` file:

```python
aider/coder.py
<<<<<<< ORIGINAL
        if self.repo:
            self.io.tool("Using git repo:", self.root)
=======
        if self.repo:
            self.io.tool("Using git repo:", self.repo.git_dir)
>>>>>>> UPDATED
```

This change will print the actual repo directory when a suitable git repo is found.
2023-05-17 16:11:40 -07:00
Paul Gauthier
d0c729469d Added logging for when a suitable git repo is found. 2023-05-17 16:10:38 -07:00
Paul Gauthier
a120063d45 updated demo gif 2023-05-17 15:42:30 -07:00
Paul Gauthier
4ce6e279d3 Removed the canned_input method and commented out related code. 2023-05-17 15:24:40 -07:00
Paul Gauthier
7dc406d0b4 Print aider in lowercase 2023-05-17 15:22:34 -07:00
Paul Gauthier
a9511b85b6 Added log_only parameter to io.tool function call. 2023-05-17 15:21:21 -07:00
Paul Gauthier
bca4674e07 aider: Added a log_only parameter to tool() to allow emitting only to the log.
# Context:
USER: add a log_only=False param to tool() which only emits to the log, not to the scren
ASSISTANT: ```python
aider/io.py
<<<<<<< ORIGINAL
    def tool(self, *messages):
        if messages:
            hist = " ".join(messages)
            hist = f"{hist.strip()}"
            self.append_chat_history(hist, linebreak=True, blockquote=True)

        messages = list(map(Text, messages))
        self.console.print(*messages)
=======
    def tool(self, *messages, log_only=False):
        if messages:
            hist = " ".join(messages)
            hist = f"{hist.strip()}"
            self.append_chat_history(hist, linebreak=True, blockquote=True)

        if not log_only:
            messages = list(map(Text, messages))
            self.console.print(*messages)
>>>>>>> UPDATED
```
2023-05-17 15:20:52 -07:00
Paul Gauthier
fc1dac4ac3 log the cmd line to the chat history 2023-05-17 13:47:34 -07:00
Paul Gauthier
6ea9085eec updated md chat log format 2023-05-17 13:45:27 -07:00
Paul Gauthier
11c0dd89d9 Renamed getinput -> io 2023-05-17 13:41:58 -07:00
Paul Gauthier
7b04f5ab8d link to the open source repos in transcripts 2023-05-17 09:55:54 -07:00
Paul Gauthier
6bc6aa240b copy 2023-05-16 10:15:40 -07:00
Paul Gauthier
5429ed9e62 copy 2023-05-16 06:51:40 -07:00
Paul Gauthier
7074db7ea4 better title/desc for homepage 2023-05-16 06:48:20 -07:00
Paul Gauthier
1575e885b7 title 2023-05-16 06:41:03 -07:00
Paul Gauthier
c499b5d8ed page.url 2023-05-16 06:39:49 -07:00
Paul Gauthier
3b69df6a82 undo 2023-05-16 06:33:56 -07:00
Paul Gauthier
72b7721fbd aider: Added a trailing slash to site.baseurl in if statement.
# Context:
USER: in the if page.url == site.baseurl, add a trailing slash to site.baseurl
ASSISTANT: ```html
_layouts/default.html
<<<<<<< ORIGINAL
      {% if page.url == site.baseurl %}
=======
      {% if page.url == site.baseurl | append: '/' %}
>>>>>>> UPDATED
```
2023-05-16 06:31:50 -07:00
Paul Gauthier
a716d3fb6f Updated README.md with a new project description. 2023-05-16 06:29:46 -07:00
Paul Gauthier
263988a27c aider: Added if statement to always display "aider" and "aider is GPT-4 powered coding in your terminal" on home page.
# Context:
USER: add an if statement, so the home page always has <h1>aider</h1> and <h2>aider is GPT-4 powered coding in your terminal</h2>
ASSISTANT: ```html
_layouts/default.html
<<<<<<< ORIGINAL
      <h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
      <h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
=======
      {% if page.url == site.baseurl %}
      <h1 class="project-name">aider</h1>
      <h2 class="project-tagline">aider is GPT-4 powered coding in your terminal</h2>
      {% else %}
      <h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
      <h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
      {% endif %}
>>>>>>> UPDATED
```
2023-05-16 06:29:28 -07:00
Paul Gauthier
2a1b2f8163 wip: Changed README.md header to be more concise. 2023-05-16 06:27:43 -07:00
Paul Gauthier
7c746d27b8 copy 2023-05-16 06:26:07 -07:00
Paul Gauthier
ba3172ba6c revert to old title/desc 2023-05-16 05:49:20 -07:00
Paul Gauthier
defa8717e4 wip: Updated project description and fixed config file paths and descriptions. 2023-05-16 05:44:52 -07:00
Paul Gauthier
9471024dd0 Updated descriptions for home and examples sections in _config.yml. 2023-05-16 05:40:39 -07:00
Paul Gauthier
cd93146ed3 aider: Added a scope to set a custom description for the home page in _config.yml.
# Context:
USER: how do i add a scope that sets the description just for the home page?
ASSISTANT: To add a scope that sets the description just for the home page, you'll need to modify the `_config.yml` file. You can define a new scope with a specific path pointing to the home page (usually `index.md` or `index.html`).

Here's how to add a scope with a custom description for the home page:

```yaml
_config.yml
<<<<<<< ORIGINAL
theme: jekyll-theme-cayman

defaults:
  - scope:
      path: "examples"
      type: "pages"
    values:
      description: "This is a custom description for the examples section."
=======
theme: jekyll-theme-cayman

defaults:
  - scope:
      path: "examples"
      type: "pages"
    values:
      description: "This is a custom description for the examples section."
  - scope:
      path: "index.md" # or "index.html" if your home page is an HTML file
      type: "pages"
    values:
      description: "This is a custom description for the home page."
>>>>>>> UPDATED
```

This will apply the custom description to the home page. Make sure to replace `"index.md"` with `"index.html"` if your home page is an HTML file.
2023-05-16 05:39:59 -07:00
Paul Gauthier
d0a51a85d0 aider: Added a scope with a custom description for the examples section in _config.yml.
# Context:
USER: can i use scope to apply a different description to different parts of the site?
ASSISTANT: Yes, you can use the `scope` feature in Jekyll to apply different descriptions to different parts of the site. You'll need to modify the `_config.yml` file to define the scopes and their respective descriptions.

Here's a step-by-step guide to achieve this:

1. In the `_config.yml` file, add a new `defaults` section.
2. Define the scope by specifying the `path` and `type` attributes.
3. Set the `values` attribute to include the `description` key with the desired description text.

Here's an example of how to add a scope with a custom description for the `examples` directory:

```yaml
_config.yml
<<<<<<< ORIGINAL
theme: jekyll-theme-cayman
=======
theme: jekyll-theme-cayman

defaults:
  - scope:
      path: "examples"
      type: "pages"
    values:
      description: "This is a custom description for the examples section."
>>>>>>> UPDATED
```

This will apply the custom description to all pages within the `examples` directory. You can add more scopes for other directories or specific pages by following the same pattern.
2023-05-16 05:38:40 -07:00
Paul Gauthier
74d090876a cleanup 2023-05-16 05:36:56 -07:00
Paul Gauthier
344018598a wip: Changed title in _config.yml to use variables. 2023-05-16 05:29:07 -07:00
Paul Gauthier
edd06e07c2 ## aider on main readme 2023-05-16 05:22:22 -07:00
Paul Gauthier
892119c7df added title: to _config 2023-05-16 05:20:46 -07:00
Paul Gauthier
07d22a9d66 removed head-custom.css 2023-05-16 05:17:29 -07:00
Paul Gauthier
0ae2815430 moved css to scss 2023-05-16 05:16:14 -07:00
Paul Gauthier
eb5d69c580 Added new files to the git repo: assets/css/style.scss 2023-05-16 05:14:29 -07:00
Paul Gauthier
602aee9f57 moved head-custom.css 2023-05-16 05:11:42 -07:00
Paul Gauthier
566d35aa82 Merge remote-tracking branch 'origin/main' 2023-05-16 05:09:44 -07:00
Paul Gauthier
b6622126e0 moved custom css into .css file 2023-05-16 05:09:29 -07:00
Paul Gauthier
94e1076c61 moved custom css into .css file 2023-05-16 05:09:18 -07:00
paul-gauthier
e2b97d00ae
Update complex-change.md 2023-05-15 21:49:08 -07:00
paul-gauthier
509734a49a
Update complex-change.md 2023-05-15 21:48:01 -07:00
Paul Gauthier
9af6bbc5f6 box label spacing 2023-05-15 21:27:09 -07:00
Paul Gauthier
3e24873d33 copy 2023-05-15 21:18:20 -07:00
Paul Gauthier
11673e47e2 button margins 2023-05-15 21:06:39 -07:00
Paul Gauthier
93433398ac remove all hr / --- from chat transcripts 2023-05-15 21:04:46 -07:00
Paul Gauthier
b95015c25b removed > from user prompts 2023-05-15 21:01:04 -07:00