Commit graph

1520 commits

Author SHA1 Message Date
Aloha
1fc1c304c7
Fix: use f-string 2024-04-11 16:58:10 +08:00
Paul Gauthier
b117c1580c set version to 0.28.1-dev 2024-04-09 16:06:32 -07:00
Paul Gauthier
aa02bd16b5 version bump to 0.28.0 2024-04-09 16:05:54 -07:00
Paul Gauthier
b75fdb92d5 Added gpt-4-turbo-2024-04-09, gpt-4-turbo 2024-04-09 14:24:13 -07:00
Paul Gauthier
3ab49f1df3 set version to 0.27.1-dev 2024-03-22 10:59:17 -07:00
Paul Gauthier
1d5b3c13d3 version bump to 0.27.0 2024-03-22 10:58:42 -07:00
Paul Gauthier
8f98f3b430 Handle languages without tags.scm files #514 2024-03-22 10:14:22 -07:00
Paul Gauthier
837f3ab048 Merge remote-tracking branch 'origin/main' 2024-03-22 10:03:04 -07:00
Paul Gauthier
a39965a9ff Only /undo the files which were part of the last commit, don't stomp other dirty files #513 2024-03-22 10:00:15 -07:00
paul-gauthier
4dd09bde99
Merge pull request #477 from ryanfreckleton/typescript-repo-map-fix 2024-03-20 18:14:39 -07:00
Paul Gauthier
7103029abb Only redact non-null values #505 2024-03-19 12:00:00 -07:00
Paul Gauthier
a4d3d2b7a5 set version to 0.26.2-dev 2024-03-10 11:24:25 -07:00
Paul Gauthier
f75576f890 version bump to 0.26.1 2024-03-10 11:23:49 -07:00
Paul Gauthier
0f9efc881e catch configparser errors 2024-03-10 08:22:48 -07:00
Paul Gauthier
31909221cc set version to 0.26.1-dev 2024-03-08 13:16:15 -08:00
Paul Gauthier
43ce68cf59 version bump to 0.26.0 2024-03-08 13:15:39 -08:00
Paul Gauthier
058c237a28 Use gpt4 turbo as the default model 2024-03-08 13:13:20 -08:00
Paul Gauthier
f565057ad4 Improved logic to check for git user name/email 2024-03-08 12:37:21 -08:00
Paul Gauthier
0871764766 Don't share local git errors with GPT #500 2024-03-08 12:24:54 -08:00
Paul Gauthier
7fbd9e2be4 Added claude post 2024-03-08 08:00:41 -08:00
Paul Gauthier
fbc3f38256 tweaked model args 2024-03-07 13:07:02 -08:00
Ryan Freckleton
e841e029b8 fix(tree-sitter-typescript-tags.scm): Add additional queries.
This fixes the behavior of the typescript parsing, while maintaining prior functionality.
2024-03-04 15:03:55 -07:00
Ryan Freckleton
19c8fa389f fix(tree-sitter-typescript-tags): correct tree-sitter queries
Add a new test case for typescript.
Fix queries for typescript.
2024-03-04 14:36:35 -07:00
Paul Gauthier
3d47049d48 set version to 0.25.1-dev 2024-03-04 12:39:00 -08:00
Paul Gauthier
75d129e679 version bump to 0.25.0 2024-03-04 12:38:28 -08:00
Paul Gauthier
0fb57895a4 link to the faq on edit errors 2024-03-04 12:37:51 -08:00
Paul Gauthier
cd434cac5a New --35turbo switch and docs updates 2024-02-28 14:06:44 -08:00
Paul Gauthier
5c694db19d scrub the openai key from chat history md 2024-02-26 08:30:13 -08:00
Paul Gauthier
6dd5ae69e3 Normalize paths before checking aiderignore #479 2024-02-25 15:54:57 -08:00
Paul Gauthier
49c904eea5 Added a warning if the user adds many files totaling many tokens 2024-02-25 15:34:51 -08:00
Paul Gauthier
a9fe4532c7 Aider should fully ignore files in aiderignore #479 2024-02-24 09:39:33 -08:00
Paul Gauthier
2cdf86b479 cleanup 2024-02-24 07:13:00 -08:00
Paul Gauthier
a3285edc4f aider: Add --openai-organization-id param to set OpenAI organization ID.
# Aider chat conversation:

USER: add --openai-organization-id param that sets OpenAI(organization=...)

ASSISTANT: ```diff
--- aider/main.py
+++ aider/main.py
@@ ... @@
     model_group.add_argument(
         "--openai-api-deployment-id",
         metavar="OPENAI_API_DEPLOYMENT_ID",
         env_var="OPENAI_API_DEPLOYMENT_ID",
         help="Specify the deployment_id",
     )
+    model_group.add_argument(
+        "--openai-organization-id",
+        metavar="OPENAI_ORGANIZATION_ID",
+        env_var="OPENAI_ORGANIZATION_ID",
+        help="Specify the OpenAI organization ID",
+    )
     model_group.add_argument(
         "--openrouter",
         dest="openai_api_base",
         action="store_const",
@@ ... @@
     if args.openai_api_type == "azure":
         client = openai.AzureOpenAI(
             api_key=args.openai_api_key,
             azure_endpoint=args.openai_api_base,
             api_version=args.openai_api_version,
             azure_deployment=args.openai_api_deployment_id,
         )
     else:
         kwargs = dict()
         if args.openai_api_base:
             kwargs["base_url"] = args.openai_api_base
             if "openrouter.ai" in args.openai_api_base:
                 kwargs["default_headers"] = {
                     "HTTP-Referer": "http://aider.chat",
                     "X-Title": "Aider",
                 }
+        if args.openai_organization_id:
+            kwargs["organization"] = args.openai_organization_id

         client = openai.OpenAI(api_key=args.openai_api_key, **kwargs)

@@ ... @@
     if args.verbose:
         show = scrub_sensitive_info(parser.format_values())
         io.tool_output(show)
         io.tool_output("Option settings:")
         for arg, val in sorted(vars(args).items()):
             io.tool_output(f"  - {arg}: {scrub_sensitive_info(str(val))}")
+        if args.openai_organization_id:
+            io.tool_output(f"  - openai_organization_id: {args.openai_organization_id}")
```
This diff adds a new command-line argument `--openai-organization-id` to the `aider/main.py` file, which allows the user to specify the OpenAI organization ID. It also ensures that if this argument is provided, it is passed to the `openai.OpenAI` client initialization as the `organization` parameter. Additionally, it outputs the organization ID if verbose mode is enabled.
2024-02-24 07:11:58 -08:00
Paul Gauthier
69d1107b31 set version to 0.24.2-dev 2024-02-11 05:51:40 -08:00
Paul Gauthier
d26693e636 version bump to 0.24.1 2024-02-11 05:51:09 -08:00
Paul Gauthier
72e6cb901c Fixed bug with cost computations when --no-steam in effect #475 2024-02-11 05:48:32 -08:00
Paul Gauthier
0fa2505ac5 Delete pandoc installer 2024-02-10 08:48:22 -08:00
Paul Gauthier
3d948788dd set version to 0.24.1-dev 2024-02-10 07:35:36 -08:00
Paul Gauthier
08a22b9cf7 version bump to 0.24.0 2024-02-10 07:35:02 -08:00
Paul Gauthier
1e70b3fb05 Updated HISTORY 2024-02-10 07:34:21 -08:00
Paul Gauthier
d376767ca3 Use gpt-3.5-turbo-0125 for commit messages 2024-02-10 07:32:26 -08:00
Paul Gauthier
6ddfc894e7 Updated HISTORY 2024-02-10 07:31:04 -08:00
Paul Gauthier
bdef4308fe Simpler calls to pypandoc 2024-02-08 16:14:17 -08:00
Paul Gauthier
efff174f9a Use download_pandoc, which works everywhere including arm64 2024-02-08 15:56:00 -08:00
Paul Gauthier
2dee76378b keep hrefs 2024-02-08 15:19:00 -08:00
Paul Gauthier
05c74202ec copy 2024-02-08 14:20:49 -08:00
Paul Gauthier
cc36329691 output with pandoc, cleanup with bs and re 2024-02-08 14:14:42 -08:00
Paul Gauthier
be60b785a4 aider: Remove all data: URLs from slimdown_html.
# Aider chat conversation:

USER: in `slimdown_html` remove all data: urls

ASSISTANT: ```diff
--- aider/scrape.py
+++ aider/scrape.py
@@ ... @@
 def slimdown_html(soup):
     # Remove all <img> tags
     for img in soup.find_all('img'):
         img.decompose()
+    # Remove all elements with data: URLs
+    for tag in soup.find_all(href=lambda x: x and x.startswith('data:')):
+        tag.decompose()
+    for tag in soup.find_all(src=lambda x: x and x.startswith('data:')):
+        tag.decompose()
     # Remove all per-element CSS styles
     for tag in soup.find_all(True):
         tag.attrs.pop('style', None)
     # Remove all internal anchor elements
     for anchor in soup.find_all('a', href=True):
         if anchor['href'].startswith('#'):
             anchor.decompose()
     return soup
```
2024-02-08 12:12:03 -08:00
Paul Gauthier
84ae51c005 Add functionality to write scraped content to a temporary file and optimize HTML parsing. 2024-02-08 12:11:59 -08:00
Paul Gauthier
33a62c8dc6 aider: finish slimdown_html. remove all <img> tags and all per-element css-styles and all internal anchor elements
# Aider chat conversation:

USER: finish `slimdown_html`. remove all <img> tags and all per-element css-styles and all internal anchor elements

ASSISTANT: ```diff
--- aider/scrape.py
+++ aider/scrape.py
@@ ... @@
-def slimdown_html(page_source: str) -> str:
-    soup = BeautifulSoup(page_source, "html.parser")
-    # ...
+def slimdown_html(page_source: str) -> str:
+    soup = BeautifulSoup(page_source, "html.parser")
+    # Remove all <img> tags
+    for img in soup.find_all('img'):
+        img.decompose()
+    # Remove all per-element CSS styles
+    for tag in soup.find_all(True):
+        tag.attrs.pop('style', None)
+    # Remove all internal anchor elements
+    for anchor in soup.find_all('a', href=True):
+        if anchor['href'].startswith('#'):
+            anchor.decompose()
+    return str(soup)
```
2024-02-08 12:10:12 -08:00