auto-coder 0.1.313__py3-none-any.whl → 0.1.315__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: auto-coder
3
- Version: 0.1.313
3
+ Version: 0.1.315
4
4
  Summary: AutoCoder: AutoCoder
5
5
  Author: allwefantasy
6
6
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -4,7 +4,7 @@ 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=ic8ZRGpyuhFNOl4tUVLhSmibOKHNXJudGwsiSjyW--Q,107324
7
+ autocoder/auto_coder_runner.py,sha256=KSknApsKdwGpv3R0VbFfEoyaq1KXAV-BC29oYQOYhAE,107367
8
8
  autocoder/auto_coder_server.py,sha256=E3Z829TPSooRSNhuh3_x9yaZi0f5G0Lm0ntoZhjGaoQ,20576
9
9
  autocoder/benchmark.py,sha256=Ypomkdzd1T3GE6dRICY3Hj547dZ6_inqJbBJIp5QMco,4423
10
10
  autocoder/chat_auto_coder.py,sha256=Cp5_m3pCxEDcRrVG1uojTfD8xecdl9FvYtD948TvLsg,25223
@@ -14,7 +14,7 @@ autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,1
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=O3BsbD2rT7pC9_mUbayTS658pf_QJpU1V9cCPbAITT0,23
17
+ autocoder/version.py,sha256=oUd9EIHW9z0ngi8UCDssrSs_Hmr8M7ImViaqI7Br3bc,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
@@ -118,6 +118,11 @@ autocoder/index/types.py,sha256=a2s_KV5FJlq7jqA2ELSo9E1sjuLwDB-JJYMhSpzBAhU,596
118
118
  autocoder/index/filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
119
  autocoder/index/filter/normal_filter.py,sha256=MI-8xdXCrniaxYCHVTLkq5tafvcUiauD3LN0b3ymRXI,8361
120
120
  autocoder/index/filter/quick_filter.py,sha256=ozESEgy506FQ5ecjOumyo4D_KMrterB1QLmnVtiyOiM,43264
121
+ autocoder/linters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
+ autocoder/linters/base_linter.py,sha256=1_0DPESnSyF3ZcQhoFkBYJylT5w-B61Rx-3A9uhuPlg,3066
123
+ autocoder/linters/code_linter.py,sha256=JylTj-Mj4jl9-XSH3PVlbQ4l55Y6E1FG-glv860CGSs,22462
124
+ autocoder/linters/linter_factory.py,sha256=JKX0D_E-mSK1aeltc0jyW9iRomk4b07VnvnhpoMy6sk,9633
125
+ autocoder/linters/python_linter.py,sha256=MYUkJxt2lUfb9Awpgut2kz95uP-Z-0jToLN4Bn46f48,22691
121
126
  autocoder/memory/__init__.py,sha256=5FeGvsesRViYL4BkFiHw9SdlyHeWlqALpTyqOpfnBRw,179
122
127
  autocoder/memory/active_context_manager.py,sha256=zeBOhOrlSeUU2-qaJPDCEGryJ5IorTrdsDoRJ3FHOac,33238
123
128
  autocoder/memory/active_package.py,sha256=ccTs5BTrbno0Ji2YHdNfA4j1JbBTuTCvpW5bLl5xfiY,25336
@@ -200,9 +205,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
200
205
  autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
201
206
  autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=xuBeWD0YOckqRo8JB1WkVIMOYH6c24m7JfV4svBfPDo,15113
202
207
  autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
203
- auto_coder-0.1.313.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
204
- auto_coder-0.1.313.dist-info/METADATA,sha256=-QD-1xqhvWFPOYOyHkK8QQCD8N6ocoSb2Qm1w3-b_pQ,2747
205
- auto_coder-0.1.313.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
206
- auto_coder-0.1.313.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
207
- auto_coder-0.1.313.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
208
- auto_coder-0.1.313.dist-info/RECORD,,
208
+ auto_coder-0.1.315.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
209
+ auto_coder-0.1.315.dist-info/METADATA,sha256=niXHfYClyecwZuoE1EB8cKAMzYv1Vkk7etV96vseDPo,2747
210
+ auto_coder-0.1.315.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
211
+ auto_coder-0.1.315.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
212
+ auto_coder-0.1.315.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
213
+ auto_coder-0.1.315.dist-info/RECORD,,
@@ -1557,32 +1557,28 @@ def coding(query: str):
1557
1557
  )
1558
1558
  )
1559
1559
 
1560
- if not os.path.exists(memory_file):
1561
- error_message()
1562
- return
1563
-
1564
- with open(memory_file, "r",encoding="utf-8") as f:
1565
- chat_history = json.load(f)
1566
-
1567
- if not chat_history["ask_conversation"]:
1568
- error_message()
1569
- return
1570
-
1571
- conversations = chat_history["ask_conversation"]
1572
-
1573
- yaml_config[
1574
- "context"
1575
- ] += f"下面是我们的历史对话,参考我们的历史对话从而更好的理解需求和修改代码: \n\n<history>\n"
1576
- for conv in conversations:
1577
- if conv["role"] == "user":
1578
- yaml_config["context"] += f"用户: {conv['content']}\n"
1579
- elif conv["role"] == "assistant":
1580
- yaml_config["context"] += f"你: {conv['content']}\n"
1581
- yaml_config["context"] += "</history>\n"
1582
-
1583
- yaml_content = convert_yaml_config_to_str(yaml_config=yaml_config)
1584
-
1585
- md5 = hashlib.md5(yaml_content.encode("utf-8")).hexdigest()
1560
+ conversations = []
1561
+ if os.path.exists(memory_file):
1562
+ with open(memory_file, "r",encoding="utf-8") as f:
1563
+ chat_history = json.load(f)
1564
+
1565
+ if not chat_history["ask_conversation"]:
1566
+ error_message()
1567
+ else:
1568
+ conversations = chat_history["ask_conversation"]
1569
+
1570
+ if conversations:
1571
+ yaml_config[
1572
+ "context"
1573
+ ] += f"下面是我们的历史对话,参考我们的历史对话从而更好的理解需求和修改代码: \n\n<history>\n"
1574
+ for conv in conversations:
1575
+ if conv["role"] == "user":
1576
+ yaml_config["context"] += f"用户: {conv['content']}\n"
1577
+ elif conv["role"] == "assistant":
1578
+ yaml_config["context"] += f"你: {conv['content']}\n"
1579
+ yaml_config["context"] += "</history>\n"
1580
+
1581
+ yaml_content = convert_yaml_config_to_str(yaml_config=yaml_config)
1586
1582
 
1587
1583
  execute_file = os.path.join("actions", latest_yaml_file)
1588
1584
  with open(os.path.join(execute_file), "w",encoding="utf-8") as f:
File without changes
@@ -0,0 +1,108 @@
1
+ """
2
+ Module for code linting capabilities across multiple programming languages.
3
+ This module provides a base abstract class for various language-specific linters.
4
+ """
5
+
6
+ import os
7
+ from abc import ABC, abstractmethod
8
+ from typing import Dict, Any, List, Optional
9
+
10
+ class BaseLinter(ABC):
11
+ """
12
+ Base abstract class for all language-specific linters.
13
+ """
14
+
15
+ def __init__(self, verbose: bool = False):
16
+ """
17
+ Initialize the base linter.
18
+
19
+ Args:
20
+ verbose (bool): Whether to display verbose output.
21
+ """
22
+ self.verbose = verbose
23
+
24
+ @abstractmethod
25
+ def _check_dependencies(self) -> bool:
26
+ """
27
+ Check if required dependencies are installed.
28
+
29
+ Returns:
30
+ bool: True if all dependencies are available, False otherwise.
31
+ """
32
+ pass
33
+
34
+ @abstractmethod
35
+ def lint_file(self, file_path: str, fix: bool = False) -> Dict[str, Any]:
36
+ """
37
+ Lint a single file.
38
+
39
+ Args:
40
+ file_path (str): Path to the file to lint.
41
+ fix (bool): Whether to automatically fix fixable issues.
42
+
43
+ Returns:
44
+ Dict[str, Any]: Lint results.
45
+ """
46
+ pass
47
+
48
+ @abstractmethod
49
+ def lint_project(self, project_path: str, fix: bool = False) -> Dict[str, Any]:
50
+ """
51
+ Lint an entire project.
52
+
53
+ Args:
54
+ project_path (str): Path to the project directory.
55
+ fix (bool): Whether to automatically fix fixable issues.
56
+
57
+ Returns:
58
+ Dict[str, Any]: Lint results.
59
+ """
60
+ pass
61
+
62
+ @abstractmethod
63
+ def format_lint_result(self, lint_result: Dict[str, Any]) -> str:
64
+ """
65
+ Format lint results into a human-readable string.
66
+
67
+ Args:
68
+ lint_result (Dict[str, Any]): The lint result dictionary.
69
+
70
+ Returns:
71
+ str: A formatted string representation of the lint results.
72
+ """
73
+ pass
74
+
75
+ def get_file_extension(self, file_path: str) -> str:
76
+ """
77
+ Get the file extension from a file path.
78
+
79
+ Args:
80
+ file_path (str): Path to the file.
81
+
82
+ Returns:
83
+ str: The file extension (lowercase, with dot).
84
+ """
85
+ _, ext = os.path.splitext(file_path)
86
+ return ext.lower()
87
+
88
+ def is_supported_file(self, file_path: str) -> bool:
89
+ """
90
+ Check if a file is supported by this linter.
91
+
92
+ Args:
93
+ file_path (str): Path to the file.
94
+
95
+ Returns:
96
+ bool: True if the file is supported, False otherwise.
97
+ """
98
+ return self.get_file_extension(file_path) in self.get_supported_extensions()
99
+
100
+ @abstractmethod
101
+ def get_supported_extensions(self) -> List[str]:
102
+ """
103
+ Get the list of file extensions supported by this linter.
104
+
105
+ Returns:
106
+ List[str]: List of supported file extensions (lowercase, with dot).
107
+ """
108
+ pass