auto-coder 0.1.226__py3-none-any.whl → 0.1.228__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of auto-coder might be problematic. Click here for more details.
- {auto_coder-0.1.226.dist-info → auto_coder-0.1.228.dist-info}/METADATA +2 -2
- {auto_coder-0.1.226.dist-info → auto_coder-0.1.228.dist-info}/RECORD +30 -27
- autocoder/auto_coder.py +424 -131
- autocoder/chat_auto_coder.py +267 -143
- autocoder/chat_auto_coder_lang.py +30 -1
- autocoder/common/__init__.py +2 -1
- autocoder/common/code_auto_generate.py +23 -9
- autocoder/common/code_auto_generate_diff.py +23 -9
- autocoder/common/code_auto_generate_editblock.py +23 -9
- autocoder/common/code_auto_generate_strict_diff.py +23 -9
- autocoder/common/code_auto_merge.py +3 -3
- autocoder/common/code_auto_merge_diff.py +3 -4
- autocoder/common/code_auto_merge_editblock.py +3 -7
- autocoder/common/command_completer.py +6 -0
- autocoder/common/files.py +26 -0
- autocoder/common/types.py +1 -0
- autocoder/common/utils_code_auto_generate.py +38 -0
- autocoder/dispacher/actions/action.py +4 -4
- autocoder/dispacher/actions/plugins/action_regex_project.py +6 -2
- autocoder/models.py +158 -0
- autocoder/pyproject/__init__.py +5 -8
- autocoder/regexproject/__init__.py +2 -3
- autocoder/suffixproject/__init__.py +2 -3
- autocoder/tsproject/__init__.py +2 -2
- autocoder/utils/rest.py +3 -2
- autocoder/version.py +1 -1
- {auto_coder-0.1.226.dist-info → auto_coder-0.1.228.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.226.dist-info → auto_coder-0.1.228.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.226.dist-info → auto_coder-0.1.228.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.226.dist-info → auto_coder-0.1.228.dist-info}/top_level.txt +0 -0
|
@@ -12,7 +12,7 @@ from pydantic import BaseModel, Field
|
|
|
12
12
|
from rich.console import Console
|
|
13
13
|
import json
|
|
14
14
|
from autocoder.utils.queue_communicate import queue_communicate, CommunicateEvent, CommunicateEventType
|
|
15
|
-
|
|
15
|
+
from autocoder.common import files as FileUtils
|
|
16
16
|
|
|
17
17
|
class RegPattern(BaseModel):
|
|
18
18
|
pattern: str = Field(
|
|
@@ -120,8 +120,7 @@ class SuffixProject:
|
|
|
120
120
|
return any([file_path.endswith(suffix) for suffix in self.suffixs])
|
|
121
121
|
|
|
122
122
|
def read_file_content(self, file_path):
|
|
123
|
-
|
|
124
|
-
return file.read()
|
|
123
|
+
return FileUtils.read_file(file_path)
|
|
125
124
|
|
|
126
125
|
def convert_to_source_code(self, file_path):
|
|
127
126
|
module_name = file_path
|
autocoder/tsproject/__init__.py
CHANGED
|
@@ -14,6 +14,7 @@ from pydantic import BaseModel, Field
|
|
|
14
14
|
from rich.console import Console
|
|
15
15
|
import json
|
|
16
16
|
from autocoder.utils.queue_communicate import queue_communicate, CommunicateEvent, CommunicateEventType
|
|
17
|
+
from autocoder.common import files as FileUtils
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
class RegPattern(BaseModel):
|
|
@@ -107,8 +108,7 @@ class TSProject:
|
|
|
107
108
|
return open(self.target_file, "r").read()
|
|
108
109
|
|
|
109
110
|
def read_file_content(self, file_path):
|
|
110
|
-
|
|
111
|
-
return file.read()
|
|
111
|
+
return FileUtils.read_file(file_path)
|
|
112
112
|
|
|
113
113
|
def is_likely_useful_file(self, file_path):
|
|
114
114
|
# Ignore common build output, dependency and configuration directories
|
autocoder/utils/rest.py
CHANGED
|
@@ -7,6 +7,7 @@ from bs4 import BeautifulSoup
|
|
|
7
7
|
from loguru import logger
|
|
8
8
|
import os
|
|
9
9
|
from pathlib import Path
|
|
10
|
+
from autocoder.common import files as FileUtils
|
|
10
11
|
|
|
11
12
|
class HttpDoc:
|
|
12
13
|
def __init__(self, args, llm: byzerllm.ByzerLLM,urls:Optional[List[str]]=None):
|
|
@@ -112,7 +113,7 @@ class HttpDoc:
|
|
|
112
113
|
return temp_documents
|
|
113
114
|
|
|
114
115
|
if ext not in exts.keys():
|
|
115
|
-
main_content =
|
|
116
|
+
main_content = FileUtils.read_file(file_path)
|
|
116
117
|
source_code = SourceCode(module_name=file_path, source_code=main_content)
|
|
117
118
|
source_codes.append(source_code)
|
|
118
119
|
else:
|
|
@@ -135,7 +136,7 @@ class HttpDoc:
|
|
|
135
136
|
|
|
136
137
|
except ImportError as e:
|
|
137
138
|
logger.warning(f"Failed to import llama_index. Please install it using 'pip install llama_index' {e}")
|
|
138
|
-
main_content =
|
|
139
|
+
main_content = FileUtils.read_file(url)
|
|
139
140
|
source_code = SourceCode(module_name=url, source_code=main_content)
|
|
140
141
|
source_codes.append(source_code)
|
|
141
142
|
else:
|
autocoder/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.228"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|