auto-coder 0.1.262__py3-none-any.whl → 0.1.263__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.262
3
+ Version: 0.1.263
4
4
  Summary: AutoCoder: AutoCoder
5
5
  Author: allwefantasy
6
6
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -1,17 +1,17 @@
1
1
  autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- autocoder/auto_coder.py,sha256=VQ0a7AM0bAGcit45n8nrlVN7xyptbTWTP-Yt7RMy2Z0,64652
2
+ autocoder/auto_coder.py,sha256=RT2rE8c30gnD4mFrmoRiumZK6vy0ukYFLVwphUvqtzk,64752
3
3
  autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,3229
4
4
  autocoder/auto_coder_rag.py,sha256=nwgsXO2-scssWStjX3S910tDp-OZXZRddSYrpyC4Nq0,29021
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
7
  autocoder/auto_coder_server.py,sha256=XU9b4SBH7zjPPXaTWWHV4_zJm-XYa6njuLQaplYJH_c,20290
8
8
  autocoder/benchmark.py,sha256=Ypomkdzd1T3GE6dRICY3Hj547dZ6_inqJbBJIp5QMco,4423
9
- autocoder/chat_auto_coder.py,sha256=RypADJiv9DVIMZ9k0TBxi13bhJU5a0rUmnWfiwr3YXs,110707
9
+ autocoder/chat_auto_coder.py,sha256=rtKq1xHFQvQ3QhBjjxU7tO-kTq8op-D0mzkRUiPuL20,110749
10
10
  autocoder/chat_auto_coder_lang.py,sha256=ShOQVOnMA-WlT-fB9OrOer-xQkbcWxJGl-WMPuZcUkM,19572
11
11
  autocoder/command_args.py,sha256=9aYJ-AmPxP1sQh6ciw04FWHjSn31f2W9afXFwo8wgx4,30441
12
12
  autocoder/lang.py,sha256=U6AjVV8Rs1uLyjFCZ8sT6WWuNUxMBqkXXIOs4S120uk,14511
13
13
  autocoder/models.py,sha256=rG7ckiKlers-XoO1gWxNK-Y-IbqD82WS3qFMPHqvFsc,9072
14
- autocoder/version.py,sha256=cdZmt_qQL4CxqcMwO5DqEAzYaCTd64YG6_3y7bKEGtg,23
14
+ autocoder/version.py,sha256=qjoBqAJAHCAdnnYItYXWKsBrqYEcxsgdcdoJgi6Y314,23
15
15
  autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  autocoder/agent/auto_demand_organizer.py,sha256=NWSAEsEk94vT3lGjfo25kKLMwYdPcpy9e-i21txPasQ,6942
17
17
  autocoder/agent/auto_filegroup.py,sha256=CW7bqp0FW1GIEMnl-blyAc2UGT7O9Mom0q66ITz1ckM,6635
@@ -32,7 +32,7 @@ autocoder/common/__init__.py,sha256=ycRfzzb28kqMb1yNRQrJotx833gkuxL9PF9AwtsCTTw,
32
32
  autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
33
33
  autocoder/common/anything2img.py,sha256=4TREa-sOA-iargieUy7MpyCYVUE-9Mmq0wJtwomPqnE,7662
34
34
  autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
35
- autocoder/common/auto_coder_lang.py,sha256=nIHI5dSSHDDUWKuEF7TgrDAHaZwO0fubrowxqjQE6Gw,25578
35
+ autocoder/common/auto_coder_lang.py,sha256=YdbpmK1yzCbrRLCPz3Y3j9L827sc_MgIYzTxY9A3mnc,25804
36
36
  autocoder/common/auto_configure.py,sha256=tdEwfycZUjomZAgps1GOCtocYEtfuUgRksYPFHBP_bs,12211
37
37
  autocoder/common/buildin_tokenizer.py,sha256=L7d5t39ZFvUd6EoMPXUhYK1toD0FHlRH1jtjKRGokWU,1236
38
38
  autocoder/common/chunk_validation.py,sha256=BrR_ZWavW8IANuueEE7hS8NFAwEvm8TX34WnPx_1hs8,3030
@@ -97,7 +97,7 @@ autocoder/index/symbols_utils.py,sha256=_EP7E_qWXxluAxq3FGZLlLfdrfwx3FmxCdulI8VG
97
97
  autocoder/index/types.py,sha256=a2s_KV5FJlq7jqA2ELSo9E1sjuLwDB-JJYMhSpzBAhU,596
98
98
  autocoder/index/filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
99
99
  autocoder/index/filter/normal_filter.py,sha256=APu34iSvWhtlLtWgkj8N3Vo4oW1TegtZQq2bwDX_cs4,8031
100
- autocoder/index/filter/quick_filter.py,sha256=oFu3RIk7N8HX2hVTiQ8ymXy1MaJhJn7I4JyFwInI9IA,16198
100
+ autocoder/index/filter/quick_filter.py,sha256=jB7a0AbnmtuPVAMBBuX5Y4HKQcxjpjTd2QUFyifbhxc,16976
101
101
  autocoder/privacy/__init__.py,sha256=LnIVvGu_K66zCE-yhN_-dPO8R80pQyedCsXJ7wRqQaI,72
102
102
  autocoder/privacy/model_filter.py,sha256=-N9ZvxxDKpxU7hkn-tKv-QHyXjvkCopUaKgvJwTOGQs,3369
103
103
  autocoder/pyproject/__init__.py,sha256=bRuGxFV4QyE85xVjDzeMFmlLVqGbbcFs09FI15Uss4Q,14423
@@ -158,9 +158,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
158
158
  autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
159
159
  autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=lkJ_A-sYU36JMzjFWkk3pR6uos8oZHYt9GPsPe_CPAo,11766
160
160
  autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
161
- auto_coder-0.1.262.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
162
- auto_coder-0.1.262.dist-info/METADATA,sha256=cB6nlFrLdyudHfyPiQSSQwN53z_qcR5MxXn6xLU2ito,2616
163
- auto_coder-0.1.262.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
164
- auto_coder-0.1.262.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
165
- auto_coder-0.1.262.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
166
- auto_coder-0.1.262.dist-info/RECORD,,
161
+ auto_coder-0.1.263.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
162
+ auto_coder-0.1.263.dist-info/METADATA,sha256=iZbXB6Hcolib7NbeTHw2_4WeFAavod9dLKBRltpprjc,2616
163
+ auto_coder-0.1.263.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
164
+ auto_coder-0.1.263.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
165
+ auto_coder-0.1.263.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
166
+ auto_coder-0.1.263.dist-info/RECORD,,
autocoder/auto_coder.py CHANGED
@@ -1164,19 +1164,20 @@ def main(input_args: Optional[List[str]] = None):
1164
1164
  file_path=source.module_name,
1165
1165
  model_name=",".join(get_llm_names(chat_llm)))
1166
1166
 
1167
- s = build_index_and_filter_files(
1168
- llm=llm, args=args, sources=filtered_sources).to_str()
1169
-
1170
- if s:
1171
- pre_conversations.append(
1172
- {
1173
- "role": "user",
1174
- "content": f"请阅读下面的代码和文档:\n\n <files>\n{s}\n</files>",
1175
- }
1176
- )
1177
- pre_conversations.append(
1178
- {"role": "assistant", "content": "read"})
1179
- source_count += 1
1167
+ if "no_context" not in args.action:
1168
+ s = build_index_and_filter_files(
1169
+ llm=llm, args=args, sources=filtered_sources).to_str()
1170
+
1171
+ if s:
1172
+ pre_conversations.append(
1173
+ {
1174
+ "role": "user",
1175
+ "content": f"请阅读下面的代码和文档:\n\n <files>\n{s}\n</files>",
1176
+ }
1177
+ )
1178
+ pre_conversations.append(
1179
+ {"role": "assistant", "content": "read"})
1180
+ source_count += 1
1180
1181
 
1181
1182
  loaded_conversations = pre_conversations + \
1182
1183
  chat_history["ask_conversation"]
@@ -1680,9 +1680,10 @@ def chat(query: str):
1680
1680
  else:
1681
1681
  query = code_review.prompt(query)
1682
1682
 
1683
- is_no_context = query.strip().startswith("/no_context")
1683
+ is_no_context = "/no_context" in query.strip()
1684
1684
  if is_no_context:
1685
1685
  query = query.replace("/no_context", "", 1).strip()
1686
+ yaml_config["action"].append("no_context")
1686
1687
 
1687
1688
  for key, value in conf.items():
1688
1689
  converted_value = convert_config_value(key, value)
@@ -136,7 +136,8 @@ MESSAGES = {
136
136
  "auto_command_analyzed": "Selected command",
137
137
  "invalid_enum_value": "Value '{{value}}' is not in allowed values ({{allowed}})",
138
138
  "no_changes_made": "⚠️ no changes made, the reason may be that the text block generated by the coding function has a problem, so it cannot be merged into the project",
139
- "conversation_pruning_start": "Conversation pruning started, total tokens: {{total_tokens}}, safe zone: {{safe_zone}}",
139
+ "conversation_pruning_start": "⚠️ Conversation pruning started, total tokens: {{total_tokens}}, safe zone: {{safe_zone}}",
140
+ "invalid_file_number": "⚠️ Invalid file number {{file_number}}, total files: {{total_files}}"
140
141
  },
141
142
  "zh": {
142
143
  "config_validation_error": "配置验证错误: {{error}}",
@@ -270,7 +271,8 @@ MESSAGES = {
270
271
  "satisfied_prompt": "已满足需求,无需进一步操作",
271
272
  "auto_command_analyzed": "被选择指令",
272
273
  "invalid_enum_value": "值 '{{value}}' 不在允许的值列表中 ({{allowed}})",
273
- "conversation_pruning_start": "⚠️ 对话长度 {{total_tokens}} tokens 超过安全阈值 {{safe_zone}},开始修剪对话。"
274
+ "conversation_pruning_start": "⚠️ 对话长度 {{total_tokens}} tokens 超过安全阈值 {{safe_zone}},开始修剪对话。",
275
+ "invalid_file_number": "⚠️ 无效的文件编号 {{file_number}},总文件数为 {{total_files}}"
274
276
  }}
275
277
 
276
278
 
@@ -167,6 +167,14 @@ class QuickFilter():
167
167
 
168
168
  if file_number_list:
169
169
  for file_number in file_number_list.file_list:
170
+ if file_number < 0 or file_number >= len(chunk):
171
+ self.printer.print_in_terminal(
172
+ "invalid_file_number",
173
+ style="yellow",
174
+ file_number=file_number,
175
+ total_files=len(chunk)
176
+ )
177
+ continue
170
178
  file_path = get_file_path(
171
179
  chunk[file_number].module_name)
172
180
  files[file_path] = TargetFile(
@@ -378,6 +386,14 @@ class QuickFilter():
378
386
 
379
387
  if file_number_list:
380
388
  for file_number in file_number_list.file_list:
389
+ if file_number < 0 or file_number >= len(index_items):
390
+ self.printer.print_in_terminal(
391
+ "invalid_file_number",
392
+ style="yellow",
393
+ file_number=file_number,
394
+ total_files=len(index_items)
395
+ )
396
+ continue
381
397
  final_files[get_file_path(index_items[file_number].module_name)] = TargetFile(
382
398
  file_path=index_items[file_number].module_name,
383
399
  reason=self.printer.get_message_from_key(
autocoder/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.262"
1
+ __version__ = "0.1.263"