Commit graph

4613 commits

Author SHA1 Message Date
Paul Gauthier
a30e656304 improved token limit err msgs and docs #678 2024-06-14 07:28:33 -07:00
Paul Gauthier
0fc6b9beaa copy 2024-06-14 06:16:56 -07:00
Paul Gauthier
5fd8bb69ca Note use of AZURE_OPENAI_API_xxx #672 2024-06-14 06:16:53 -07:00
Paul Gauthier
a07492b90a moved --vim to Other Settings 2024-06-12 11:30:26 -07:00
Paul Gauthier
73f9b67761 copy 2024-06-11 19:24:14 -07:00
Paul Gauthier
f12589fd74 copy 2024-06-11 18:56:28 -07:00
Paul Gauthier
3532bd7758 use cog to include get-started in readme 2024-06-11 18:51:36 -07:00
paul-gauthier
d65e16c4df
Update README.md 2024-06-11 15:46:13 -07:00
paul-gauthier
53c87b9551
Merge pull request #668 from nicolasperez19/remove-readme-typo 2024-06-11 15:40:07 -07:00
Nicolas Perez
2f38af54dc doc: Removed template typo in README 2024-06-11 18:34:47 -04:00
Paul Gauthier
6216a273fe drop context at the caller 2024-06-11 13:33:46 -07:00
Paul Gauthier
8e036fa891 copy 2024-06-11 13:32:08 -07:00
Paul Gauthier
fb3cc98da5 cleanup --model-metadata-file 2024-06-11 13:30:35 -07:00
paul-gauthier
2f6e360188
Merge pull request #666 from caseymcc/register_model
Allow models to be registered with litellm
2024-06-11 13:20:02 -07:00
Paul Gauthier
ba1ae76fc0 Merge remote-tracking branch 'origin/main' 2024-06-11 13:19:11 -07:00
Paul Gauthier
20f730a673 stop including chat conversation in commits 2024-06-11 13:19:02 -07:00
Krazer
a44119bbbe fix wording 2024-06-11 14:14:01 -05:00
Krazer
0984e5464f link to litellm models def 2024-06-11 14:12:52 -05:00
Krazer
568d72ebe8 update docs 2024-06-11 14:09:45 -05:00
Krazer
58965a9cff minor output change 2024-06-11 13:48:50 -05:00
paul-gauthier
d773a82e9a
Merge pull request #623 from fovi-llc/pup 2024-06-11 11:44:36 -07:00
paul-gauthier
9382fa1091
Merge pull request #629 from youknow04/main 2024-06-11 11:44:04 -07:00
Krazer
a1b5f98d02 remove print 2024-06-11 13:41:29 -05:00
Krazer
a090de6a00 add change requests 2024-06-11 13:39:55 -05:00
Krazer
f3b5eae778 remove duplicates 2024-06-11 13:30:18 -05:00
Krazer
d819d52f82 add current directory 2024-06-11 13:18:43 -05:00
Krazer
acccbb1512 update command line arg 2024-06-11 13:14:22 -05:00
Krazer
d91707f73e all models to be registered with litellm 2024-06-11 13:07:19 -05:00
paul-gauthier
255fe127e3
Merge pull request #665 from youknow04/quantized-bench 2024-06-11 08:46:07 -07:00
youknow
c5dee67db2 add quantized models in leaderboard(codeqwen, codestral, qwen2) 2024-06-12 00:11:05 +09:00
Paul Gauthier
dece830cb8 wait up to 5sec 2024-06-11 06:37:41 -07:00
Paul Gauthier
4ebc35e038 aider: Set a maximum timeout of 5 seconds for page.goto in the scrape_with_playwright method.
# Aider chat conversation:

USER: set a max timeout of 5sec for page.goto

ASSISTANT: To set a maximum timeout of 5 seconds for `page.goto`, we need to modify the `scrape_with_playwright` method in `aider/scrape.py`.

Here is the *SEARCH/REPLACE* block:

aider/scrape.py
```python
<<<<<<< SEARCH
            page.goto(url, wait_until="networkidle")
=======
            page.goto(url, wait_until="networkidle", timeout=5000)
>>>>>>> REPLACE
```
2024-06-11 06:36:35 -07:00
Paul Gauthier
337891e739 aider: Modified scrape_with_playwright method to wait for network to be idle before extracting content.
# Aider chat conversation:

USER: with playwright enabled, i get: You need to enable JavaScript to run this app.

ASSISTANT: To address the issue of JavaScript not being enabled, we need to ensure that Playwright is properly executing JavaScript on the page. This can be done by waiting for the page to load completely and ensuring that JavaScript is executed.

We will modify the `scrape_with_playwright` method to wait for the network to be idle and ensure that the page is fully loaded before extracting the content.

Here are the changes:

aider/scrape.py
```python
<<<<<<< SEARCH
            page.goto(url)
=======
            page.goto(url, wait_until="networkidle")
>>>>>>> REPLACE
```

This change will ensure that Playwright waits for the network to be idle, which typically means that all JavaScript has been executed and the page is fully loaded.
2024-06-11 06:35:00 -07:00
Paul Gauthier
a17b81236c Add content dumping functionality to the Scraper class. 2024-06-11 06:34:58 -07:00
Paul Gauthier
24cb743aaf copy 2024-06-10 21:28:09 -07:00
Paul Gauthier
8bfaff2c6f copy 2024-06-10 21:16:57 -07:00
Paul Gauthier
05a74d67de finished --vim 2024-06-10 21:16:33 -07:00
Paul Gauthier
566b653af1 aider: Added useful Vim keybindings for a prompt toolkit prompt.
# Aider chat conversation:

USER: Add useful vim keybindings for a prompt toolkit prompt

ASSISTANT: Here is the updated content with useful Vim keybindings added for the prompt toolkit prompt:

website/docs/commands.md
```markdown
<<<<<<< SEARCH
## Vi
=======
## Vi

- `Esc` : Switch to command mode.
- `i` : Switch to insert mode.
- `a` : Move cursor one character to the right and switch to insert mode.
- `A` : Move cursor to the end of the line and switch to insert mode.
- `I` : Move cursor to the beginning of the line and switch to insert mode.
- `h` : Move cursor one character to the left.
- `j` : Move cursor down one line.
- `k` : Move cursor up one line.
- `l` : Move cursor one character to the right.
- `w` : Move cursor forward one word.
- `b` : Move cursor backward one word.
- `0` : Move cursor to the beginning of the line.
- `$` : Move cursor to the end of the line.
- `x` : Delete the character under the cursor.
- `dd` : Delete the current line.
- `u` : Undo the last change.
- `Ctrl-R` : Redo the last undone change.
- `:` : Enter command mode for ex commands (e.g., `:w` to save).
>>>>>>> REPLACE
```
2024-06-10 21:16:05 -07:00
Paul Gauthier
66f5042ff5 Updated keybindings for Emacs and Vi in the interactive prompt. 2024-06-10 21:16:04 -07:00
Paul Gauthier
eddf31b38f Fix duplicate import and remove redundant code for setting editing mode in main function. 2024-06-10 21:11:29 -07:00
Paul Gauthier
b30077daee Add support for different editing modes in the main function. 2024-06-10 21:10:10 -07:00
Paul Gauthier
e63cc92cb9 Set editing mode based on user input before initializing InputOutput. 2024-06-10 21:10:04 -07:00
Paul Gauthier
196c1314eb Add support for VI editing mode in the terminal. 2024-06-10 21:09:46 -07:00
Paul Gauthier
eae9a1e065 aider: Add editingmode argument to InputOutput class for EditingMode.VI and EditingMode.EMACS.
# Aider chat conversation:

USER: `InputOutput` should accept an arg editingmode of either EditingMode.VI EditingMode.EMACS

ASSISTANT: To add the `editingmode` argument to the `InputOutput` class, we need to:

1. Import `EditingMode` from `prompt_toolkit`.
2. Add the `editingmode` parameter to the `__init__` method.
3. Use the `editingmode` parameter when creating the `PromptSession`.

Here are the *SEARCH/REPLACE* blocks:

aider/io.py
```python
<<<<<<< SEARCH
from prompt_toolkit.shortcuts import CompleteStyle, PromptSession, prompt
=======
from prompt_toolkit.shortcuts import CompleteStyle, PromptSession, prompt, EditingMode
>>>>>>> REPLACE
```

aider/io.py
```python
<<<<<<< SEARCH
    ):
=======
        editingmode=EditingMode.EMACS,
    ):
        self.editingmode = editingmode
>>>>>>> REPLACE
```

aider/io.py
```python
<<<<<<< SEARCH
            session = PromptSession(key_bindings=kb, **session_kwargs)
=======
            session = PromptSession(key_bindings=kb, editing_mode=self.editingmode, **session_kwargs)
>>>>>>> REPLACE
```
2024-06-10 21:08:40 -07:00
Paul Gauthier
8ebf7cd131 Updated quick start 2024-06-10 17:29:41 -07:00
Paul Gauthier
358a1e3a2f Added posters for install & codespaces help 2024-06-10 16:47:24 -07:00
Paul Gauthier
7695d08f92 Updated multi-line msg docs 2024-06-10 16:43:07 -07:00
Paul Gauthier
d30b21139b aider: Skip commit action when running --commit --dry-run.
# Aider chat conversation:

USER: https://github.com/paul-gauthier/aider/issues/663

https://github.com/paul-gauthier/aider/issues/663:

[Skip to content](#start-of-content)

## Navigation Menu

Toggle navigation

[](https://github.com/)

[Sign
in](/login?return_to=https%3A%2F%2Fgithub.com%2Fpaul-gauthier%2Faider%2Fissues%2F663)

-   Product

    -   [](https://github.com/features/actions)

        Actions

        Automate any workflow

    -   [](https://github.com/features/packages)

        Packages

        Host and manage packages

    -   [](https://github.com/features/security)

        Security

        Find and fix vulnerabilities

    -   [](https://github.com/features/codespaces)

        Codespaces

        Instant dev environments

    -   [](https://github.com/features/copilot)

        GitHub Copilot

        Write better code with AI

    -   [](https://github.com/features/code-review)

        Code review

        Manage code changes

    -   [](https://github.com/features/issues)

        Issues

        Plan and track work

    -   [](https://github.com/features/discussions)

        Discussions

        Collaborate outside of code

    Explore
    -   [All features](https://github.com/features)
    -   [Documentation](https://docs.github.com)
    -   [GitHub Skills](https://skills.github.com)
    -   [Blog](https://github.blog)

-   Solutions

    For
    -   [Enterprise](https://github.com/enterprise)
    -   [Teams](https://github.com/team)
    -   [Startups](https://github.com/enterprise/startups)
    -   [Education](https://education.github.com)

    By Solution
    -   [CI/CD & Automation](https://github.com/solutions/ci-cd)
    -   [DevOps](https://github.com/solutions/devops)
    -   [DevSecOps](https://resources.github.com/devops/fundamentals/devsecops)

    Resources
    -   [Learning Pathways](https://resources.github.com/learn/pathways)
    -   [White papers, Ebooks, Webinars](https://resources.github.com)
    -   [Customer Stories](https://github.com/customer-stories)
    -   [Partners](https://partner.github.com)

-   Open Source

    -   [](/sponsors)

        GitHub Sponsors

        Fund open source developers

    -   [](https://github.com/readme)

        The ReadME Project

        GitHub community articles

    Repositories
    -   [Topics](https://github.com/topics)
    -   [Trending](https://github.com/trending)
    -   [Collections](https://github.com/collections)

-   Enterprise

    -   [](/enterprise)

        Enterprise platform

        AI-powered developer platform

    Available add-ons
    -   [](https://github.com/enterprise/advanced-security)

        Advanced Security

        Enterprise-grade security features

    -   [](/features/copilot#enterprise)

        GitHub Copilot

        Enterprise-grade AI features

    -   [](/premium-support)

        Premium Support

        Enterprise-grade 24/7 support

-   [Pricing](https://github.com/pricing)

Search or jump to\...

# Search code, repositories, users, issues, pull requests\...

Search

Clear

[Search syntax
tips](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax)

# Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

# Saved searches

## Use saved searches to filter your results more quickly

Name

Query

To see all available qualifiers, see our
[documentation](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax).

Cancel

Create saved search

[Sign
in](/login?return_to=https%3A%2F%2Fgithub.com%2Fpaul-gauthier%2Faider%2Fissues%2F663)

[Sign
up](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=paul-gauthier%2Faider)

You signed in with another tab or window. [Reload]() to refresh your
session. You signed out in another tab or window. [Reload]() to refresh
your session. You switched accounts on another tab or window. [Reload]()
to refresh your session.

Dismiss alert

{{ message }}

::: {role="main"}

[paul-gauthier](/paul-gauthier) / **[aider](/paul-gauthier/aider)**
Public

-   [Notifications](/login?return_to=%2Fpaul-gauthier%2Faider) You must
    be signed in to change notification settings

-   [Fork 1.1k](/login?return_to=%2Fpaul-gauthier%2Faider)

-

    [ Star 11.3k](/login?return_to=%2Fpaul-gauthier%2Faider)

-   [Code ](/paul-gauthier/aider)
-   [Issues 59](/paul-gauthier/aider/issues)
-   [Pull requests 14](/paul-gauthier/aider/pulls)
-   [Actions ](/paul-gauthier/aider/actions)
-   [Projects 0](/paul-gauthier/aider/projects)
-   [Security](/paul-gauthier/aider/security)
-   [Insights ](/paul-gauthier/aider/pulse)

Additional navigation options

-   [ Code ](/paul-gauthier/aider)
-   [ Issues ](/paul-gauthier/aider/issues)
-   [ Pull requests ](/paul-gauthier/aider/pulls)
-   [ Actions ](/paul-gauthier/aider/actions)
-   [ Projects ](/paul-gauthier/aider/projects)
-   [ Security ](/paul-gauthier/aider/security)
-   [ Insights ](/paul-gauthier/aider/pulse)

New issue

**Have a question about this project?** Sign up for a free GitHub
account to open an issue and contact its maintainers and the community.

[Sign up for
GitHub](/signup?return_to=%2Fpaul-gauthier%2Faider%2Fissues%2Fnew%2Fchoose)

By clicking "Sign up for GitHub", you agree to our [terms of
service](https://docs.github.com/terms) and [privacy
statement](https://docs.github.com/privacy). We'll occasionally send you
account related emails.

Already on GitHub? [Sign
in](/login?return_to=%2Fpaul-gauthier%2Faider%2Fissues%2Fnew%2Fchoose)
to your account

[Jump to bottom](#issue-comment-box)

# Running \--commit \--dry-run should not actually make the commit #663

Open

[paul-gauthier](/paul-gauthier) opened this issue Jun 10, 2024 · 0
comments

Open

# [Running \--commit \--dry-run should not actually make the commit](#top) #663

[paul-gauthier](/paul-gauthier) opened this issue Jun 10, 2024 · 0
comments

Labels

[bug](/paul-gauthier/aider/labels/bug) Something isn\'t working

## Comments

[](/paul-gauthier)

Copy link

Owner

###

**[paul-gauthier](/paul-gauthier)** commented [Jun 10,
2024](#issue-2344397167)

+-----------------------------------------------------------------------+
| ### Issue                                                             |
|                                                                       |
| Per discord:                                                          |
|                                                                       |
| <https://discord.com/                                                 |
| channels/1131200896827654144/1133060505792159755/1249568492634509344> |
|                                                                       |
| ### Version and model info                                            |
|                                                                       |
| *No response*                                                         |
+-----------------------------------------------------------------------+
|                                                                       |
|                                                                       |
| The text was updated successfully, but these errors were encountered: |
|                                                                       |
|                                                                       |
+-----------------------------------------------------------------------+

All reactions

[paul-gauthier](/paul-gauthier) added the
[bug](/paul-gauthier/aider/labels/bug) Something isn\'t working label
[Jun 10, 2024](#event-13104705978)

[Sign up for free](/join?source=comment-repo) **to join this
conversation on GitHub**. Already have an account? [Sign in to
comment](/login?return_to=https%3A%2F%2Fgithub.com%2Fpaul-gauthier%2Faider%2Fissues%2F663)

Assignees

No one assigned

Labels

[bug](/paul-gauthier/aider/labels/bug) Something isn\'t working

Projects

None yet

Milestone

No milestone

Development

No branches or pull requests

1 participant

:::

## Footer

[](https://github.com) © 2024 GitHub, Inc.

### Footer navigation

-   [Terms](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
-   [Privacy](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
-   [Security](https://github.com/security)
-   [Status](https://www.githubstatus.com/)
-   [Docs](https://docs.github.com/)
-   [Contact](https://support.github.com?tags=dotcom-footer)
-   Manage cookies
-   Do not share my personal information

You can't perform that action at this time.

ASSISTANT: To address the issue where running `--commit --dry-run` should not actually make the commit, we need to modify the `main.py` file to ensure that the commit action is skipped when `--dry-run` is specified.

Here are the steps to implement this:

1. Check if `args.dry_run` is set before performing the commit action.
2. If `args.dry_run` is set, skip the commit action and print a message indicating that the commit is being skipped due to the dry run.

Let's implement these changes:

aider/main.py
```python
<<<<<<< SEARCH
    if args.commit:
        coder.commands.cmd_commit()
        return
=======
    if args.commit:
        if args.dry_run:
            io.tool_output("Dry run enabled, skipping commit.")
        else:
            coder.commands.cmd_commit()
        return
>>>>>>> REPLACE
```

This change ensures that when `--dry-run` is specified along with `--commit`, the commit action is skipped, and a message is printed to indicate this.
2024-06-10 15:54:56 -07:00
Paul Gauthier
bde80e4577 aider: Handle the case where the ~/.gitconfig file is missing or does not contain the user.name entry.
# Aider chat conversation:

USER: https://github.com/paul-gauthier/aider/issues/662

https://github.com/paul-gauthier/aider/issues/662:

[Skip to content](#start-of-content)

## Navigation Menu

Toggle navigation

[](https://github.com/)

[Sign
in](/login?return_to=https%3A%2F%2Fgithub.com%2Fpaul-gauthier%2Faider%2Fissues%2F662)

-   Product

    -   [](https://github.com/features/actions)

        Actions

        Automate any workflow

    -   [](https://github.com/features/packages)

        Packages

        Host and manage packages

    -   [](https://github.com/features/security)

        Security

        Find and fix vulnerabilities

    -   [](https://github.com/features/codespaces)

        Codespaces

        Instant dev environments

    -   [](https://github.com/features/copilot)

        GitHub Copilot

        Write better code with AI

    -   [](https://github.com/features/code-review)

        Code review

        Manage code changes

    -   [](https://github.com/features/issues)

        Issues

        Plan and track work

    -   [](https://github.com/features/discussions)

        Discussions

        Collaborate outside of code

    Explore
    -   [All features](https://github.com/features)
    -   [Documentation](https://docs.github.com)
    -   [GitHub Skills](https://skills.github.com)
    -   [Blog](https://github.blog)

-   Solutions

    For
    -   [Enterprise](https://github.com/enterprise)
    -   [Teams](https://github.com/team)
    -   [Startups](https://github.com/enterprise/startups)
    -   [Education](https://education.github.com)

    By Solution
    -   [CI/CD & Automation](https://github.com/solutions/ci-cd)
    -   [DevOps](https://github.com/solutions/devops)
    -   [DevSecOps](https://resources.github.com/devops/fundamentals/devsecops)

    Resources
    -   [Learning Pathways](https://resources.github.com/learn/pathways)
    -   [White papers, Ebooks, Webinars](https://resources.github.com)
    -   [Customer Stories](https://github.com/customer-stories)
    -   [Partners](https://partner.github.com)

-   Open Source

    -   [](/sponsors)

        GitHub Sponsors

        Fund open source developers

    -   [](https://github.com/readme)

        The ReadME Project

        GitHub community articles

    Repositories
    -   [Topics](https://github.com/topics)
    -   [Trending](https://github.com/trending)
    -   [Collections](https://github.com/collections)

-   Enterprise

    -   [](/enterprise)

        Enterprise platform

        AI-powered developer platform

    Available add-ons
    -   [](https://github.com/enterprise/advanced-security)

        Advanced Security

        Enterprise-grade security features

    -   [](/features/copilot#enterprise)

        GitHub Copilot

        Enterprise-grade AI features

    -   [](/premium-support)

        Premium Support

        Enterprise-grade 24/7 support

-   [Pricing](https://github.com/pricing)

Search or jump to\...

# Search code, repositories, users, issues, pull requests\...

Search

Clear

[Search syntax
tips](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax)

# Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

# Saved searches

## Use saved searches to filter your results more quickly

Name

Query

To see all available qualifiers, see our
[documentation](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax).

Cancel

Create saved search

[Sign
in](/login?return_to=https%3A%2F%2Fgithub.com%2Fpaul-gauthier%2Faider%2Fissues%2F662)

[Sign
up](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=paul-gauthier%2Faider)

You signed in with another tab or window. [Reload]() to refresh your
session. You signed out in another tab or window. [Reload]() to refresh
your session. You switched accounts on another tab or window. [Reload]()
to refresh your session.

Dismiss alert

{{ message }}

::: {role="main"}

[paul-gauthier](/paul-gauthier) / **[aider](/paul-gauthier/aider)**
Public

-   [Notifications](/login?return_to=%2Fpaul-gauthier%2Faider) You must
    be signed in to change notification settings

-   [Fork 1.1k](/login?return_to=%2Fpaul-gauthier%2Faider)

-

    [ Star 11.3k](/login?return_to=%2Fpaul-gauthier%2Faider)

-   [Code ](/paul-gauthier/aider)
-   [Issues 59](/paul-gauthier/aider/issues)
-   [Pull requests 14](/paul-gauthier/aider/pulls)
-   [Actions ](/paul-gauthier/aider/actions)
-   [Projects 0](/paul-gauthier/aider/projects)
-   [Security](/paul-gauthier/aider/security)
-   [Insights ](/paul-gauthier/aider/pulse)

Additional navigation options

-   [ Code ](/paul-gauthier/aider)
-   [ Issues ](/paul-gauthier/aider/issues)
-   [ Pull requests ](/paul-gauthier/aider/pulls)
-   [ Actions ](/paul-gauthier/aider/actions)
-   [ Projects ](/paul-gauthier/aider/projects)
-   [ Security ](/paul-gauthier/aider/security)
-   [ Insights ](/paul-gauthier/aider/pulse)

New issue

**Have a question about this project?** Sign up for a free GitHub
account to open an issue and contact its maintainers and the community.

[Sign up for
GitHub](/signup?return_to=%2Fpaul-gauthier%2Faider%2Fissues%2Fnew%2Fchoose)

By clicking "Sign up for GitHub", you agree to our [terms of
service](https://docs.github.com/terms) and [privacy
statement](https://docs.github.com/privacy). We'll occasionally send you
account related emails.

Already on GitHub? [Sign
in](/login?return_to=%2Fpaul-gauthier%2Faider%2Fissues%2Fnew%2Fchoose)
to your account

[Jump to bottom](#issue-comment-box)

# Ugly crash during startup when `~/.gitconfig` is missing \[user\] #662

Open

[Megamannen](/Megamannen) opened this issue Jun 10, 2024 · 1 comment

Open

# [Ugly crash during startup when `~/.gitconfig` is missing \[user\]](#top) #662

[Megamannen](/Megamannen) opened this issue Jun 10, 2024 · 1 comment

## Comments

[](/Megamannen)

Copy link

###

**[Megamannen](/Megamannen)** commented [Jun 10,
2024](#issue-2343705266)

+-----------------------------------------------------------------------+
| ### Issue                                                             |
|                                                                       |
| This is my `~/.gitconfig`                                             |
|                                                                       |
|                                                                       |
|                                                                       |
|     [safe]                                                            |
|         directory = /home/mega/Projects                               |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
| This is the output:                                                   |
|                                                                       |
|                                                                       |
|                                                                       |
|     aider                                                             |
|     Traceback (most recent call last):                                |
|       File "/usr/lib/python3.12/configparser.py", line 767, in get    |
|         value = d[option]                                             |
|                 ~^^^^^^^^                                             |
|       File "/u                                                        |
| sr/lib/python3.12/collections/__init__.py", line 1015, in __getitem__ |
|         return self.__m                                               |
| issing__(key)            # support subclasses that define __missing__ |
|                ^^^^^^^^^^^^^^^^^^^^^                                  |
|       File "/u                                                        |
| sr/lib/python3.12/collections/__init__.py", line 1007, in __missing__ |
|         raise KeyError(key)                                           |
|     KeyError: 'name'                                                  |
|                                                                       |
|                                                                       |
|   During handling of the above exception, another exception occurred: |
|                                                                       |
|     Traceback (most recent call last):                                |
|       File "/home/mega/.local/bin/aider", line 8, in <module>         |
|         sys.exit(main())                                              |
|                  ^^^^^^                                               |
|       File "/home/mega/.local/share/pipx/venvs/aide                   |
| r-chat/lib/python3.12/site-packages/aider/main.py", line 306, in main |
|         git_root = setup_git(git_root, io)                            |
|                    ^^^^^^^^^^^^^^^^^^^^^^^                            |
|       File "/home/mega/.local/share/pipx/venvs/aider-ch               |
| at/lib/python3.12/site-packages/aider/main.py", line 68, in setup_git |
|         user_name = config.get_value("user", "name", None)            |
|                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^            |
|       File "/home/mega/.local/share/pipx/venvs/aider-cha              |
| t/lib/python3.12/site-packages/git/config.py", line 793, in get_value |
|         valuestr = self.get(section, option)                          |
|                    ^^^^^^^^^^^^^^^^^^^^^^^^^                          |
|       File "/home/mega/.local/share/pipx/venvs/aider-chat/lib/pyth    |
| on3.12/site-packages/git/config.py", line 114, in assure_data_present |
|         return func(self, *args, **kwargs)                            |
|                ^^^^^^^^^^^^^^^^^^^^^^^^^^^                            |
|       File "/usr/lib/python3.12/configparser.py", line 770, in get    |
|         raise NoOptionError(option, section)                          |
|     configparser.NoOptionError: No option 'name' in section: 'user'   |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
| I added my user info to .gitconfig and it works                       |
|                                                                       |
| ### Version and model info                                            |
|                                                                       |
| Aider: v0.37.0                                                        |
+-----------------------------------------------------------------------+
|                                                                       |
|                                                                       |
| The text was updated successfully, but these errors were encountered: |
|                                                                       |
|                                                                       |
+-----------------------------------------------------------------------+

All reactions

Copy link

Owner

###

**[paul-gauthier](/paul-gauthier)** commented [Jun 10,
2024](#issuecomment-2159441132)

+-----------------------------------------------------------------------+
| Thanks for trying aider and filing this issue.                        |
|                                                                       |
| I am unable to reproduce this issue. I made my `~/.gitconfig` the     |
| same as yours and aider does the expected thing:                      |
|                                                                       |
|                                                                       |
|                                                                       |
|     $ git init                                                        |
|                                                                       |
|     $ aider                                                           |
|     Update git name with: git config user.name "Your Name"            |
|     Update git email with: git config user.email "you@example.com"    |
|     ...                                                               |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
|                                                                       |
| Can you describe more clearly how to reproduce?                       |
+-----------------------------------------------------------------------+

All reactions

Sorry, something went wrong.

[Sign up for free](/join?source=comment-repo) **to join this
conversation on GitHub**. Already have an account? [Sign in to
comment](/login?return_to=https%3A%2F%2Fgithub.com%2Fpaul-gauthier%2Faider%2Fissues%2F662)

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

No branches or pull requests

2 participants

:::

## Footer

[](https://github.com) © 2024 GitHub, Inc.

### Footer navigation

-   [Terms](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
-   [Privacy](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
-   [Security](https://github.com/security)
-   [Status](https://www.githubstatus.com/)
-   [Docs](https://docs.github.com/)
-   [Contact](https://support.github.com?tags=dotcom-footer)
-   Manage cookies
-   Do not share my personal information

You can't perform that action at this time.

ASSISTANT: To address the issue described in https://github.com/paul-gauthier/aider/issues/662, we need to handle the case where the `~/.gitconfig` file is missing or does not contain the `user.name` entry. The most likely file to need changes is:

- `aider/main.py`

Please add `aider/main.py` to the chat so I can propose the necessary changes.

USER: I added these files to the chat: aider/main.py.

If you need to propose edits to other existing files not already added to the chat, you *MUST* tell the me their full path names and ask me to *add the files to the chat*. End your reply and wait for my approval. You can keep asking if you then decide you need to edit more files.

ASSISTANT: To handle the case where the `~/.gitconfig` file is missing or does not contain the `user.name` entry, we need to catch the `configparser.NoOptionError` exception and handle it gracefully.

Here are the changes needed:

1. Modify the `setup_git` function to handle the `configparser.NoOptionError` exception.

aider/main.py
```python
<<<<<<< SEARCH
        except configparser.NoSectionError:
=======
        except (configparser.NoSectionError, configparser.NoOptionError):
>>>>>>> REPLACE
```

This change will ensure that the code handles the case where the `user.name` or `user.email` is missing in the `~/.gitconfig` file without crashing.
2024-06-10 15:52:57 -07:00
Paul Gauthier
ec7f78a500 Run tests in aider/tests 2024-06-10 15:39:18 -07:00