auto-coder 0.1.357__py3-none-any.whl → 0.1.359__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.357
3
+ Version: 0.1.359
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=Gu50IATQtZtgEir1PpCfwgH6o4ygw6XqqbQRj3lx5dU,13798
16
16
  autocoder/run_context.py,sha256=IUfSO6_gp2Wt1blFWAmOpN0b0nDrTTk4LmtCYUBIoro,1643
17
- autocoder/version.py,sha256=hmSdBi3vkdaGZqHgyrL6XKoLSo78_Y0F06c4nkB11f8,23
17
+ autocoder/version.py,sha256=kubSVhGu19jZ8JzGmXTOr05JRqWtxaCOHwlbz49NIwg,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
@@ -24,7 +24,7 @@ autocoder/agent/auto_filegroup.py,sha256=pBsAkBcpFTff-9L5OwI8xhf2xPKpl-aZwz-skF2
24
24
  autocoder/agent/auto_guess_query.py,sha256=rDSdhpPHcOGE5MuDXvIrhCXAPR4ARS1LqpyoLsx2Jhw,11374
25
25
  autocoder/agent/auto_learn.py,sha256=uNpfvE_EYGi79KUJEe7g-j5VanbmYOYYnxWf32DaWGE,22359
26
26
  autocoder/agent/auto_learn_from_commit.py,sha256=edD4GQJyO2qvVnTKyldeswWoNeKe1Aaua6ieJzlGlFI,10662
27
- autocoder/agent/auto_review_commit.py,sha256=mHi26sU4gJAsutqJyLyXfg7DfNZJNt-H7_2a-a8pLEQ,10563
27
+ autocoder/agent/auto_review_commit.py,sha256=gumITezGCztu70T7sSt5KBCFQREAchirApShnIvhC98,10913
28
28
  autocoder/agent/auto_tool.py,sha256=DBzip-P_T6ZtT2eHexPcusmKYD0h7ufzp7TLwXAY10E,11554
29
29
  autocoder/agent/coder.py,sha256=x6bdJwDuETGg9ebQnYlUWCxCtQcDGg73LtI6McpWslQ,72034
30
30
  autocoder/agent/designer.py,sha256=EpRbzO58Xym3GrnppIT1Z8ZFAlnNfgzHbIzZ3PX-Yv8,27037
@@ -134,7 +134,7 @@ autocoder/common/rulefiles/autocoderrules_utils.py,sha256=JsB0BkdyygbTOEBfaAB2WA
134
134
  autocoder/common/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
135
135
  autocoder/common/v2/code_agentic_editblock_manager.py,sha256=pAh918YMgmLenXmNKXlmDPgKyVJjOuk69901VEEQHm4,34980
136
136
  autocoder/common/v2/code_auto_generate.py,sha256=hdhTTb0r1A8_OSuUIkxSXrwf47pXnazphufMu1vpkhI,9327
137
- autocoder/common/v2/code_auto_generate_diff.py,sha256=Cd42eFxm1GiQQobiZiG9ECu9dgsCgr3lNso21onhuKI,14543
137
+ autocoder/common/v2/code_auto_generate_diff.py,sha256=NwoPSpUQxD8zXl-RIqoE7tJIJ2_qQdJvowvyCqjGeH0,15093
138
138
  autocoder/common/v2/code_auto_generate_editblock.py,sha256=VaBvhMg_ryEataxM_n0L08FN_LI1Wfjoq4ecXs9jZwQ,15059
139
139
  autocoder/common/v2/code_auto_generate_strict_diff.py,sha256=HYAeUQjxh_AKAArCuk3-j--7QUa0J8ewDOemuIHfenk,17434
140
140
  autocoder/common/v2/code_auto_merge.py,sha256=FZHrIZyFUkFmv4EbproXfIIUfGx_L3EPfvjldsYlplI,9345
@@ -234,7 +234,7 @@ autocoder/privacy/__init__.py,sha256=LnIVvGu_K66zCE-yhN_-dPO8R80pQyedCsXJ7wRqQaI
234
234
  autocoder/privacy/model_filter.py,sha256=-N9ZvxxDKpxU7hkn-tKv-QHyXjvkCopUaKgvJwTOGQs,3369
235
235
  autocoder/pyproject/__init__.py,sha256=qn0_-6O_LP-ZH91nneYrn3yaIMYCYYRD1Z3MSNhXUXI,13754
236
236
  autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
237
- autocoder/rag/api_server.py,sha256=WyX4lHfHrs6_jovFfZTbXGaewyd0127J_PaI6VtgGic,13677
237
+ autocoder/rag/api_server.py,sha256=TNN5CmR1nlMgeuZVYZ1U3a48XBp647Io9P-VvCkdI9o,13936
238
238
  autocoder/rag/conversation_to_queries.py,sha256=xwmErn4WbdADnhK1me-h_6fV3KYrl_y1qPNQl1aoI6o,4810
239
239
  autocoder/rag/doc_filter.py,sha256=UduVO2mlrngwJICrefjDJTYfdmQ4GcRXrfWDQ7xXksk,14206
240
240
  autocoder/rag/document_retriever.py,sha256=rFwbAuHTvEFJq16HQNlmRLyJp2ddn2RNFslw_ncU7NI,8847
@@ -307,9 +307,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
307
307
  autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
308
308
  autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=t902pKxQ5xM7zgIHiAOsTPLwxhE6VuvXAqPy751S7fg,14096
309
309
  autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
310
- auto_coder-0.1.357.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
311
- auto_coder-0.1.357.dist-info/METADATA,sha256=oQ1yQ62WXUhYfVdiStxZ-acl7qFjtCPoRczMiW86Uec,2751
312
- auto_coder-0.1.357.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
313
- auto_coder-0.1.357.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
314
- auto_coder-0.1.357.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
315
- auto_coder-0.1.357.dist-info/RECORD,,
310
+ auto_coder-0.1.359.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
311
+ auto_coder-0.1.359.dist-info/METADATA,sha256=WP-yHh87MG8JU0Akq0ILfiyBqqG-hrbB_0wpXZkL2gA,2751
312
+ auto_coder-0.1.359.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
313
+ auto_coder-0.1.359.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
314
+ auto_coder-0.1.359.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
315
+ auto_coder-0.1.359.dist-info/RECORD,,
@@ -96,12 +96,13 @@ class AutoReviewCommit:
96
96
  - 依赖关系:组件耦合是否合理
97
97
  - 复用性:是否有重复代码
98
98
 
99
- 评审结果包含以下内容:
100
- 1. issues: 发现的具体问题列表
101
- 2. suggestions: 对应的改进建议列表
102
- 3. severity: 问题的严重程度(low/medium/high)
99
+ 评审结果包含以下内容(以美观易于阅读的Markdown格式输出):
100
+ 1. issues: 发现的具体问题列表
101
+ 3. severity: 问题的严重程度(low/medium/high),从高到底进行描述。
102
+ 4. suggestions: 对应的改进建议列表
103
103
  4. affected_files: 受影响的文件列表
104
104
  5. summary: 总体评价
105
+ 6. action: 1. 修改完美,可以继续。 2. 用户需要revert 代码,然后重新修改提示词,你推荐的提示词是什么。 3. 用户可以在现在的基础上,再做一些迭代,来完成这次,应该怎么提供提示词。
105
106
 
106
107
  {% if query %}
107
108
  用户额外 review 需求:
@@ -116,7 +117,7 @@ class AutoReviewCommit:
116
117
  3. 严重程度的判断要考虑问题对系统的潜在影响
117
118
  4. 建议应该符合项目的技术栈和开发规范
118
119
  """
119
- pass
120
+ return {}
120
121
 
121
122
 
122
123
  def parse_history_tasks(self,commit_file_name: Optional[str] = None) -> List[Dict]:
@@ -15,7 +15,7 @@ from autocoder.rag.token_counter import count_tokens
15
15
  from autocoder.utils import llms as llm_utils
16
16
  from autocoder.common import SourceCodeList
17
17
  from autocoder.memory.active_context_manager import ActiveContextManager
18
-
18
+ from autocoder.common.rulefiles.autocoderrules_utils import get_rules
19
19
 
20
20
  class CodeAutoGenerateDiff:
21
21
  def __init__(
@@ -156,10 +156,12 @@ class CodeAutoGenerateDiff:
156
156
 
157
157
  现在让我们开始一个新的任务:
158
158
 
159
+ ====
159
160
  {%- if structure %}
160
161
  {{ structure }}
161
162
  {%- endif %}
162
163
 
164
+ ====
163
165
  {%- if content %}
164
166
  下面是一些文件路径以及每个文件对应的源码:
165
167
  <files>
@@ -167,6 +169,7 @@ class CodeAutoGenerateDiff:
167
169
  </files>
168
170
  {%- endif %}
169
171
 
172
+ ====
170
173
  {%- if package_context %}
171
174
  下面是上面文件的一些信息(包括最近的变更情况):
172
175
  <package_context>
@@ -180,6 +183,22 @@ class CodeAutoGenerateDiff:
180
183
  </extra_context>
181
184
  {%- endif %}
182
185
 
186
+ {%- if extra_docs %}
187
+ ====
188
+
189
+ RULES PROVIDED BY USER
190
+
191
+ The following rules are provided by the user, and you must follow them strictly.
192
+
193
+ {% for key, value in extra_docs.items() %}
194
+ <user_rule>
195
+ ##File: {{ key }}
196
+ {{ value }}
197
+ </user_rule>
198
+ {% endfor %}
199
+ {% endif %}
200
+
201
+ ====
183
202
  下面是用户的需求:
184
203
 
185
204
  {{ instruction }}
@@ -190,12 +209,15 @@ class CodeAutoGenerateDiff:
190
209
  "structure": "",
191
210
  }
192
211
 
212
+ extra_docs = get_rules()
213
+
193
214
  return {
194
215
  "structure": (
195
216
  self.action.pp.get_tree_like_directory_structure()
196
217
  if self.action
197
218
  else ""
198
219
  ),
220
+ "extra_docs": extra_docs,
199
221
  }
200
222
 
201
223
  def single_round_run(
@@ -365,6 +365,13 @@ def serve(llm:ByzerLLM, args: ServerArgs):
365
365
  server_model_name=args.served_model_name,
366
366
  prompt_template=args.prompt_template
367
367
  )
368
+
369
+ # Patch _check_model方法,使其永远返回None
370
+ async def always_return_none(*args, **kwargs):
371
+ return None
372
+
373
+ openai_serving_chat._check_model = always_return_none
374
+ openai_serving_completion._check_model = always_return_none
368
375
 
369
376
  # 如果使用workers>1或reload=True,必须使用导入字符串而不是应用实例
370
377
  uvicorn.run(
autocoder/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.357"
1
+ __version__ = "0.1.359"