auto-coder 0.1.300__py3-none-any.whl → 0.1.301__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.300.dist-info → auto_coder-0.1.301.dist-info}/METADATA +1 -1
- {auto_coder-0.1.300.dist-info → auto_coder-0.1.301.dist-info}/RECORD +14 -14
- autocoder/commands/auto_command.py +19 -8
- autocoder/common/__init__.py +4 -0
- autocoder/common/action_yml_file_manager.py +70 -5
- autocoder/common/code_auto_merge.py +14 -0
- autocoder/common/code_auto_merge_diff.py +14 -0
- autocoder/common/code_auto_merge_editblock.py +14 -0
- autocoder/common/code_auto_merge_strict_diff.py +13 -0
- autocoder/version.py +1 -1
- {auto_coder-0.1.300.dist-info → auto_coder-0.1.301.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.300.dist-info → auto_coder-0.1.301.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.300.dist-info → auto_coder-0.1.301.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.300.dist-info → auto_coder-0.1.301.dist-info}/top_level.txt +0 -0
|
@@ -13,7 +13,7 @@ autocoder/command_args.py,sha256=9aYJ-AmPxP1sQh6ciw04FWHjSn31f2W9afXFwo8wgx4,304
|
|
|
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
|
-
autocoder/version.py,sha256=
|
|
16
|
+
autocoder/version.py,sha256=8vsutezDX7FtnTgUbkxxSCmrd0M5CMXcXZ-buzH5bko,23
|
|
17
17
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
autocoder/agent/auto_demand_organizer.py,sha256=NWSAEsEk94vT3lGjfo25kKLMwYdPcpy9e-i21txPasQ,6942
|
|
19
19
|
autocoder/agent/auto_filegroup.py,sha256=CW7bqp0FW1GIEMnl-blyAc2UGT7O9Mom0q66ITz1ckM,6635
|
|
@@ -27,13 +27,13 @@ autocoder/agent/planner.py,sha256=SZTSZHxHzDmuWZo3K5fs79RwvJLWurg-nbJRRNbX65o,91
|
|
|
27
27
|
autocoder/agent/project_reader.py,sha256=tWLaPoLw1gI6kO_NzivQj28KbobU2ceOLuppHMbfGl8,18234
|
|
28
28
|
autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
29
|
autocoder/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
autocoder/commands/auto_command.py,sha256=
|
|
30
|
+
autocoder/commands/auto_command.py,sha256=OqylAd4lLheVEk0XeYb85uBlWP8R6xQqW8_rKcDVEpQ,57616
|
|
31
31
|
autocoder/commands/auto_web.py,sha256=_449f4rCoRG7Sv0SB0hIBRFLPLPJ5DgWW4DlI22a3XY,39383
|
|
32
32
|
autocoder/commands/tools.py,sha256=4cNm_Mpjk9WNfSmKU7W0OjA89OqPC1mh8rSoSl8m4OE,27253
|
|
33
33
|
autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
|
|
34
34
|
autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
|
|
35
|
-
autocoder/common/__init__.py,sha256=
|
|
36
|
-
autocoder/common/action_yml_file_manager.py,sha256=
|
|
35
|
+
autocoder/common/__init__.py,sha256=Do0ESMUr8OKZgOaD-9HpZh6cNJkWwFfL9QEgB8bxmaA,13893
|
|
36
|
+
autocoder/common/action_yml_file_manager.py,sha256=0hXoG2kyYj_88hOk081TVw-7zm1ZQ3SohGFSTB_IJSE,15252
|
|
37
37
|
autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
|
|
38
38
|
autocoder/common/anything2img.py,sha256=iZQmg8srXlD7N5uGl5b_ONKJMBjYoW8kPmokkG6ISF0,10118
|
|
39
39
|
autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
|
|
@@ -47,10 +47,10 @@ autocoder/common/code_auto_generate.py,sha256=i0f0BPTvt8QN5-arC2PqfMs4sukGJqFw58
|
|
|
47
47
|
autocoder/common/code_auto_generate_diff.py,sha256=EYGHf24fVAk3M8kXllXukdUvzo2I2Fb8qNrTiU_Qtug,18759
|
|
48
48
|
autocoder/common/code_auto_generate_editblock.py,sha256=1XmoLZl-XrrPOyHkSfqe0pOxi0Lp4d69oDQX6zzqs_c,20523
|
|
49
49
|
autocoder/common/code_auto_generate_strict_diff.py,sha256=68fAks4S6Hz0wAeXrdI1PjdeCiy0gXRhgEeIlgxB04E,17539
|
|
50
|
-
autocoder/common/code_auto_merge.py,sha256=
|
|
51
|
-
autocoder/common/code_auto_merge_diff.py,sha256=
|
|
52
|
-
autocoder/common/code_auto_merge_editblock.py,sha256=
|
|
53
|
-
autocoder/common/code_auto_merge_strict_diff.py,sha256=
|
|
50
|
+
autocoder/common/code_auto_merge.py,sha256=QsK4wdPxmxVDtIuaTGVhCEmLHYSVX0oa-Gq3xCoSd6g,9460
|
|
51
|
+
autocoder/common/code_auto_merge_diff.py,sha256=dHvgVk4V7O2J31d1JVnXezHcfvuhrS68poUvzDLRYUg,18770
|
|
52
|
+
autocoder/common/code_auto_merge_editblock.py,sha256=bx32Ew9Ih-cNqdbUlcczvNi1hAtYnxKyEtle-NqE04E,21229
|
|
53
|
+
autocoder/common/code_auto_merge_strict_diff.py,sha256=z6gt7an81xlE_Xdaw0jZD_qf093_V0FI78hkbdzP980,12921
|
|
54
54
|
autocoder/common/code_modification_ranker.py,sha256=e1i8oNPN_PfG4O8HQnQWxh9tyOd-ur6jFTXfkHPVXYo,13152
|
|
55
55
|
autocoder/common/command_completer.py,sha256=xuCxYGKDccaozmzB6p3q0QI6mlzyM180g9mnVG5zvIk,35284
|
|
56
56
|
autocoder/common/command_generator.py,sha256=t1o1d7xEyfnPvY_MpG5usyx0eKW7WCUR0urKoqCex60,2761
|
|
@@ -185,9 +185,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
185
185
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
186
186
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=lkJ_A-sYU36JMzjFWkk3pR6uos8oZHYt9GPsPe_CPAo,11766
|
|
187
187
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
188
|
-
auto_coder-0.1.
|
|
189
|
-
auto_coder-0.1.
|
|
190
|
-
auto_coder-0.1.
|
|
191
|
-
auto_coder-0.1.
|
|
192
|
-
auto_coder-0.1.
|
|
193
|
-
auto_coder-0.1.
|
|
188
|
+
auto_coder-0.1.301.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
189
|
+
auto_coder-0.1.301.dist-info/METADATA,sha256=U4lqu_7Roy09MdHghi_sNNQy0QSEq69xxPOxzEULgHo,2689
|
|
190
|
+
auto_coder-0.1.301.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
191
|
+
auto_coder-0.1.301.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
192
|
+
auto_coder-0.1.301.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
193
|
+
auto_coder-0.1.301.dist-info/RECORD,,
|
|
@@ -25,7 +25,7 @@ from autocoder.common.auto_configure import config_readme
|
|
|
25
25
|
from autocoder.utils.auto_project_type import ProjectTypeAnalyzer
|
|
26
26
|
from rich.text import Text
|
|
27
27
|
from autocoder.common.mcp_server import get_mcp_server,McpServerInfoRequest
|
|
28
|
-
|
|
28
|
+
from autocoder.common.action_yml_file_manager import ActionYmlFileManager
|
|
29
29
|
class CommandMessage(BaseModel):
|
|
30
30
|
role: str
|
|
31
31
|
content: str
|
|
@@ -41,14 +41,17 @@ class CommandConversation(BaseModel):
|
|
|
41
41
|
current_conversation: List[CommandMessage]
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
def load_memory_file() -> CommandConversation:
|
|
45
|
-
"""Load command conversations from memory file"""
|
|
44
|
+
def load_memory_file(args: AutoCoderArgs) -> CommandConversation:
|
|
45
|
+
"""Load command conversations from memory file"""
|
|
46
|
+
|
|
46
47
|
memory_dir = os.path.join(".auto-coder", "memory")
|
|
47
48
|
file_path = os.path.join(memory_dir, "command_chat_history.json")
|
|
48
49
|
if os.path.exists(file_path):
|
|
49
50
|
with open(file_path, "r", encoding="utf-8") as f:
|
|
50
51
|
try:
|
|
51
|
-
|
|
52
|
+
conversation = CommandConversation.model_validate_json(f.read())
|
|
53
|
+
conversation.current_conversation = conversation.current_conversation
|
|
54
|
+
return conversation
|
|
52
55
|
except Exception:
|
|
53
56
|
return CommandConversation(history={}, current_conversation=[])
|
|
54
57
|
return CommandConversation(history={}, current_conversation=[])
|
|
@@ -174,8 +177,8 @@ class CommandAutoTuner:
|
|
|
174
177
|
|
|
175
178
|
def get_conversations(self) -> List[CommandMessage]:
|
|
176
179
|
"""Get conversation history from memory file"""
|
|
177
|
-
conversation = load_memory_file()
|
|
178
|
-
return [
|
|
180
|
+
conversation = load_memory_file(args=self.args)
|
|
181
|
+
return [command_message.message for command_message in conversation.current_conversation]
|
|
179
182
|
|
|
180
183
|
@byzerllm.prompt()
|
|
181
184
|
def _analyze(self, request: AutoCommandRequest) -> str:
|
|
@@ -284,7 +287,7 @@ class CommandAutoTuner:
|
|
|
284
287
|
"command_combination_readme": self._command_combination_readme.prompt()
|
|
285
288
|
}
|
|
286
289
|
|
|
287
|
-
|
|
290
|
+
@byzerllm.prompt()
|
|
288
291
|
def _command_combination_readme(self) -> str:
|
|
289
292
|
"""
|
|
290
293
|
<function_combination_readme>
|
|
@@ -350,8 +353,16 @@ class CommandAutoTuner:
|
|
|
350
353
|
# 获取 prompt 内容
|
|
351
354
|
prompt = self._analyze.prompt(request)
|
|
352
355
|
|
|
356
|
+
# 获取对当前项目变更的最近8条历史人物
|
|
357
|
+
action_yml_file_manager = ActionYmlFileManager(self.args.source_dir)
|
|
358
|
+
history_tasks = action_yml_file_manager.to_tasks_prompt(limit=8)
|
|
359
|
+
new_messages = []
|
|
360
|
+
if self.args.enable_task_history:
|
|
361
|
+
new_messages.append({"role": "user", "content": history_tasks})
|
|
362
|
+
new_messages.append({"role": "assistant", "content": "好的,我知道最近的任务对项目的变更了,我会参考这些来更好的理解你的需求。"})
|
|
363
|
+
|
|
353
364
|
# 构造对话上下文
|
|
354
|
-
conversations = [{"role": "user", "content": prompt}]
|
|
365
|
+
conversations = new_messages + [{"role": "user", "content": prompt}]
|
|
355
366
|
|
|
356
367
|
# 使用 stream_out 进行输出
|
|
357
368
|
printer = Printer()
|
autocoder/common/__init__.py
CHANGED
|
@@ -5,7 +5,7 @@ import git
|
|
|
5
5
|
from typing import List, Dict, Tuple, Optional, Union, Any
|
|
6
6
|
from loguru import logger
|
|
7
7
|
from autocoder.common.printer import Printer
|
|
8
|
-
|
|
8
|
+
import byzerllm
|
|
9
9
|
|
|
10
10
|
class ActionYmlFileManager:
|
|
11
11
|
"""
|
|
@@ -19,15 +19,15 @@ class ActionYmlFileManager:
|
|
|
19
19
|
- 处理 commit 消息与 YAML 文件的关联
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
-
def __init__(self, source_dir: str):
|
|
22
|
+
def __init__(self, source_dir: Optional[str] = None):
|
|
23
23
|
"""
|
|
24
24
|
初始化 ActionYmlFileManager
|
|
25
25
|
|
|
26
26
|
Args:
|
|
27
27
|
source_dir: 项目根目录
|
|
28
28
|
"""
|
|
29
|
-
self.source_dir = source_dir
|
|
30
|
-
self.actions_dir = os.path.join(source_dir, "actions")
|
|
29
|
+
self.source_dir = source_dir or os.getcwd()
|
|
30
|
+
self.actions_dir = os.path.join(self.source_dir, "actions")
|
|
31
31
|
self.printer = Printer()
|
|
32
32
|
|
|
33
33
|
def ensure_actions_dir(self) -> bool:
|
|
@@ -364,4 +364,69 @@ class ActionYmlFileManager:
|
|
|
364
364
|
yaml_content['file_name'] = file_name
|
|
365
365
|
history_tasks.append(yaml_content)
|
|
366
366
|
|
|
367
|
-
return history_tasks
|
|
367
|
+
return history_tasks
|
|
368
|
+
|
|
369
|
+
@byzerllm.prompt()
|
|
370
|
+
def _to_tasks_prompt(self, history_tasks: List[Dict]) -> str:
|
|
371
|
+
"""
|
|
372
|
+
<history_tasks>
|
|
373
|
+
最近的任务历史记录,从最新到最旧排序:
|
|
374
|
+
|
|
375
|
+
{% for task in history_tasks %}
|
|
376
|
+
## 任务 {{ loop.index }}: {{ task.file_name }}
|
|
377
|
+
|
|
378
|
+
{% if task.query %}
|
|
379
|
+
**用户需求**: {{ task.query }}
|
|
380
|
+
{% endif %}
|
|
381
|
+
|
|
382
|
+
{% if task.urls %}
|
|
383
|
+
**用户提供的相关文件**:
|
|
384
|
+
{% if task.urls is string %}
|
|
385
|
+
- {{ task.urls }}
|
|
386
|
+
{% else %}
|
|
387
|
+
{% for url in task.urls %}
|
|
388
|
+
- {{ url }}
|
|
389
|
+
{% endfor %}
|
|
390
|
+
{% endif %}
|
|
391
|
+
{% endif %}
|
|
392
|
+
|
|
393
|
+
{% if task.dynamic_urls %}
|
|
394
|
+
**系统提取的相关文件**:
|
|
395
|
+
{% if task.dynamic_urls is string %}
|
|
396
|
+
- {{ task.dynamic_urls }}
|
|
397
|
+
{% else %}
|
|
398
|
+
{% for url in task.dynamic_urls %}
|
|
399
|
+
- {{ url }}
|
|
400
|
+
{% endfor %}
|
|
401
|
+
{% endif %}
|
|
402
|
+
{% endif %}
|
|
403
|
+
|
|
404
|
+
{% if task.add_updated_urls %}
|
|
405
|
+
**变更的文件**:
|
|
406
|
+
{% if task.add_updated_urls is string %}
|
|
407
|
+
- {{ task.add_updated_urls }}
|
|
408
|
+
{% else %}
|
|
409
|
+
{% for url in task.add_updated_urls %}
|
|
410
|
+
- {{ url }}
|
|
411
|
+
{% endfor %}
|
|
412
|
+
{% endif %}
|
|
413
|
+
{% endif %}
|
|
414
|
+
|
|
415
|
+
{% if task.how_to_reproduce %}
|
|
416
|
+
**变更过程**:
|
|
417
|
+
```
|
|
418
|
+
{{ task.how_to_reproduce }}
|
|
419
|
+
```
|
|
420
|
+
{% endif %}
|
|
421
|
+
|
|
422
|
+
{% if not loop.last %}
|
|
423
|
+
---
|
|
424
|
+
{% endif %}
|
|
425
|
+
{% endfor %}
|
|
426
|
+
</history_tasks>
|
|
427
|
+
请注意上述历史任务记录,以便更好地理解当前用户需求的上下文和连续性。
|
|
428
|
+
"""
|
|
429
|
+
|
|
430
|
+
def to_tasks_prompt(self, limit: int = 5) -> str:
|
|
431
|
+
history_tasks = self.parse_history_tasks(limit)
|
|
432
|
+
return self._to_tasks_prompt.prompt(history_tasks)
|
|
@@ -10,6 +10,7 @@ import hashlib
|
|
|
10
10
|
from autocoder.common import files as FileUtils
|
|
11
11
|
from autocoder.common.printer import Printer
|
|
12
12
|
from autocoder.common.auto_coder_lang import get_message
|
|
13
|
+
from autocoder.common.action_yml_file_manager import ActionYmlFileManager
|
|
13
14
|
|
|
14
15
|
class PathAndCode(pydantic.BaseModel):
|
|
15
16
|
path: str
|
|
@@ -197,4 +198,17 @@ class CodeAutoMerge:
|
|
|
197
198
|
self.printer.print_in_terminal("files_merged", total=total)
|
|
198
199
|
if not force_skip_git and not self.args.skip_commit:
|
|
199
200
|
commit_result = git_utils.commit_changes(self.args.source_dir, f"{self.args.query}\nauto_coder_{file_name}_{md5}")
|
|
201
|
+
|
|
202
|
+
action_yml_file_manager = ActionYmlFileManager(self.args.source_dir)
|
|
203
|
+
action_file_name = os.path.basename(self.args.file)
|
|
204
|
+
add_updated_urls = []
|
|
205
|
+
commit_result.changed_files
|
|
206
|
+
for file in commit_result.changed_files:
|
|
207
|
+
add_updated_urls.append(os.path.join(self.args.source_dir, file))
|
|
208
|
+
|
|
209
|
+
self.args.add_updated_urls = add_updated_urls
|
|
210
|
+
update_yaml_success = action_yml_file_manager.update_yaml_field(action_file_name, "add_updated_urls", add_updated_urls)
|
|
211
|
+
if not update_yaml_success:
|
|
212
|
+
self.printer.print_in_terminal("yaml_save_error", style="red", yaml_file=action_file_name)
|
|
213
|
+
|
|
200
214
|
git_utils.print_commit_info(commit_result=commit_result)
|
|
@@ -4,6 +4,7 @@ from autocoder.common import AutoCoderArgs,git_utils
|
|
|
4
4
|
from typing import List,Union,Tuple
|
|
5
5
|
import pydantic
|
|
6
6
|
import byzerllm
|
|
7
|
+
from autocoder.common.action_yml_file_manager import ActionYmlFileManager
|
|
7
8
|
from autocoder.common.printer import Printer
|
|
8
9
|
import hashlib
|
|
9
10
|
from pathlib import Path
|
|
@@ -580,6 +581,19 @@ class CodeAutoMergeDiff:
|
|
|
580
581
|
self.printer.print_in_terminal("files_merged_total", total=total)
|
|
581
582
|
if not force_skip_git and not self.args.skip_commit:
|
|
582
583
|
commit_result = git_utils.commit_changes(self.args.source_dir, f"{self.args.query}\nauto_coder_{file_name}_{md5}")
|
|
584
|
+
|
|
585
|
+
action_yml_file_manager = ActionYmlFileManager(self.args.source_dir)
|
|
586
|
+
action_file_name = os.path.basename(self.args.file)
|
|
587
|
+
add_updated_urls = []
|
|
588
|
+
commit_result.changed_files
|
|
589
|
+
for file in commit_result.changed_files:
|
|
590
|
+
add_updated_urls.append(os.path.join(self.args.source_dir, file))
|
|
591
|
+
|
|
592
|
+
self.args.add_updated_urls = add_updated_urls
|
|
593
|
+
update_yaml_success = action_yml_file_manager.update_yaml_field(action_file_name, "add_updated_urls", add_updated_urls)
|
|
594
|
+
if not update_yaml_success:
|
|
595
|
+
self.printer.print_in_terminal("yaml_save_error", style="red", yaml_file=action_file_name)
|
|
596
|
+
|
|
583
597
|
git_utils.print_commit_info(commit_result=commit_result)
|
|
584
598
|
else:
|
|
585
599
|
# Print edits for review
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from byzerllm.utils.client import code_utils
|
|
3
3
|
from autocoder.common import AutoCoderArgs, git_utils
|
|
4
|
+
from autocoder.common.action_yml_file_manager import ActionYmlFileManager
|
|
4
5
|
from autocoder.common.text import TextSimilarity
|
|
5
6
|
from autocoder.utils.queue_communicate import (
|
|
6
7
|
queue_communicate,
|
|
@@ -428,6 +429,19 @@ class CodeAutoMergeEditBlock:
|
|
|
428
429
|
self.args.source_dir,
|
|
429
430
|
f"{self.args.query}\nauto_coder_{file_name}_{md5}",
|
|
430
431
|
)
|
|
432
|
+
|
|
433
|
+
action_yml_file_manager = ActionYmlFileManager(self.args.source_dir)
|
|
434
|
+
action_file_name = os.path.basename(self.args.file)
|
|
435
|
+
add_updated_urls = []
|
|
436
|
+
commit_result.changed_files
|
|
437
|
+
for file in commit_result.changed_files:
|
|
438
|
+
add_updated_urls.append(os.path.join(self.args.source_dir, file))
|
|
439
|
+
|
|
440
|
+
self.args.add_updated_urls = add_updated_urls
|
|
441
|
+
update_yaml_success = action_yml_file_manager.update_yaml_field(action_file_name, "add_updated_urls", add_updated_urls)
|
|
442
|
+
if not update_yaml_success:
|
|
443
|
+
self.printer.print_in_terminal("yaml_save_error", style="red", yaml_file=action_file_name)
|
|
444
|
+
|
|
431
445
|
git_utils.print_commit_info(commit_result=commit_result)
|
|
432
446
|
except Exception as e:
|
|
433
447
|
self.printer.print_str_in_terminal(
|
|
@@ -5,6 +5,7 @@ from autocoder.common import AutoCoderArgs, git_utils
|
|
|
5
5
|
from typing import List,Tuple
|
|
6
6
|
import pydantic
|
|
7
7
|
import byzerllm
|
|
8
|
+
from autocoder.common.action_yml_file_manager import ActionYmlFileManager
|
|
8
9
|
from autocoder.common.printer import Printer
|
|
9
10
|
import hashlib
|
|
10
11
|
from pathlib import Path
|
|
@@ -288,6 +289,18 @@ class CodeAutoMergeStrictDiff:
|
|
|
288
289
|
commit_result = git_utils.commit_changes(
|
|
289
290
|
self.args.source_dir, f"{self.args.query}\nauto_coder_{file_name}_{md5}"
|
|
290
291
|
)
|
|
292
|
+
action_yml_file_manager = ActionYmlFileManager(self.args.source_dir)
|
|
293
|
+
action_file_name = os.path.basename(self.args.file)
|
|
294
|
+
add_updated_urls = []
|
|
295
|
+
commit_result.changed_files
|
|
296
|
+
for file in commit_result.changed_files:
|
|
297
|
+
add_updated_urls.append(os.path.join(self.args.source_dir, file))
|
|
298
|
+
|
|
299
|
+
self.args.add_updated_urls = add_updated_urls
|
|
300
|
+
update_yaml_success = action_yml_file_manager.update_yaml_field(action_file_name, "add_updated_urls", add_updated_urls)
|
|
301
|
+
if not update_yaml_success:
|
|
302
|
+
self.printer.print_in_terminal("yaml_save_error", style="red", yaml_file=action_file_name)
|
|
303
|
+
|
|
291
304
|
git_utils.print_commit_info(commit_result=commit_result)
|
|
292
305
|
else:
|
|
293
306
|
# Print diff blocks for review
|
autocoder/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.301"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|