-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix up apply patch/rebuild patch for new line issue. Parameterize the…
… tests to make it easy to add more in the future
- Loading branch information
1 parent
98e86ac
commit 8d2ccfc
Showing
14 changed files
with
145 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/coder.py b/coder.py | ||
--- a/coder.py | ||
+++ b/coder.py | ||
@@ -3,7 +3,7 @@ | ||
from pathlib import Path | ||
from pygments.lexers import ClassNotFound, get_lexer_for_mimetype, guess_lexer_for_filename | ||
from types import SimpleNamespace | ||
-import fnmatch, mimetypes, re, subprocess, unidiff | ||
+import fnmatch, mimetypes, re, subprocess | ||
|
||
|
||
class Code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from aicodebot.helpers import exec_and_get_output, logger | ||
from aicodebot.lm import token_size | ||
from pathlib import Path | ||
from pygments.lexers import ClassNotFound, get_lexer_for_mimetype, guess_lexer_for_filename | ||
from types import SimpleNamespace | ||
import fnmatch, mimetypes, re, subprocess, unidiff | ||
|
||
# Comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from aicodebot.helpers import exec_and_get_output, logger | ||
from aicodebot.lm import token_size | ||
from pathlib import Path | ||
from pygments.lexers import ClassNotFound, get_lexer_for_mimetype, guess_lexer_for_filename | ||
from types import SimpleNamespace | ||
import fnmatch, mimetypes, re, subprocess | ||
|
||
# Comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/input.py b/input.py | ||
--- a/input.py | ||
+++ b/input.py | ||
@@ -1,7 +1,7 @@ | ||
from aicodebot.coder import Coder | ||
from aicodebot.commands import commit, review | ||
-from aicodebot.lm import DEFAULT_RESPONSE_TOKENS, token_size | ||
+from aicodebot.lm import token_size | ||
from aicodebot.patch import Patch | ||
from pathlib import Path | ||
from prompt_toolkit import PromptSession | ||
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from aicodebot.coder import Coder | ||
from aicodebot.commands import commit, review | ||
from aicodebot.lm import DEFAULT_RESPONSE_TOKENS, token_size | ||
from aicodebot.patch import Patch | ||
from pathlib import Path | ||
from prompt_toolkit import PromptSession | ||
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory | ||
from prompt_toolkit.completion import Completer, Completion | ||
from prompt_toolkit.history import FileHistory | ||
from rich.panel import Panel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from aicodebot.coder import Coder | ||
from aicodebot.commands import commit, review | ||
from aicodebot.lm import token_size | ||
from aicodebot.patch import Patch | ||
from pathlib import Path | ||
from prompt_toolkit import PromptSession | ||
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory | ||
from prompt_toolkit.completion import Completer, Completion | ||
from prompt_toolkit.history import FileHistory | ||
from rich.panel import Panel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/prompts.py b/prompts.py | ||
--- a/prompts.py | ||
+++ b/prompts.py | ||
@@ -6,7 +6,7 @@ | ||
from langchain import PromptTemplate | ||
from langchain.output_parsers import PydanticOutputParser | ||
from pathlib import Path | ||
-from pydantic import BaseModel, Field | ||
-from types import SimpleNamespace | ||
-import arrow, functools, os, platform | ||
+from pydantic import BaseModel, Field | ||
+from types import SimpleNamespace | ||
+import arrow, functools, os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from aicodebot.coder import Coder | ||
from aicodebot.config import read_config | ||
from aicodebot.helpers import logger | ||
from langchain import PromptTemplate | ||
from langchain.output_parsers import PydanticOutputParser | ||
from pathlib import Path | ||
from pydantic import BaseModel, Field | ||
from types import SimpleNamespace | ||
import arrow, functools, os, platform | ||
|
||
# Comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from aicodebot.coder import Coder | ||
from aicodebot.config import read_config | ||
from aicodebot.helpers import logger | ||
from langchain import PromptTemplate | ||
from langchain.output_parsers import PydanticOutputParser | ||
from pathlib import Path | ||
from pydantic import BaseModel, Field | ||
from types import SimpleNamespace | ||
import arrow, functools, os | ||
|
||
# Comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters