auto-coder 0.1.320__py3-none-any.whl → 0.1.322__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.320
3
+ Version: 0.1.322
4
4
  Summary: AutoCoder: AutoCoder
5
5
  Author: allwefantasy
6
6
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -4,17 +4,17 @@ 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=AVbSXL0uBmfY2E7-cw6GyGGz6xCozRlv0yl4laATRLU,107339
7
+ autocoder/auto_coder_runner.py,sha256=WqDriAMoZHyVivjFKwVYqcWoGbR7iIR3rovn_bJrhnA,107354
8
8
  autocoder/auto_coder_server.py,sha256=E3Z829TPSooRSNhuh3_x9yaZi0f5G0Lm0ntoZhjGaoQ,20576
9
9
  autocoder/benchmark.py,sha256=Ypomkdzd1T3GE6dRICY3Hj547dZ6_inqJbBJIp5QMco,4423
10
- autocoder/chat_auto_coder.py,sha256=Cp5_m3pCxEDcRrVG1uojTfD8xecdl9FvYtD948TvLsg,25223
10
+ autocoder/chat_auto_coder.py,sha256=SzH6fdoH8kJgARYXBu0CTB8J9PY8Q2T9CrIB844PXtM,25841
11
11
  autocoder/chat_auto_coder_lang.py,sha256=p1SUPw1_YBHK69yNViXr6iFhHL-PjFnrXExA2mXJ5ko,21655
12
12
  autocoder/command_args.py,sha256=Sfn3TVCoijSm937ZFT_JTsjRIB1gtUr-OZvnWLeS2s8,30732
13
13
  autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,10013
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=EoDeN3ig5ZVwNxmRTPz8sPe72QOBbNeYkwwSFCHdnjQ,23
17
+ autocoder/version.py,sha256=u1GVlR8vzmoaHdH5QzbLTQJB61NfOSgbSjp4H9gZ8t0,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
@@ -101,10 +101,10 @@ autocoder/common/v2/code_auto_merge.py,sha256=FZHrIZyFUkFmv4EbproXfIIUfGx_L3EPfv
101
101
  autocoder/common/v2/code_auto_merge_diff.py,sha256=xh93G9Gn8zSRhGq6L90tlodFM2u-g5KLlvZ4TPDSlDM,14945
102
102
  autocoder/common/v2/code_auto_merge_editblock.py,sha256=FpXdHAuHhtOLXybrUd2e1rDrxqoge-CpUyWpX0yNEv8,22018
103
103
  autocoder/common/v2/code_auto_merge_strict_diff.py,sha256=jIIedNZGW52dhSmNxb3vB7UdJZp8tg59Z2gg3sCpqoM,10117
104
- autocoder/common/v2/code_diff_manager.py,sha256=DEYzR7IhCOHPayh8MnQwizUIyMzpMpE93DXzuewSGT4,10495
105
- autocoder/common/v2/code_editblock_manager.py,sha256=477UNJPd4dEunes2dW3G0PwZGT2O-pmWORnbLgjDnyQ,11333
106
- autocoder/common/v2/code_manager.py,sha256=-7wqkCOYXEjJfYcWQrs7i8gz7U4ntBycxzCGX41LnaY,9165
107
- autocoder/common/v2/code_strict_diff_manager.py,sha256=6vpeAvJsnYDszYtmntPtHVrQQVGqsWwgFTrnboUP1es,9330
104
+ autocoder/common/v2/code_diff_manager.py,sha256=ciXviNjldX9ce9lgIvmWoG_8JT2GnwRW8U7QCWVdAH0,10512
105
+ autocoder/common/v2/code_editblock_manager.py,sha256=LfkL5DehL-4MPfTuW8A8nov0M7U6YannUwls3c710Zg,11372
106
+ autocoder/common/v2/code_manager.py,sha256=C403bS-f6urixwitlKHcml-J03hci-UyNwHJOqBiY6Q,9182
107
+ autocoder/common/v2/code_strict_diff_manager.py,sha256=v-J1kDyLg7tLGg_6_lbO9S4fNkx7M_L8Xr2G7fPptiU,9347
108
108
  autocoder/data/byzerllm.md,sha256=SGCMpEaUQ0ysPxQsgzyyp5sgvEr8dZsxEGAfVcPBIq0,47741
109
109
  autocoder/data/tokenizer.json,sha256=7Lb5_DaYlDRvBRH0B0ynXO5c1fOwbQLxujX805-OEh0,7847602
110
110
  autocoder/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -199,7 +199,7 @@ autocoder/rag/stream_event/types.py,sha256=rtLwOE8rShmi1dJdxyBpAV5ZjLBGG9vptMiSz
199
199
  autocoder/regex_project/__init__.py,sha256=EBZeCL5ORyD_9_5u_UuG4s7XtpXOu0y1sWDmxWFtufE,6781
200
200
  autocoder/regexproject/__init__.py,sha256=OGlfVe2yulGIZstACbVePVbNXajvVLRFyubnIc-9Gw0,9758
201
201
  autocoder/shadows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
202
- autocoder/shadows/shadow_manager.py,sha256=AMZg4Cv8Ut0KJdAEw8CbIm7neiDFPnogYQXziLwXvcs,7548
202
+ autocoder/shadows/shadow_manager.py,sha256=MCJXbGNALwfOZTFGBnPN5KVSgxOULZTlFtxP3IOcpqI,7701
203
203
  autocoder/suffixproject/__init__.py,sha256=EOb8eUqfu3ka8mrggkXUfwX3SWnxqEoiYmDF7Zkf0F8,11143
204
204
  autocoder/tsproject/__init__.py,sha256=LPehIUgzFbZ5DT_Pc0a_xCQQXEDxACPTMwXfFF7rcL0,11836
205
205
  autocoder/utils/__init__.py,sha256=W47ac6IOZhNR1rdbho9fvhHnPI_N1i4oMcZOwxLelbU,1123
@@ -226,9 +226,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
226
226
  autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
227
227
  autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=xuBeWD0YOckqRo8JB1WkVIMOYH6c24m7JfV4svBfPDo,15113
228
228
  autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
229
- auto_coder-0.1.320.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
230
- auto_coder-0.1.320.dist-info/METADATA,sha256=cdjK2vDvD6CM-cNmJjqqgJrSdfd1c0-t4w585xuXyP4,2747
231
- auto_coder-0.1.320.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
232
- auto_coder-0.1.320.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
233
- auto_coder-0.1.320.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
234
- auto_coder-0.1.320.dist-info/RECORD,,
229
+ auto_coder-0.1.322.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
230
+ auto_coder-0.1.322.dist-info/METADATA,sha256=9tZRQOBvXcpSJj2ILoPzpRuU07m--xQbX2Y9GYqyoN0,2747
231
+ auto_coder-0.1.322.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
232
+ auto_coder-0.1.322.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
233
+ auto_coder-0.1.322.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
234
+ auto_coder-0.1.322.dist-info/RECORD,,
@@ -608,11 +608,11 @@ def load_memory():
608
608
  memory.clear()
609
609
  memory.update(_memory)
610
610
  completer.update_current_files(memory["current_files"]["files"])
611
-
612
- def get_memory():
613
- global memory
614
611
  return memory
615
612
 
613
+ def get_memory():
614
+ return load_memory()
615
+
616
616
 
617
617
  completer = CommandCompleter(commands,
618
618
  file_system_model=CCFileSystemModel(project_root=project_root,
@@ -15,6 +15,7 @@ from autocoder.chat_auto_coder_lang import get_message
15
15
  from prompt_toolkit.formatted_text import FormattedText
16
16
  from prompt_toolkit.completion import Completer, Completion
17
17
  from autocoder.plugins import PluginManager
18
+ from autocoder.events.event_manager_singleton import gengerate_event_file_path
18
19
  from autocoder.auto_coder_runner import (
19
20
  auto_command,
20
21
  load_memory,
@@ -473,13 +474,14 @@ def main():
473
474
  plugin_name, handler, args = plugin_result
474
475
  if handler:
475
476
  handler(*args)
476
- continue
477
-
477
+ continue
478
478
  if (
479
479
  memory["mode"] == "auto_detect"
480
480
  and user_input
481
481
  and not user_input.startswith("/")
482
482
  ):
483
+ event_file, file_id = gengerate_event_file_path()
484
+ configure(f"event_file:{event_file}")
483
485
  auto_command(user_input)
484
486
 
485
487
  elif memory["mode"] == "voice_input" and not user_input.startswith("/"):
@@ -588,12 +590,16 @@ def main():
588
590
  raise EOFError()
589
591
 
590
592
  elif user_input.startswith("/coding"):
593
+ event_file, file_id = gengerate_event_file_path()
594
+ configure(f"event_file:{event_file}")
591
595
  query = user_input[len("/coding") :].strip()
592
596
  if not query:
593
597
  print("\033[91mPlease enter your request.\033[0m")
594
598
  continue
595
599
  coding(query)
596
600
  elif user_input.startswith("/chat"):
601
+ event_file, file_id = gengerate_event_file_path()
602
+ configure(f"event_file:{event_file}")
597
603
  query = user_input[len("/chat") :].strip()
598
604
  if not query:
599
605
  print("\033[91mPlease enter your request.\033[0m")
@@ -649,6 +655,8 @@ def main():
649
655
  print("Please enter a shell command to execute.")
650
656
  else:
651
657
  if command.startswith("/chat"):
658
+ event_file, file_id = gengerate_event_file_path()
659
+ configure(f"event_file:{event_file}")
652
660
  command = command[len("/chat") :].strip()
653
661
  gen_and_exec_shell_command(command)
654
662
  else:
@@ -55,7 +55,7 @@ class CodeDiffManager:
55
55
  self.code_merger = CodeAutoMergeDiff(llm, args)
56
56
 
57
57
  # Create shadow manager for linting
58
- self.shadow_manager = ShadowManager(args.source_dir)
58
+ self.shadow_manager = ShadowManager(args.source_dir, args.event_file)
59
59
  self.shadow_linter = ShadowLinter(self.shadow_manager, verbose=False)
60
60
 
61
61
  @byzerllm.prompt()
@@ -59,7 +59,7 @@ class CodeEditBlockManager:
59
59
  self.code_merger = CodeAutoMergeEditBlock(llm, args, fence_0, fence_1)
60
60
 
61
61
  # Create shadow manager for linting
62
- self.shadow_manager = ShadowManager(args.source_dir)
62
+ self.shadow_manager = ShadowManager(args.source_dir, args.event_file)
63
63
  self.shadow_linter = ShadowLinter(self.shadow_manager, verbose=False)
64
64
 
65
65
  @byzerllm.prompt()
@@ -116,7 +116,7 @@ class CodeEditBlockManager:
116
116
  file_issues = []
117
117
 
118
118
  for issue in result.issues:
119
- if issue.severity.value in levels:
119
+ if issue.severity.value not in levels:
120
120
  continue
121
121
 
122
122
  if not file_has_issues:
@@ -273,9 +273,11 @@ class CodeEditBlockManager:
273
273
  返回:
274
274
  CodeGenerateResult: 生成和修复的代码结果
275
275
  """
276
- # 生成代码并自动修复lint错误
276
+ # 生成代码并自动修复lint错误
277
+
277
278
  generation_result = self.generate_and_fix(query, source_code_list)
278
- global_cancel.check_and_raise()
279
+ global_cancel.check_and_raise()
280
+
279
281
  # 合并代码
280
282
  self.code_merger.merge_code(generation_result)
281
283
 
@@ -47,7 +47,7 @@ class CodeManager:
47
47
  self.printer = Printer()
48
48
 
49
49
  # Create shadow manager for linting
50
- self.shadow_manager = ShadowManager(args.source_dir)
50
+ self.shadow_manager = ShadowManager(args.source_dir, args.event_file)
51
51
  self.shadow_linter = ShadowLinter(self.shadow_manager, verbose=False)
52
52
 
53
53
  @byzerllm.prompt()
@@ -30,7 +30,7 @@ class CodeStrictDiffManager:
30
30
  # Initialize sub-components
31
31
  self.code_generator = CodeAutoGenerateStrictDiff(llm, args, action)
32
32
  self.code_merger = CodeAutoMergeStrictDiff(llm, args)
33
- self.shadow_manager = ShadowManager(args.source_dir)
33
+ self.shadow_manager = ShadowManager(args.source_dir, args.event_file)
34
34
  self.shadow_linter = ShadowLinter(self.shadow_manager, verbose=False)
35
35
 
36
36
  @byzerllm.prompt()
@@ -20,7 +20,12 @@ class ShadowManager:
20
20
  """
21
21
  self.source_dir = os.path.abspath(source_dir)
22
22
 
23
- # 根据是否提供了event_file_id来确定shadows_dir的路径
23
+ # # 根据是否提供了event_file_id来确定shadows_dir的路径
24
+ # if event_file_id:
25
+ # print("======" + event_file_id)
26
+ # import traceback
27
+ # traceback.print_stack()
28
+
24
29
  if event_file_id:
25
30
  event_file_id = self.get_event_file_id_from_path(event_file_id)
26
31
  self.shadows_dir = os.path.join(self.source_dir, '.auto-coder', 'shadows', event_file_id)
autocoder/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.320"
1
+ __version__ = "0.1.322"