auto-coder 0.1.321__py3-none-any.whl → 0.1.323__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.321.dist-info → auto_coder-0.1.323.dist-info}/METADATA +1 -1
- {auto_coder-0.1.321.dist-info → auto_coder-0.1.323.dist-info}/RECORD +11 -11
- autocoder/auto_coder_runner.py +23 -25
- autocoder/chat_auto_coder.py +9 -5
- autocoder/common/stream_out_type.py +4 -1
- autocoder/common/v2/code_editblock_manager.py +23 -4
- autocoder/version.py +1 -1
- {auto_coder-0.1.321.dist-info → auto_coder-0.1.323.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.321.dist-info → auto_coder-0.1.323.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.321.dist-info → auto_coder-0.1.323.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.321.dist-info → auto_coder-0.1.323.dist-info}/top_level.txt +0 -0
|
@@ -4,17 +4,17 @@ autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,
|
|
|
4
4
|
autocoder/auto_coder_rag.py,sha256=vOqwBHdK_KwMNUUc8ji_tlZ5DoALAG1rDjWAic3rM-4,34561
|
|
5
5
|
autocoder/auto_coder_rag_client_mcp.py,sha256=QRxUbjc6A8UmDMQ8lXgZkjgqtq3lgKYeatJbDY6rSo0,6270
|
|
6
6
|
autocoder/auto_coder_rag_mcp.py,sha256=-RrjNwFaS2e5v8XDIrKR-zlUNUE8UBaeOtojffBrvJo,8521
|
|
7
|
-
autocoder/auto_coder_runner.py,sha256=
|
|
7
|
+
autocoder/auto_coder_runner.py,sha256=osAYoX9AE0rViyK6y3-rBC3FydgplYNSYJ-vMvK9AmU,107492
|
|
8
8
|
autocoder/auto_coder_server.py,sha256=E3Z829TPSooRSNhuh3_x9yaZi0f5G0Lm0ntoZhjGaoQ,20576
|
|
9
9
|
autocoder/benchmark.py,sha256=Ypomkdzd1T3GE6dRICY3Hj547dZ6_inqJbBJIp5QMco,4423
|
|
10
|
-
autocoder/chat_auto_coder.py,sha256=
|
|
10
|
+
autocoder/chat_auto_coder.py,sha256=SzH6fdoH8kJgARYXBu0CTB8J9PY8Q2T9CrIB844PXtM,25841
|
|
11
11
|
autocoder/chat_auto_coder_lang.py,sha256=p1SUPw1_YBHK69yNViXr6iFhHL-PjFnrXExA2mXJ5ko,21655
|
|
12
12
|
autocoder/command_args.py,sha256=Sfn3TVCoijSm937ZFT_JTsjRIB1gtUr-OZvnWLeS2s8,30732
|
|
13
13
|
autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,10013
|
|
14
14
|
autocoder/lang.py,sha256=U6AjVV8Rs1uLyjFCZ8sT6WWuNUxMBqkXXIOs4S120uk,14511
|
|
15
15
|
autocoder/models.py,sha256=AyoZ-Pzy0oyYUmWCxOIRiOImsqboSfRET7LO9-UOuxI,11172
|
|
16
16
|
autocoder/run_context.py,sha256=IUfSO6_gp2Wt1blFWAmOpN0b0nDrTTk4LmtCYUBIoro,1643
|
|
17
|
-
autocoder/version.py,sha256=
|
|
17
|
+
autocoder/version.py,sha256=ImABxNRLGb97dDIqA8rCmYdJ6dlrN0I9fqGRviX9tNw,23
|
|
18
18
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
autocoder/agent/auto_demand_organizer.py,sha256=URAq0gSEiHeV_W4zwhOI_83kHz0Ryfj1gcfh5jwCv_w,6501
|
|
20
20
|
autocoder/agent/auto_filegroup.py,sha256=pBsAkBcpFTff-9L5OwI8xhf2xPKpl-aZwz-skF2B6dc,6296
|
|
@@ -83,7 +83,7 @@ autocoder/common/search.py,sha256=245iPFgWhMldoUK3CqCP89ltaxZiNPK73evoG6Fp1h8,16
|
|
|
83
83
|
autocoder/common/search_replace.py,sha256=GphFkc57Hb673CAwmbiocqTbw8vrV7TrZxtOhD0332g,22147
|
|
84
84
|
autocoder/common/shells.py,sha256=elminFpNosnV0hsEUcsugDxlGO8NfH96uah-8bkaBvA,19929
|
|
85
85
|
autocoder/common/stats_panel.py,sha256=wGl9O45pjVVDxhNumLv4_NfLYSlUP_18Tw4hcJSjw50,4596
|
|
86
|
-
autocoder/common/stream_out_type.py,sha256=
|
|
86
|
+
autocoder/common/stream_out_type.py,sha256=XWONDrdNsWQTSzloVJSwbKD_Tacxe9mX_ozXdl-5VIc,379
|
|
87
87
|
autocoder/common/sys_prompt.py,sha256=JlexfjZt554faqbgkCmzOJqYUzDHfbnxly5ugFfHfEE,26403
|
|
88
88
|
autocoder/common/text.py,sha256=KGRQq314GHBmY4MWG8ossRoQi1_DTotvhxchpn78c-k,1003
|
|
89
89
|
autocoder/common/token_cost_caculate.py,sha256=MSWJtl7YpQSUt-gFQoqUcJMblyPqHXe2ZioiZOFkV80,10085
|
|
@@ -102,7 +102,7 @@ autocoder/common/v2/code_auto_merge_diff.py,sha256=xh93G9Gn8zSRhGq6L90tlodFM2u-g
|
|
|
102
102
|
autocoder/common/v2/code_auto_merge_editblock.py,sha256=FpXdHAuHhtOLXybrUd2e1rDrxqoge-CpUyWpX0yNEv8,22018
|
|
103
103
|
autocoder/common/v2/code_auto_merge_strict_diff.py,sha256=jIIedNZGW52dhSmNxb3vB7UdJZp8tg59Z2gg3sCpqoM,10117
|
|
104
104
|
autocoder/common/v2/code_diff_manager.py,sha256=ciXviNjldX9ce9lgIvmWoG_8JT2GnwRW8U7QCWVdAH0,10512
|
|
105
|
-
autocoder/common/v2/code_editblock_manager.py,sha256=
|
|
105
|
+
autocoder/common/v2/code_editblock_manager.py,sha256=AUT_zbawG9nSOrMr68bSfUB5fckSFWMv4yWcBUInyXM,12221
|
|
106
106
|
autocoder/common/v2/code_manager.py,sha256=C403bS-f6urixwitlKHcml-J03hci-UyNwHJOqBiY6Q,9182
|
|
107
107
|
autocoder/common/v2/code_strict_diff_manager.py,sha256=v-J1kDyLg7tLGg_6_lbO9S4fNkx7M_L8Xr2G7fPptiU,9347
|
|
108
108
|
autocoder/data/byzerllm.md,sha256=SGCMpEaUQ0ysPxQsgzyyp5sgvEr8dZsxEGAfVcPBIq0,47741
|
|
@@ -226,9 +226,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
226
226
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
227
227
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=xuBeWD0YOckqRo8JB1WkVIMOYH6c24m7JfV4svBfPDo,15113
|
|
228
228
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
229
|
-
auto_coder-0.1.
|
|
230
|
-
auto_coder-0.1.
|
|
231
|
-
auto_coder-0.1.
|
|
232
|
-
auto_coder-0.1.
|
|
233
|
-
auto_coder-0.1.
|
|
234
|
-
auto_coder-0.1.
|
|
229
|
+
auto_coder-0.1.323.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
230
|
+
auto_coder-0.1.323.dist-info/METADATA,sha256=k6NmV0R-qc0unkS61x7vUfu2swS8Oq8lrOunOq6Hmxg,2747
|
|
231
|
+
auto_coder-0.1.323.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
232
|
+
auto_coder-0.1.323.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
233
|
+
auto_coder-0.1.323.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
234
|
+
auto_coder-0.1.323.dist-info/RECORD,,
|
autocoder/auto_coder_runner.py
CHANGED
|
@@ -608,11 +608,11 @@ def load_memory():
|
|
|
608
608
|
memory.clear()
|
|
609
609
|
memory.update(_memory)
|
|
610
610
|
completer.update_current_files(memory["current_files"]["files"])
|
|
611
|
-
|
|
612
|
-
def get_memory():
|
|
613
|
-
global memory
|
|
614
611
|
return memory
|
|
615
612
|
|
|
613
|
+
def get_memory():
|
|
614
|
+
return load_memory()
|
|
615
|
+
|
|
616
616
|
|
|
617
617
|
completer = CommandCompleter(commands,
|
|
618
618
|
file_system_model=CCFileSystemModel(project_root=project_root,
|
|
@@ -2532,28 +2532,26 @@ def index_import(path: str):
|
|
|
2532
2532
|
|
|
2533
2533
|
@run_in_raw_thread()
|
|
2534
2534
|
def index_query(query: str):
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
os.remove(yaml_file)
|
|
2556
|
-
|
|
2535
|
+
from autocoder.index.entry import build_index_and_filter_files
|
|
2536
|
+
from autocoder.pyproject import PyProject
|
|
2537
|
+
from autocoder.tsproject import TSProject
|
|
2538
|
+
from autocoder.suffixproject import SuffixProject
|
|
2539
|
+
|
|
2540
|
+
config = get_final_config()
|
|
2541
|
+
config.query = query
|
|
2542
|
+
config.skip_filter_index = False
|
|
2543
|
+
llm = get_single_llm(config.chat_model or config.model, product_mode=config.product_mode)
|
|
2544
|
+
|
|
2545
|
+
if config.project_type == "ts":
|
|
2546
|
+
pp = TSProject(args=config, llm=llm)
|
|
2547
|
+
elif config.project_type == "py":
|
|
2548
|
+
pp = PyProject(args=config, llm=llm)
|
|
2549
|
+
else:
|
|
2550
|
+
pp = SuffixProject(args=config, llm=llm, file_filter=None)
|
|
2551
|
+
pp.run()
|
|
2552
|
+
sources = pp.sources
|
|
2553
|
+
source_code_list = build_index_and_filter_files(llm=llm, args=config, sources=sources)
|
|
2554
|
+
return source_code_list
|
|
2557
2555
|
|
|
2558
2556
|
def list_files():
|
|
2559
2557
|
console = Console()
|
autocoder/chat_auto_coder.py
CHANGED
|
@@ -474,16 +474,14 @@ def main():
|
|
|
474
474
|
plugin_name, handler, args = plugin_result
|
|
475
475
|
if handler:
|
|
476
476
|
handler(*args)
|
|
477
|
-
continue
|
|
478
|
-
|
|
479
|
-
event_file, file_id = gengerate_event_file_path()
|
|
480
|
-
configure(f"event_file:{event_file}")
|
|
481
|
-
|
|
477
|
+
continue
|
|
482
478
|
if (
|
|
483
479
|
memory["mode"] == "auto_detect"
|
|
484
480
|
and user_input
|
|
485
481
|
and not user_input.startswith("/")
|
|
486
482
|
):
|
|
483
|
+
event_file, file_id = gengerate_event_file_path()
|
|
484
|
+
configure(f"event_file:{event_file}")
|
|
487
485
|
auto_command(user_input)
|
|
488
486
|
|
|
489
487
|
elif memory["mode"] == "voice_input" and not user_input.startswith("/"):
|
|
@@ -592,12 +590,16 @@ def main():
|
|
|
592
590
|
raise EOFError()
|
|
593
591
|
|
|
594
592
|
elif user_input.startswith("/coding"):
|
|
593
|
+
event_file, file_id = gengerate_event_file_path()
|
|
594
|
+
configure(f"event_file:{event_file}")
|
|
595
595
|
query = user_input[len("/coding") :].strip()
|
|
596
596
|
if not query:
|
|
597
597
|
print("\033[91mPlease enter your request.\033[0m")
|
|
598
598
|
continue
|
|
599
599
|
coding(query)
|
|
600
600
|
elif user_input.startswith("/chat"):
|
|
601
|
+
event_file, file_id = gengerate_event_file_path()
|
|
602
|
+
configure(f"event_file:{event_file}")
|
|
601
603
|
query = user_input[len("/chat") :].strip()
|
|
602
604
|
if not query:
|
|
603
605
|
print("\033[91mPlease enter your request.\033[0m")
|
|
@@ -653,6 +655,8 @@ def main():
|
|
|
653
655
|
print("Please enter a shell command to execute.")
|
|
654
656
|
else:
|
|
655
657
|
if command.startswith("/chat"):
|
|
658
|
+
event_file, file_id = gengerate_event_file_path()
|
|
659
|
+
configure(f"event_file:{event_file}")
|
|
656
660
|
command = command[len("/chat") :].strip()
|
|
657
661
|
gen_and_exec_shell_command(command)
|
|
658
662
|
else:
|
|
@@ -13,7 +13,7 @@ from autocoder.common import sys_prompt
|
|
|
13
13
|
from autocoder.privacy.model_filter import ModelPathFilter
|
|
14
14
|
from autocoder.common.utils_code_auto_generate import chat_with_continue, stream_chat_with_continue, ChatWithContinueResult
|
|
15
15
|
from autocoder.utils.auto_coder_utils.chat_stream_out import stream_out
|
|
16
|
-
from autocoder.common.stream_out_type import
|
|
16
|
+
from autocoder.common.stream_out_type import LintStreamOutType
|
|
17
17
|
from autocoder.common.auto_coder_lang import get_message_with_format
|
|
18
18
|
from autocoder.common.printer import Printer
|
|
19
19
|
from autocoder.rag.token_counter import count_tokens
|
|
@@ -28,6 +28,9 @@ from loguru import logger
|
|
|
28
28
|
from autocoder.common.global_cancel import global_cancel
|
|
29
29
|
from autocoder.linters.models import ProjectLintResult
|
|
30
30
|
from autocoder.common.token_cost_caculate import TokenCostCalculator
|
|
31
|
+
from autocoder.events.event_manager_singleton import get_event_manager
|
|
32
|
+
from autocoder.events.event_types import Event, EventType, EventMetadata
|
|
33
|
+
from autocoder.events import event_content as EventContentCreator
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
class CodeEditBlockManager:
|
|
@@ -116,7 +119,7 @@ class CodeEditBlockManager:
|
|
|
116
119
|
file_issues = []
|
|
117
120
|
|
|
118
121
|
for issue in result.issues:
|
|
119
|
-
if issue.severity.value in levels:
|
|
122
|
+
if issue.severity.value not in levels:
|
|
120
123
|
continue
|
|
121
124
|
|
|
122
125
|
if not file_has_issues:
|
|
@@ -226,6 +229,20 @@ class CodeEditBlockManager:
|
|
|
226
229
|
error_count=error_count,
|
|
227
230
|
formatted_issues=formatted_issues
|
|
228
231
|
)
|
|
232
|
+
|
|
233
|
+
get_event_manager(self.args.event_file).add_event(Event(
|
|
234
|
+
event_type=EventType.RESULT,
|
|
235
|
+
content=EventContentCreator.create_result(
|
|
236
|
+
content=EventContentCreator.ResultContent(
|
|
237
|
+
content=f"Lint attempt {attempt + 1}/{self.max_correction_attempts}: Found {error_count} issues:\n {formatted_issues}",
|
|
238
|
+
metadata={}
|
|
239
|
+
)
|
|
240
|
+
).to_dict(),
|
|
241
|
+
metadata={
|
|
242
|
+
"stream_out_type": LintStreamOutType.LINT.value,
|
|
243
|
+
"action_file": self.args.file
|
|
244
|
+
}
|
|
245
|
+
))
|
|
229
246
|
|
|
230
247
|
if attempt == self.max_correction_attempts - 1:
|
|
231
248
|
self.printer.print_in_terminal("max_attempts_reached", style="yellow")
|
|
@@ -273,9 +290,11 @@ class CodeEditBlockManager:
|
|
|
273
290
|
返回:
|
|
274
291
|
CodeGenerateResult: 生成和修复的代码结果
|
|
275
292
|
"""
|
|
276
|
-
# 生成代码并自动修复lint错误
|
|
293
|
+
# 生成代码并自动修复lint错误
|
|
294
|
+
|
|
277
295
|
generation_result = self.generate_and_fix(query, source_code_list)
|
|
278
|
-
global_cancel.check_and_raise()
|
|
296
|
+
global_cancel.check_and_raise()
|
|
297
|
+
|
|
279
298
|
# 合并代码
|
|
280
299
|
self.code_merger.merge_code(generation_result)
|
|
281
300
|
|
autocoder/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.323"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|