auto-coder 0.1.299__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.

@@ -3,17 +3,21 @@ from typing import Optional
3
3
  import subprocess
4
4
  import shutil
5
5
  from loguru import logger
6
+ from autocoder.common.action_yml_file_manager import ActionYmlFileManager
6
7
 
7
8
  def get_last_yaml_file(actions_dir:str)->Optional[str]:
8
- action_files = [
9
- f for f in os.listdir(actions_dir) if f[:3].isdigit() and "_" in f and f.endswith(".yml")
10
- ]
11
-
12
- def get_old_seq(name):
13
- return int(name.split("_")[0])
14
-
15
- sorted_action_files = sorted(action_files, key=get_old_seq)
16
- return sorted_action_files[-1] if sorted_action_files else None
9
+ """
10
+ 获取最新的 YAML 文件
11
+
12
+ Args:
13
+ actions_dir: actions 目录路径
14
+
15
+ Returns:
16
+ Optional[str]: 最新的 YAML 文件名,如果没有则返回 None
17
+ """
18
+ # 兼容已有代码,创建临时 ActionYmlFileManager
19
+ action_manager = ActionYmlFileManager(os.path.dirname(actions_dir))
20
+ return action_manager.get_latest_action_file()
17
21
 
18
22
  def open_yaml_file_in_editor(new_file:str):
19
23
  try:
autocoder/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.299"
1
+ __version__ = "0.1.301"