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
develmusa
098944a133
Update help text for specifying the API key to mention Anthropic instead of OpenAI.
2024-06-09 12:35:42 +02:00
Paul Gauthier
4cbeb59bec
browser ver should stop after 3 reflections
2024-06-08 13:38:18 -07:00
Paul Gauthier
8d3a320ab3
log the announcements in the gui too
2024-06-08 13:31:40 -07:00
Paul Gauthier
d2b9eec3e0
fixed bad url; fixed max_reflection logic
2024-06-08 12:57:36 -07:00
Paul Gauthier
1f1da4b1a2
refac all urls into urls.py
2024-06-08 12:53:54 -07:00
Paul Gauthier
09d3d02971
more conservative reflection if
2024-06-08 12:40:35 -07:00
Paul Gauthier
30f4a905c1
renamed config/options and get_md_help()
2024-06-06 14:00:14 -07:00
Paul Gauthier
53deb04e75
use dashed-names not underscore_names in yaml
2024-06-06 13:46:32 -07:00
Paul Gauthier
65c9a7866a
improved handling of defaults
2024-06-06 13:40:16 -07:00
Paul Gauthier
645ace1d0e
fix defaults in sample yml
2024-06-06 12:46:07 -07:00
Paul Gauthier
2d62e3fb1f
add sample aider.conf.yml
2024-06-06 12:40:25 -07:00
Paul Gauthier
caca261587
output nice md usage
2024-06-06 12:26:06 -07:00
Paul Gauthier
8e9cbcc014
Refactored MarkdownHelpFormatter to improve formatting and display additional information about actions.
2024-06-06 12:14:20 -07:00
Paul Gauthier
e7aafd9590
aider: Add argument formatter to print arguments in a specified format.
...
# Aider chat conversation:
USER: Add an args formatter that prints out args like this:
## Output Settings:
### --dark-mode
Use colors suitable for a dark terminal background
Default: False
### --light-mode
Use colors suitable for a light terminal background
Default: False
...
ASSISTANT: To add an argument formatter that prints out arguments in the specified format, we need to:
1. Create a new formatter class.
2. Update the `get_help` function to use this new formatter.
Here are the changes:
1. Create a new file `aider/args_formatter.py` with the custom formatter class.
2. Update `aider/args.py` to use this new formatter.
Let's start with the new file:
aider/args_formatter.py
```python
<<<<<<< SEARCH
=======
import argparse
class CustomHelpFormatter(argparse.HelpFormatter):
def start_section(self, heading):
super().start_section(f"## {heading}:")
def _format_action(self, action):
parts = []
if action.help:
parts.append(f"### --{action.dest}")
parts.append(action.help)
if action.default is not argparse.SUPPRESS:
parts.append(f"Default: {action.default}")
return "\n".join(parts)
def _format_action_invocation(self, action):
return ""
def _format_args(self, action, default_metavar):
return ""
>>>>>>> REPLACE
```
Next, update `aider/args.py` to use this new formatter:
aider/args.py
```python
<<<<<<< SEARCH
from aider import __version__, models
=======
from aider import __version__, models
from aider.args_formatter import CustomHelpFormatter
>>>>>>> REPLACE
```
aider/args.py
```python
<<<<<<< SEARCH
description="aider is GPT powered coding in your terminal",
=======
description="aider is GPT powered coding in your terminal",
formatter_class=CustomHelpFormatter,
>>>>>>> REPLACE
```
aider/args.py
```python
<<<<<<< SEARCH
parser = get_parser([], None)
=======
parser = get_parser([], None)
parser.formatter_class = CustomHelpFormatter
>>>>>>> REPLACE
```
2024-06-06 11:38:45 -07:00
Paul Gauthier
0e5342fdb8
copy
2024-06-06 11:01:27 -07:00
Paul Gauthier
9437fb28c4
removed configargparse.YAMLConfigFileParser
2024-06-05 21:14:54 -07:00
Paul Gauthier
0d9150c77b
coq for languages.md
2024-06-05 20:24:19 -07:00
Paul Gauthier
e3cc69d0c8
coq for in-chat commands
2024-06-05 20:10:48 -07:00
Paul Gauthier
6f9e0ce37f
cog to update usage.md
2024-06-05 19:43:24 -07:00
Paul Gauthier
a857cbb7d1
added cmd line args
2024-06-05 16:59:30 -07:00
Paul Gauthier
f481fba1ca
set version to 0.37.1-dev
2024-06-04 10:31:28 -07:00
Paul Gauthier
45c8e82228
version bump to 0.37.0
2024-06-04 10:30:49 -07:00
Paul Gauthier
73c6af8851
aider: Implemented a more flexible approach to handle different microphone sample rates in aider/voice.py.
...
# Aider chat conversation:
USER: https://github.com/paul-gauthier/aider/issues/612
https://github.com/paul-gauthier/aider/issues/612 :
[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%2F612)
- 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%2F612)
[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 1k](/login?return_to=%2Fpaul-gauthier%2Faider)
-
[ Star 10.5k](/login?return_to=%2Fpaul-gauthier%2Faider)
- [Code ](/paul-gauthier/aider)
- [Issues 57](/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)
# Unsupported Audio Sample Rate #612
Open
[aaronson2012](/aaronson2012) opened this issue May 24, 2024 · 0
comments
Open
# [Unsupported Audio Sample Rate](#top) #612
[aaronson2012](/aaronson2012) opened this issue May 24, 2024 · 0
comments
Labels
[enhancement](/paul-gauthier/aider/labels/enhancement) New feature or
request
## Comments
[](/aaronson2012)
Copy link
###
**[aaronson2012](/aaronson2012)** commented [May 24,
2024](#issue-2314049815)
+-----------------------------------------------------------------------+
| ### Issue |
| |
| aider was crashing when i ran the /voice command and I realized that |
| my computers microphone did not support a sample rate of 16kHz. It |
| was an easy fix for me i just changed the sample_rate variable to one |
| my mic supported but this isn\'t a very elegant solution. Could there |
| be a better way so all mics are supported? |
| |
| ### Version and model info |
| |
| Latest verision |
+-----------------------------------------------------------------------+
| |
| |
| The text was updated successfully, but these errors were encountered: |
| |
| |
+-----------------------------------------------------------------------+
All reactions
[paul-gauthier](/paul-gauthier) added the
[enhancement](/paul-gauthier/aider/labels/enhancement) New feature or
request label [Jun 4, 2024](#event-13039727805)
[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%2F612)
Assignees
No one assigned
Labels
[enhancement](/paul-gauthier/aider/labels/enhancement) New feature or
request
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: Based on the issue description, I believe the following file is most likely to need changes to support different microphone sample rates:
aider/voice.py
This file contains the Voice class which handles recording and transcribing audio. The sample_rate variable is hardcoded in this file.
To make the suggested change, we would need to modify how the sample rate is determined in aider/voice.py.
Please add aider/voice.py to the chat so I can propose the specific code changes needed. Let me know if you would like me to explain my reasoning further or if you have any other questions!
USER: I added these files to the chat: aider/voice.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: Here are the proposed changes to aider/voice.py to support different microphone sample rates:
aider/voice.py
```python
<<<<<<< SEARCH
sample_rate = 16000 # 16kHz
=======
try:
sample_rate = int(self.sd.query_devices(None, 'input')['default_samplerate'])
except (TypeError, ValueError):
sample_rate = 16000 # fallback to 16kHz if unable to query device
>>>>>>> REPLACE
```
This change:
1. Attempts to query the default sample rate of the input device using sounddevice's `query_devices()` function.
2. If successful, it uses that sample rate.
3. If it fails to get a valid sample rate, it falls back to the original 16kHz.
This should allow aider to automatically adapt to the microphone's supported sample rate in most cases, while still having a reasonable fallback.
Let me know if you would like me to explain or modify the changes further.
2024-06-04 10:27:22 -07:00
Paul Gauthier
ad2312ad7b
handle missing end_lineno attr #619
2024-05-29 15:55:55 -07:00
Paul Gauthier
0da01dacb6
ssh
2024-05-29 15:51:29 -07:00
Paul Gauthier
17dcfd94f7
+Only include the files
2024-05-25 18:58:37 -07:00
Paul Gauthier
0e71d262e3
change error message
2024-05-24 13:34:51 -07:00
Paul Gauthier
d48edfcd00
fix missing env
2024-05-24 12:59:48 -07:00
Paul Gauthier
d41bf592a0
Set GIT_EDITOR environment variable only if it is not already set.
2024-05-24 12:43:53 -07:00
Aleksandr Bobrov
231fa46125
Update cmd_commit method signature to accept an optional args parameter.
2024-05-24 14:57:42 +04:00
Aleksandr Bobrov
311ae04314
aider: Fix issue in cmd_commit
to set commit_message
to None
if args
does not exist.
...
# Aider chat conversation:
USER: I did `git reset --hard HEAD~1` to discard the last edits. Please wait for further instructions before attempting that change again. Feel free to ask relevant questions about why the changes were reverted.
ASSISTANT: Understood. If you have any specific instructions or changes you would like to make, please let me know!
USER: in `cmd_commit` issue if args not exist please fix, as leave commit_message as None
ASSISTANT: To fix the issue in `cmd_commit` when `args` does not exist, we need to ensure that `commit_message` is set to `None` if `args` is not provided. Here are the changes:
1. Check if `args` is provided and set `commit_message` to `None` if it is not.
Here is the *SEARCH/REPLACE* block:
aider/commands.py
<source>python
<<<<<<< SEARCH
commit_message = args.strip()
=======
commit_message = args.strip() if args else None
>>>>>>> REPLACE
</source>
2024-05-24 14:52:40 +04:00
Paul Gauthier
52ac35fcd2
restore --show-diffs functionality #607
2024-05-23 14:07:20 -07:00
Paul Gauthier
2ed5e45677
fixed #603
2024-05-23 14:01:45 -07:00
Paul Gauthier
a395d9bb5c
fix double lines for confirm_ask
2024-05-23 13:55:53 -07:00
Paul Gauthier
cda9565cae
aider: Handle IsADirectoryError when trying to create a file where a directory exists.
...
# Aider chat conversation:
USER: https://github.com/paul-gauthier/aider/issues/606
https://github.com/paul-gauthier/aider/issues/606 :
[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%2F606)
- 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 )
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
- [](https://github.com/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 )
- [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%2F606)
[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)
- [Fork 1k](/login?return_to=%2Fpaul-gauthier%2Faider)
-
[ Star 10.2k](/login?return_to=%2Fpaul-gauthier%2Faider)
- [Code ](/paul-gauthier/aider)
- [Issues 55](/paul-gauthier/aider/issues)
- [Pull requests 8](/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)
# Trying to create a file where a directory exists causes IsADirectoryError and aider to exit #606
Open
[harleypig](/harleypig) opened this issue May 18, 2024 · 0 comments
Open
# [Trying to create a file where a directory exists causes IsADirectoryError and aider to exit](#top) #606
[harleypig](/harleypig) opened this issue May 18, 2024 · 0 comments
Labels
[bug](/paul-gauthier/aider/labels/bug) Something isn\'t working
## Comments
[](/harleypig)
Copy link
###
**[harleypig](/harleypig)** commented [May 18, 2024](#issue-2304113184)
•
edited
+-----------------------------------------------------------------------+
| ### Issue |
| |
| I wasn\'t thinking and asked aider to create a file with the same |
| name as a directory and got unexpectedly dumped back to the command |
| line. |
| |
| |
| |
| $ mkdir -p testoops/oops |
| $ cd testoops |
| $ aider |
| Aider v0.35.0 |
| |
| Models: openai/gpt-4o with diff edit format, weak model gpt- |
| 3.5-turbo |
| Git repo: .git with 0 files |
| |
| Repo-map: using 2048 tokens |
| |
| Use /help to see in-chat commands, run with --help to see cm |
| d line args |
| ──────────────────────────────────────────────────────────── |
| ───────────────────────────────────────────────────────────────────── |
| > Create a text file named './oops' that has 'this wont work |
| ' |
| |
| Here is the SEARCH/REPLACE block to create the file ./oops w |
| ith the content this wont work: |
| |
| ./oops |
| |
| |
| |
| <<<<<<< SEARCH |
| |
| ======= |
| |
| this wont work |
| |
| >>>>>>> REPLACE |
| |
| |
| |
| |
| |
| Allow edits to ./oops which was not previously added to chat? y |
| Committing ./oops before applying edits. |
| Cmd('git') failed due to: exit code(1) |
| cmdline: git commit -m Add |
| ed ./oops file. --no-verify -- /home/harleypig/projects/testoops/oops |
| stderr: 'error: pathspec '/home/harl |
| eypig/projects/testoops/oops' did not match any file(s) known to git' |
| ──────────────────────────────────────────────────────────── |
| ───────────────────────────────────────────────────────────────────── |
| Traceback (most recent call last): |
| File "/usr/local/bin/aider", line 8, in <module> |
| sys.exit(main()) |
| File "/home/harleypig/.local/share/ |
| python/lib/python3.10/site-packages/aider/main.py", line 408, in main |
| coder.run() |
| File "/home/harleypig/.local/share/python/lib/p |
| ython3.10/site-packages/aider/coders/base_coder.py", line 496, in run |
| new_user_message = self.run_loop() |
| File "/home/harleypig/.local/share/python/lib/python |
| 3.10/site-packages/aider/coders/base_coder.py", line 512, in run_loop |
| inp = self.io.get_input( |
| File "/home/harleypig/.local/share/pyt |
| hon/lib/python3.10/site-packages/aider/io.py", line 210, in get_input |
| completer_instance = AutoCompleter( |
| File "/home/harleypig/.local/share/p |
| ython/lib/python3.10/site-packages/aider/io.py", line 47, in __init__ |
| with open(fname, "r", encoding=self.encoding) as f: |
| IsADirectoryError |
| : [Errno 21] Is a directory: '/home/harleypig/projects/testoops/oops' |
| |
| |
| |
| |
| |
| |
| |
| ### Version and model info |
| |
| In example above. |
+-----------------------------------------------------------------------+
| |
| |
| 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
[May 20, 2024](#event-12868798902)
[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%2F606)
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
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 of `IsADirectoryError` when trying to create a file where a directory exists, we need to handle this exception in the relevant part of the code. The most likely file to need changes is `aider/io.py`.
Please add `aider/io.py` to the chat so I can propose the necessary changes.
USER: I added these files to the chat: aider/io.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 `IsADirectoryError` when trying to create a file where a directory exists, we need to catch this exception and handle it appropriately in the `get_input` method of the `InputOutput` class in `aider/io.py`.
Here are the changes:
aider/io.py
```python
<<<<<<< SEARCH
try:
with open(fname, "r", encoding=self.encoding) as f:
content = f.read()
except (FileNotFoundError, UnicodeDecodeError):
continue
=======
try:
with open(fname, "r", encoding=self.encoding) as f:
content = f.read()
except (FileNotFoundError, UnicodeDecodeError, IsADirectoryError):
continue
>>>>>>> REPLACE
```
This change will ensure that if the code tries to open a directory as if it were a file, it will catch the `IsADirectoryError` and continue without crashing.
2024-05-23 13:48:44 -07:00
Paul Gauthier
a4a6066858
handle missing max_map_tokens/max_context_window
2024-05-23 13:46:08 -07:00
Paul Gauthier
6345cd3734
cleanup
2024-05-23 13:43:35 -07:00
Paul Gauthier
fb76895eb1
Merge branch 'main' into swe-bench
2024-05-23 13:36:23 -07:00
Paul Gauthier
a405defcff
ask for confirmation
2024-05-22 21:27:59 -07:00
Paul Gauthier
5032adf44b
Add the url content
2024-05-22 21:25:34 -07:00
Paul Gauthier
dc8ae596c3
aider: Implement regex to find all URLs in the input string.
...
# Aider chat conversation:
USER: do the todo
ASSISTANT: To address the TODO comment, we need to implement a regex to find all URLs in the input string. Here are the changes:
1. Import the `re` module for regular expressions.
2. Implement the `check_for_urls` method to find and process URLs in the input string.
Here are the *SEARCH/REPLACE* blocks:
aider/coders/base_coder.py
```python
<<<<<<< SEARCH
import hashlib
=======
import hashlib
import re
>>>>>>> REPLACE
```
aider/coders/base_coder.py
```python
<<<<<<< SEARCH
# todo use a regex to find all urls in inp
return inp
=======
url_pattern = re.compile(
r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
)
urls = url_pattern.findall(inp)
if urls:
self.io.tool_output(f"Found URLs: {', '.join(urls)}")
return inp
>>>>>>> REPLACE
```
This will implement the functionality to find all URLs in the input string using a regular expression.
2024-05-22 21:19:44 -07:00
Paul Gauthier
aca24976a7
Add method to check for URLs in input.
2024-05-22 21:19:43 -07:00
Paul Gauthier
899fc88a14
Merge branch 'main' into swe-bench
2024-05-22 15:01:03 -07:00
Paul Gauthier
2374a2166f
set version to 0.36.1-dev
2024-05-22 12:16:33 -07:00
Paul Gauthier
8868caf2b1
version bump to 0.36.0
2024-05-22 12:15:53 -07:00