auto-coder 0.1.342__py3-none-any.whl → 0.1.344__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: auto-coder
3
- Version: 0.1.342
3
+ Version: 0.1.344
4
4
  Summary: AutoCoder: AutoCoder
5
5
  Author: allwefantasy
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -14,7 +14,7 @@ autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,1
14
14
  autocoder/lang.py,sha256=PFtATuOhHRnfpqHQkXr6p4C893JvpsgwTMif3l-GEi0,14321
15
15
  autocoder/models.py,sha256=_SCar82QIeBFTZZBdM2jPS6atKVhHnvE0gX3V0CsxD4,11590
16
16
  autocoder/run_context.py,sha256=IUfSO6_gp2Wt1blFWAmOpN0b0nDrTTk4LmtCYUBIoro,1643
17
- autocoder/version.py,sha256=EolTlQKlIqZEveTaGm_5Y3zX1HFWEe5tn-3pZ2Yg2Yk,23
17
+ autocoder/version.py,sha256=0IbmbEY0zOBghpsboGY0La9spRPSLxD1p5QDr2CBCHY,23
18
18
  autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  autocoder/agent/agentic_edit.py,sha256=XsfePZ-t6M-uBSdG1VLZXk1goqXk2HPeJ_A8IYyBuWQ,58896
20
20
  autocoder/agent/agentic_edit_types.py,sha256=oFcDd_cxJ2yH9Ed1uTpD3BipudgoIEWDMPb5pAkq4gI,3288
@@ -44,9 +44,9 @@ autocoder/agent/agentic_edit_tools/use_mcp_tool_resolver.py,sha256=5WWH8-lEZO29d
44
44
  autocoder/agent/agentic_edit_tools/write_to_file_tool_resolver.py,sha256=HPX1g7Nh7H8I3P2MNmIK4HXLh8IZYaedQgRZAeGxNdc,5135
45
45
  autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
46
  autocoder/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- autocoder/commands/auto_command.py,sha256=jz_I1nuELIDM7-hFPQt_9DBS0R8N7IxmE79BL3AHGBY,64216
47
+ autocoder/commands/auto_command.py,sha256=Ogg-mj7lnGBnBzebnYjszvZ8-cxgdl3qJSW9niidhiY,64678
48
48
  autocoder/commands/auto_web.py,sha256=Cc0eb6JN3SvFy3GD_lpSLvIqj7F1eFDTcwg1t-zDcKg,39024
49
- autocoder/commands/tools.py,sha256=BqQaHVgOJfS1uWRw_hgSldMc44qnEjxVNk8JI0OiMCg,33762
49
+ autocoder/commands/tools.py,sha256=iET_nL8Zn0oK-vIZLZT8y3Zh4ljCTuoJlaOOYVEaKvY,33693
50
50
  autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
51
51
  autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
52
52
  autocoder/common/__init__.py,sha256=U6oImbo5n_sLcFLS7ZAMZqnCc-3DYeVYD9K6r1V7mSk,14601
@@ -126,7 +126,7 @@ autocoder/common/v2/code_editblock_manager.py,sha256=G0CIuV9Ki0FqMLnpA8nBT4pnkCN
126
126
  autocoder/common/v2/code_manager.py,sha256=C403bS-f6urixwitlKHcml-J03hci-UyNwHJOqBiY6Q,9182
127
127
  autocoder/common/v2/code_strict_diff_manager.py,sha256=v-J1kDyLg7tLGg_6_lbO9S4fNkx7M_L8Xr2G7fPptiU,9347
128
128
  autocoder/common/v2/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
129
- autocoder/common/v2/agent/agentic_edit.py,sha256=Nw2rXRMhiPzrd69eRuZOzbHYY_Qk9Ph4WiERU2Zqwec,91585
129
+ autocoder/common/v2/agent/agentic_edit.py,sha256=oqEMULpRjHOsqoeFI4rjQHUjaitYZIsgEwTZhp78Xeg,91682
130
130
  autocoder/common/v2/agent/agentic_edit_conversation.py,sha256=qLLhTegH619JQTp3s1bj5FVn2hAcoV-DlhGO3UyIOMc,7338
131
131
  autocoder/common/v2/agent/agentic_edit_types.py,sha256=6qBLLmvdlcsbzrpMHsYQVIHqbOWubMXOnmkqTs1pBWQ,4629
132
132
  autocoder/common/v2/agent/agentic_tool_display.py,sha256=WKirt-2V346KLnbHgH3NVJiK3xvriD9oaCWj2IdvzLU,7309
@@ -276,9 +276,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
276
276
  autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
277
277
  autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=KW0mlmcHlStXi8-_6fXZ2-ifeJ5mgP0OV7DQFzCtIsw,14008
278
278
  autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
279
- auto_coder-0.1.342.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
280
- auto_coder-0.1.342.dist-info/METADATA,sha256=X_VZm5Bu13vhsbigTQzgyiMGwH3q9cmZkouvkn-S-0k,2728
281
- auto_coder-0.1.342.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
282
- auto_coder-0.1.342.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
283
- auto_coder-0.1.342.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
284
- auto_coder-0.1.342.dist-info/RECORD,,
279
+ auto_coder-0.1.344.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
280
+ auto_coder-0.1.344.dist-info/METADATA,sha256=g-mR3QxVTRm1gl4iC9LNSvTjYzIFre3tpp8oxs5Qeg0,2728
281
+ auto_coder-0.1.344.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
282
+ auto_coder-0.1.344.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
283
+ auto_coder-0.1.344.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
284
+ auto_coder-0.1.344.dist-info/RECORD,,
@@ -787,11 +787,10 @@ class CommandAutoTuner:
787
787
  <name>list_files</name>
788
788
  <description>list_files 查看某个目录下的所有文件</description>
789
789
  <usage>
790
- 该命令不需要任何参数,直接使用即可。
791
- 使用例子:
792
-
793
- list_files()
794
-
790
+ 该工具用于列出指定目录下的所有文件(不包括子目录中的文件)。
791
+ 输入参数 path: 要列出文件的目录路径
792
+ 返回值是目录下所有文件的列表,以换行符分隔
793
+ list_files(path="/tmp")
795
794
  </usage>
796
795
  </command>
797
796
 
@@ -1529,3 +1528,10 @@ class CommandAutoTuner:
1529
1528
  query=f"Command: {command} Parameters: {json.dumps(parameters) if parameters else 'None'}",
1530
1529
  response=f"Command execution failed: {error_msg}"
1531
1530
  )
1531
+
1532
+ self.result_manager = ResultManager()
1533
+ result = f"command {command} with parameters {parameters} execution failed with error {error_msg}"
1534
+ self.result_manager.add_result(content=result, meta={
1535
+ "action": command,
1536
+ "input": parameters
1537
+ })
@@ -655,7 +655,7 @@ class AutoCommandTools:
655
655
  该工具用于列出指定目录下的所有文件(不包括子目录中的文件)。
656
656
  输入参数 path: 要列出文件的目录路径
657
657
  返回值是目录下所有文件的列表,以逗号分隔。
658
- """
658
+ """
659
659
  # 处理绝对路径和相对路径
660
660
  target_path = path
661
661
  if not os.path.isabs(path):
@@ -687,12 +687,10 @@ class AutoCommandTools:
687
687
  file_list = []
688
688
  for item in os.listdir(target_path):
689
689
  item_path = os.path.join(target_path, item)
690
- # 只添加文件,不添加目录
691
- if os.path.isfile(item_path):
692
- file_list.append(item_path)
690
+ file_list.append(item_path)
693
691
 
694
692
  # 生成以逗号分隔的文件列表
695
- result = ",".join(file_list)
693
+ result = "\n".join(file_list)
696
694
 
697
695
  # 记录结果
698
696
  self.result_manager.add_result(content=result, meta={
@@ -1113,7 +1113,7 @@ class AgenticEdit:
1113
1113
  for agent_event in event_stream:
1114
1114
  content = None
1115
1115
  metadata = EventMetadata(
1116
- action_file=self.args.event_file,
1116
+ action_file=self.args.file,
1117
1117
  is_streaming=False,
1118
1118
  stream_out_type="/agent/edit")
1119
1119
 
@@ -1189,6 +1189,8 @@ class AgenticEdit:
1189
1189
  first_token_time=last_meta.first_token_time,
1190
1190
  input_tokens=last_meta.input_tokens_count,
1191
1191
  output_tokens=last_meta.generated_tokens_count,
1192
+ input_cost=input_cost,
1193
+ output_cost=output_cost
1192
1194
  ).to_dict()),metadata=metadata.to_dict())
1193
1195
 
1194
1196
  elif isinstance(agent_event, CompletionEvent):
autocoder/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.342"
1
+ __version__ = "0.1.344"