auto-coder 0.1.259__py3-none-any.whl → 0.1.261__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.
- {auto_coder-0.1.259.dist-info → auto_coder-0.1.261.dist-info}/METADATA +1 -1
- {auto_coder-0.1.259.dist-info → auto_coder-0.1.261.dist-info}/RECORD +36 -27
- autocoder/agent/auto_review_commit.py +51 -24
- autocoder/auto_coder.py +24 -1
- autocoder/chat_auto_coder.py +377 -399
- autocoder/chat_auto_coder_lang.py +20 -0
- autocoder/commands/__init__.py +0 -0
- autocoder/commands/auto_command.py +1174 -0
- autocoder/commands/tools.py +533 -0
- autocoder/common/__init__.py +8 -0
- autocoder/common/auto_coder_lang.py +61 -8
- autocoder/common/auto_configure.py +304 -0
- autocoder/common/code_auto_merge.py +2 -2
- autocoder/common/code_auto_merge_diff.py +2 -2
- autocoder/common/code_auto_merge_editblock.py +2 -2
- autocoder/common/code_auto_merge_strict_diff.py +2 -2
- autocoder/common/code_modification_ranker.py +8 -7
- autocoder/common/command_completer.py +557 -0
- autocoder/common/conf_validator.py +245 -0
- autocoder/common/conversation_pruner.py +131 -0
- autocoder/common/git_utils.py +82 -1
- autocoder/common/index_import_export.py +101 -0
- autocoder/common/result_manager.py +115 -0
- autocoder/common/shells.py +22 -6
- autocoder/common/utils_code_auto_generate.py +2 -2
- autocoder/dispacher/actions/action.py +45 -4
- autocoder/dispacher/actions/plugins/action_regex_project.py +13 -1
- autocoder/index/filter/quick_filter.py +22 -7
- autocoder/utils/auto_coder_utils/chat_stream_out.py +13 -6
- autocoder/utils/project_structure.py +15 -0
- autocoder/utils/thread_utils.py +4 -0
- autocoder/version.py +1 -1
- {auto_coder-0.1.259.dist-info → auto_coder-0.1.261.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.259.dist-info → auto_coder-0.1.261.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.259.dist-info → auto_coder-0.1.261.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.259.dist-info → auto_coder-0.1.261.dist-info}/top_level.txt +0 -0
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
autocoder/auto_coder.py,sha256=
|
|
2
|
+
autocoder/auto_coder.py,sha256=VQ0a7AM0bAGcit45n8nrlVN7xyptbTWTP-Yt7RMy2Z0,64652
|
|
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=
|
|
10
|
-
autocoder/chat_auto_coder_lang.py,sha256=
|
|
9
|
+
autocoder/chat_auto_coder.py,sha256=Gqt-uZU_bCMfntKUQtwmMSenTYbEjanOxfSsTzNLVm0,110690
|
|
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=
|
|
14
|
+
autocoder/version.py,sha256=FpxoCO0AS-j3bS_c_eu4jbDFzGtgH1JA4ySIzB1dNGY,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
|
|
18
18
|
autocoder/agent/auto_guess_query.py,sha256=rDSdhpPHcOGE5MuDXvIrhCXAPR4ARS1LqpyoLsx2Jhw,11374
|
|
19
|
-
autocoder/agent/auto_review_commit.py,sha256=
|
|
19
|
+
autocoder/agent/auto_review_commit.py,sha256=UvcxsW3UW-bZzbV82ylyf4e8uBoOtF9fkwVdl1YMsRs,9152
|
|
20
20
|
autocoder/agent/auto_tool.py,sha256=DBzip-P_T6ZtT2eHexPcusmKYD0h7ufzp7TLwXAY10E,11554
|
|
21
21
|
autocoder/agent/coder.py,sha256=x6bdJwDuETGg9ebQnYlUWCxCtQcDGg73LtI6McpWslQ,72034
|
|
22
22
|
autocoder/agent/designer.py,sha256=EpRbzO58Xym3GrnppIT1Z8ZFAlnNfgzHbIzZ3PX-Yv8,27037
|
|
23
23
|
autocoder/agent/planner.py,sha256=wvvuX9o6yhWlGm9t7fIT0wiChV5NkXBrYElxKiAjldU,9127
|
|
24
24
|
autocoder/agent/project_reader.py,sha256=tWLaPoLw1gI6kO_NzivQj28KbobU2ceOLuppHMbfGl8,18234
|
|
25
25
|
autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
+
autocoder/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
+
autocoder/commands/auto_command.py,sha256=nPzTdVJES1MDfBfRuKl7SxKh_8CZGCz-pPAtEijeEtA,49084
|
|
28
|
+
autocoder/commands/tools.py,sha256=rgZWuTtmn-Ck7G2EkeBRMFh6_TjLzssW1mabQoCrzR0,20327
|
|
26
29
|
autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
|
|
27
30
|
autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
|
|
28
|
-
autocoder/common/__init__.py,sha256=
|
|
31
|
+
autocoder/common/__init__.py,sha256=ycRfzzb28kqMb1yNRQrJotx833gkuxL9PF9AwtsCTTw,12554
|
|
29
32
|
autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
|
|
30
33
|
autocoder/common/anything2img.py,sha256=4TREa-sOA-iargieUy7MpyCYVUE-9Mmq0wJtwomPqnE,7662
|
|
31
34
|
autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
|
|
32
|
-
autocoder/common/auto_coder_lang.py,sha256=
|
|
35
|
+
autocoder/common/auto_coder_lang.py,sha256=nIHI5dSSHDDUWKuEF7TgrDAHaZwO0fubrowxqjQE6Gw,25578
|
|
36
|
+
autocoder/common/auto_configure.py,sha256=tdEwfycZUjomZAgps1GOCtocYEtfuUgRksYPFHBP_bs,12211
|
|
33
37
|
autocoder/common/buildin_tokenizer.py,sha256=L7d5t39ZFvUd6EoMPXUhYK1toD0FHlRH1jtjKRGokWU,1236
|
|
34
38
|
autocoder/common/chunk_validation.py,sha256=BrR_ZWavW8IANuueEE7hS8NFAwEvm8TX34WnPx_1hs8,3030
|
|
35
39
|
autocoder/common/cleaner.py,sha256=NU72i8C6o9m0vXExab7nao5bstBUsfJFcj11cXa9l4U,1089
|
|
@@ -38,19 +42,22 @@ autocoder/common/code_auto_generate.py,sha256=74wCscxVEnY_VDkHcr-QA3b79RhDR_OeVP
|
|
|
38
42
|
autocoder/common/code_auto_generate_diff.py,sha256=bns5KZq9ozvUtyqIUWsDNUtah-TTOsE7yRXHYGlrtT4,18872
|
|
39
43
|
autocoder/common/code_auto_generate_editblock.py,sha256=LcGfG4bJVCVsWehex7MYWDF4NX0B2Rp2ALSh-27MclA,20472
|
|
40
44
|
autocoder/common/code_auto_generate_strict_diff.py,sha256=JvKnD5Ph3JtAiVIO_k_XKUnVBeUxwLw_AHF_xWWtX7c,17488
|
|
41
|
-
autocoder/common/code_auto_merge.py,sha256
|
|
42
|
-
autocoder/common/code_auto_merge_diff.py,sha256=
|
|
43
|
-
autocoder/common/code_auto_merge_editblock.py,sha256=
|
|
44
|
-
autocoder/common/code_auto_merge_strict_diff.py,sha256=
|
|
45
|
-
autocoder/common/code_modification_ranker.py,sha256=
|
|
46
|
-
autocoder/common/command_completer.py,sha256=
|
|
45
|
+
autocoder/common/code_auto_merge.py,sha256=TJu41wI-YlX_pZ14aN_f1E_34o-laezz_uf5peMk-bI,7414
|
|
46
|
+
autocoder/common/code_auto_merge_diff.py,sha256=THC_zf7QSc7Km5MCBmZprBZr0XdN-uPL4n46wFEIzNk,15410
|
|
47
|
+
autocoder/common/code_auto_merge_editblock.py,sha256=NMXGDHIERbZJ8laRpF7ztdGdGF7_vj5-fCik2Icf4dk,17564
|
|
48
|
+
autocoder/common/code_auto_merge_strict_diff.py,sha256=4sH607wUTi8vRmh3_G2F3K8MGlL6HEguVOQ7hnIaZ7Y,9598
|
|
49
|
+
autocoder/common/code_modification_ranker.py,sha256=3Ieo1-ADBinbnX8XoBIA2GOf0K56ITokPMoIhQjQaCU,8217
|
|
50
|
+
autocoder/common/command_completer.py,sha256=Nd-DdlFd2MMy9jpSI5N5rGKek-zEzI4Wa2g9w7mjQYk,35122
|
|
47
51
|
autocoder/common/command_generator.py,sha256=-hmbD_AnCa5HxL4BznuEfYAf_l8AxU5fAG5F0sM_fuE,2116
|
|
48
52
|
autocoder/common/command_templates.py,sha256=lAdr0-iyJKY2dOH2mZ0Tm3GlT_a1Oj8mgdKXmDiQN3A,8654
|
|
53
|
+
autocoder/common/conf_validator.py,sha256=OzwNMRf0EJTamyIQUpgudbBpYMoJ7S6UyEyk8xi9KXU,8596
|
|
49
54
|
autocoder/common/const.py,sha256=eTjhjh4Aj4CUzviJ81jaf3Y5cwqsLATySn2wJxaS6RQ,2911
|
|
55
|
+
autocoder/common/conversation_pruner.py,sha256=mdMpTpTdPJl8f0UjC1TGKRiYtDc1o6QQD0nYPR9yp1c,5628
|
|
50
56
|
autocoder/common/files.py,sha256=CguxG9digkWBJpRaILErZmL_G5ryPRahPmPFWGB7X18,1973
|
|
51
|
-
autocoder/common/git_utils.py,sha256=
|
|
57
|
+
autocoder/common/git_utils.py,sha256=qeuF_IB3G3M72asHxWokROU3hINCuFA1nar-UtF9wIU,26022
|
|
52
58
|
autocoder/common/global_cancel.py,sha256=hT7J7J5ChThIhk2x11_v4v9ASIn4HtwyPD26t2s-fwc,418
|
|
53
59
|
autocoder/common/image_to_page.py,sha256=O0cNO_vHHUP-fP4GXiVojShmNqkPnZXeIyiY1MRLpKg,13936
|
|
60
|
+
autocoder/common/index_import_export.py,sha256=Dg_j-tBaJO_xMXhZUseJcOcA9I79etI_Xri3lUEvYmw,3495
|
|
54
61
|
autocoder/common/interpreter.py,sha256=62-dIakOunYB4yjmX8SHC0Gdy2h8NtxdgbpdqRZJ5vk,2833
|
|
55
62
|
autocoder/common/llm_rerank.py,sha256=FbvtCzaR661Mt2wn0qsuiEL1Y3puD6jeIJS4zg_e7Bs,3260
|
|
56
63
|
autocoder/common/mcp_hub.py,sha256=2ZyJv3Aiv4Y97UHut49oYhIFcu7ICR-mptDEBSgT3uE,14234
|
|
@@ -60,14 +67,15 @@ autocoder/common/memory_manager.py,sha256=2ZjYG7BPyvbYalZBF6AM_G5e10Qkw_zrqtD4Zd
|
|
|
60
67
|
autocoder/common/model_speed_test.py,sha256=U48xUUpOnbwUal1cdij4YAn_H2PD2pNaqrMHaYtQRfI,15200
|
|
61
68
|
autocoder/common/printer.py,sha256=P1WU0QjlfnjqTP5uA55GkHZCpFzRPFkc34DMMandreg,2023
|
|
62
69
|
autocoder/common/recall_validation.py,sha256=Avt9Q9dX3kG6Pf2zsdlOHmsjd-OeSj7U1PFBDp_Cve0,1700
|
|
70
|
+
autocoder/common/result_manager.py,sha256=nBcFRj5reBC7vp13M91f4B8iPW8B8OehayHlUdeAt1g,3776
|
|
63
71
|
autocoder/common/screenshots.py,sha256=_gA-z1HxGjPShBrtgkdideq58MG6rqFB2qMUJKjrycs,3769
|
|
64
72
|
autocoder/common/search.py,sha256=245iPFgWhMldoUK3CqCP89ltaxZiNPK73evoG6Fp1h8,16518
|
|
65
73
|
autocoder/common/search_replace.py,sha256=GphFkc57Hb673CAwmbiocqTbw8vrV7TrZxtOhD0332g,22147
|
|
66
|
-
autocoder/common/shells.py,sha256=
|
|
74
|
+
autocoder/common/shells.py,sha256=Lu7JxF49Wi8kJ1WYAxmYnHUxs5JeQLO9N2OU05Gwrj8,7570
|
|
67
75
|
autocoder/common/sys_prompt.py,sha256=JlexfjZt554faqbgkCmzOJqYUzDHfbnxly5ugFfHfEE,26403
|
|
68
76
|
autocoder/common/text.py,sha256=KGRQq314GHBmY4MWG8ossRoQi1_DTotvhxchpn78c-k,1003
|
|
69
77
|
autocoder/common/types.py,sha256=PXTETrsTvhLE49jqAeUKGySvxBN9pjeyCgRHLDYdd9U,664
|
|
70
|
-
autocoder/common/utils_code_auto_generate.py,sha256=
|
|
78
|
+
autocoder/common/utils_code_auto_generate.py,sha256=oiBjdCgdcQErfhMozFdHxkU84WmDo2euBA86yezha-g,3597
|
|
71
79
|
autocoder/common/mcp_servers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
80
|
autocoder/common/mcp_servers/mcp_server_perplexity.py,sha256=IXTyMpd1CQcBLzVinA-_OIOHoNmbzvuW6pXIadaKHJE,5533
|
|
73
81
|
autocoder/data/byzerllm.md,sha256=SGCMpEaUQ0ysPxQsgzyyp5sgvEr8dZsxEGAfVcPBIq0,47741
|
|
@@ -76,10 +84,10 @@ autocoder/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
76
84
|
autocoder/db/store.py,sha256=tFT66bP2ZKIqZip-uhLkHRSLaaOAUUDZfozJwcqix3c,1908
|
|
77
85
|
autocoder/dispacher/__init__.py,sha256=YoA64dIxnx4jcE1pwSfg81sjkQtjDkhddkfac1-cMWo,1230
|
|
78
86
|
autocoder/dispacher/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
|
-
autocoder/dispacher/actions/action.py,sha256=
|
|
87
|
+
autocoder/dispacher/actions/action.py,sha256=BWdGHhvco005vHvmBlCGS7DgsizBluKyENdK7c4z1NA,25283
|
|
80
88
|
autocoder/dispacher/actions/copilot.py,sha256=iMh4ckj9hO5Q-iemF3CStXd7DatWai7Eci5zOlKxK9c,13072
|
|
81
89
|
autocoder/dispacher/actions/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
|
-
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=
|
|
90
|
+
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=2Ikj6dlgezXJQC3hnbC5mrDuSGtF20bVbpOrEDOq25s,6984
|
|
83
91
|
autocoder/dispacher/actions/plugins/action_translate.py,sha256=nVAtRSQpdGNmZxg1R_9zXG3AuTv3CHf2v7ODgj8u65c,7727
|
|
84
92
|
autocoder/index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
93
|
autocoder/index/entry.py,sha256=iuvORjbmkNXBaN8p-njwETCVN2mWwu_DIgCJeM2rzKs,12799
|
|
@@ -89,7 +97,7 @@ autocoder/index/symbols_utils.py,sha256=CjcjUVajmJZB75Ty3a7kMv1BZphrm-tIBAdOJv6u
|
|
|
89
97
|
autocoder/index/types.py,sha256=a2s_KV5FJlq7jqA2ELSo9E1sjuLwDB-JJYMhSpzBAhU,596
|
|
90
98
|
autocoder/index/filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
99
|
autocoder/index/filter/normal_filter.py,sha256=APu34iSvWhtlLtWgkj8N3Vo4oW1TegtZQq2bwDX_cs4,8031
|
|
92
|
-
autocoder/index/filter/quick_filter.py,sha256=
|
|
100
|
+
autocoder/index/filter/quick_filter.py,sha256=h0JNz_zRMb0dxBD00iH-Qwt_GEnCyHnMXS8FOhqLQEo,16126
|
|
93
101
|
autocoder/privacy/__init__.py,sha256=LnIVvGu_K66zCE-yhN_-dPO8R80pQyedCsXJ7wRqQaI,72
|
|
94
102
|
autocoder/privacy/model_filter.py,sha256=-N9ZvxxDKpxU7hkn-tKv-QHyXjvkCopUaKgvJwTOGQs,3369
|
|
95
103
|
autocoder/pyproject/__init__.py,sha256=bRuGxFV4QyE85xVjDzeMFmlLVqGbbcFs09FI15Uss4Q,14423
|
|
@@ -139,19 +147,20 @@ autocoder/utils/model_provider_selector.py,sha256=g5O9frBWkXR7iqjYDdTvhoxzTQx0Na
|
|
|
139
147
|
autocoder/utils/multi_turn.py,sha256=unK9OpqVRbK6uIcTKXgggX2wNmyj7s5eyEAQ2xUwHoM,88
|
|
140
148
|
autocoder/utils/operate_config_api.py,sha256=99YAKsuUFLPwrRvj0CJal_bAPgyiXWMma6ZKMU56thw,5790
|
|
141
149
|
autocoder/utils/print_table.py,sha256=ZMRhCA9DD0FUfKyJBWd5bDdj1RrtPtgOMWSJwtvZcLs,403
|
|
150
|
+
autocoder/utils/project_structure.py,sha256=4uqmlUyo3LZgn-HX_zv84WmcPqF9jif0n6I8dkmLHt4,601
|
|
142
151
|
autocoder/utils/queue_communicate.py,sha256=buyEzdvab1QA4i2QKbq35rG5v_9x9PWVLWWMTznWcYM,6832
|
|
143
152
|
autocoder/utils/request_event_queue.py,sha256=r3lo5qGsB1dIjzVQ05dnr0z_9Z3zOkBdP1vmRciKdi4,2095
|
|
144
153
|
autocoder/utils/request_queue.py,sha256=nwp6PMtgTCiuwJI24p8OLNZjUiprC-TsefQrhMI-yPE,3889
|
|
145
154
|
autocoder/utils/rest.py,sha256=hLBhr78y-WVnV0oQf9Rxc22EwqF78KINkScvYa1MuYA,6435
|
|
146
155
|
autocoder/utils/tests.py,sha256=BqphrwyycGAvs-5mhH8pKtMZdObwhFtJ5MC_ZAOiLq8,1340
|
|
147
|
-
autocoder/utils/thread_utils.py,sha256=
|
|
156
|
+
autocoder/utils/thread_utils.py,sha256=UndxENXXtRIqcl3msDhkImoA7KyYi5Hs6MZhOLQrKZ8,8334
|
|
148
157
|
autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
149
158
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
|
-
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=
|
|
159
|
+
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=lkJ_A-sYU36JMzjFWkk3pR6uos8oZHYt9GPsPe_CPAo,11766
|
|
151
160
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
152
|
-
auto_coder-0.1.
|
|
153
|
-
auto_coder-0.1.
|
|
154
|
-
auto_coder-0.1.
|
|
155
|
-
auto_coder-0.1.
|
|
156
|
-
auto_coder-0.1.
|
|
157
|
-
auto_coder-0.1.
|
|
161
|
+
auto_coder-0.1.261.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
162
|
+
auto_coder-0.1.261.dist-info/METADATA,sha256=D0OpEZxbCtNshFQP7nMis_IfkK20xjfVBxjeYTsyeq0,2616
|
|
163
|
+
auto_coder-0.1.261.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
164
|
+
auto_coder-0.1.261.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
165
|
+
auto_coder-0.1.261.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
166
|
+
auto_coder-0.1.261.dist-info/RECORD,,
|
|
@@ -8,6 +8,7 @@ from rich.console import Console
|
|
|
8
8
|
from autocoder.common.printer import Printer
|
|
9
9
|
from autocoder.common import AutoCoderArgs
|
|
10
10
|
from autocoder.common.utils_code_auto_generate import stream_chat_with_continue
|
|
11
|
+
import hashlib
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
def load_yaml_config(yaml_file: str) -> Dict:
|
|
@@ -41,13 +42,13 @@ class AutoReviewCommit:
|
|
|
41
42
|
self.console = console or Console()
|
|
42
43
|
|
|
43
44
|
@byzerllm.prompt()
|
|
44
|
-
def review(self,
|
|
45
|
+
def review(self, querie_with_urls_and_changes: List[Tuple[str, List[str], Dict[str, Tuple[str, str]]]], query: str) -> Generator[str,None,None]:
|
|
45
46
|
"""
|
|
46
47
|
如果前面我们对话提供了文档,请参考上面的文档对提交的代码变更进行审查,提供改进建议。
|
|
47
48
|
|
|
48
49
|
下面包含最新一次提交的信息:
|
|
49
50
|
<commit>
|
|
50
|
-
{% for query,urls,
|
|
51
|
+
{% for query,urls,changes in querie_with_urls_and_changes %}
|
|
51
52
|
## 任务需求
|
|
52
53
|
{{ query }}
|
|
53
54
|
|
|
@@ -57,9 +58,18 @@ class AutoReviewCommit:
|
|
|
57
58
|
{% endfor %}
|
|
58
59
|
|
|
59
60
|
代码变更:
|
|
60
|
-
|
|
61
|
-
{{
|
|
62
|
-
|
|
61
|
+
{% for file_path, (before, after) in changes.items() %}
|
|
62
|
+
##File: {{ file_path }}
|
|
63
|
+
##修改前:
|
|
64
|
+
|
|
65
|
+
{{ before or "New file" }}
|
|
66
|
+
|
|
67
|
+
##File: {{ file_path }}
|
|
68
|
+
##修改后:
|
|
69
|
+
|
|
70
|
+
{{ after or "File deleted" }}
|
|
71
|
+
|
|
72
|
+
{% endfor %}
|
|
63
73
|
{% endfor %}
|
|
64
74
|
</commit>
|
|
65
75
|
|
|
@@ -70,7 +80,7 @@ class AutoReviewCommit:
|
|
|
70
80
|
- 实现逻辑:算法和数据结构的选择是否合适
|
|
71
81
|
|
|
72
82
|
2. 潜在问题检查
|
|
73
|
-
-
|
|
83
|
+
- 常见错误:缩进(比如python),闭合标签(前端vue,reactjs),是否存在空指针,数组越界,类型转换,未声明变量,typo等低级错误
|
|
74
84
|
- 安全性:是否存在安全隐患
|
|
75
85
|
- 性能:是否有性能问题
|
|
76
86
|
- 并发:是否有并发安全问题
|
|
@@ -83,8 +93,7 @@ class AutoReviewCommit:
|
|
|
83
93
|
- 依赖关系:组件耦合是否合理
|
|
84
94
|
- 复用性:是否有重复代码
|
|
85
95
|
|
|
86
|
-
|
|
87
|
-
返回 markdown 格式,包含以下内容:
|
|
96
|
+
评审结果包含以下内容:
|
|
88
97
|
1. issues: 发现的具体问题列表
|
|
89
98
|
2. suggestions: 对应的改进建议列表
|
|
90
99
|
3. severity: 问题的严重程度(low/medium/high)
|
|
@@ -130,10 +139,10 @@ class AutoReviewCommit:
|
|
|
130
139
|
|
|
131
140
|
action_file = action_files[0]
|
|
132
141
|
|
|
133
|
-
|
|
142
|
+
querie_with_urls_and_changes = []
|
|
134
143
|
repo = git.Repo(self.project_dir)
|
|
135
144
|
|
|
136
|
-
# 收集所有query、urls
|
|
145
|
+
# 收集所有query、urls和对应的文件变化
|
|
137
146
|
for yaml_file in [action_file]:
|
|
138
147
|
yaml_path = os.path.join(self.actions_dir, yaml_file)
|
|
139
148
|
config = load_yaml_config(yaml_path)
|
|
@@ -145,11 +154,12 @@ class AutoReviewCommit:
|
|
|
145
154
|
urls = config.get('urls', [])
|
|
146
155
|
|
|
147
156
|
if query and urls:
|
|
148
|
-
|
|
157
|
+
changes = {}
|
|
149
158
|
if not self.skip_diff:
|
|
150
|
-
# 计算文件的MD5用于匹配commit
|
|
151
|
-
|
|
152
|
-
|
|
159
|
+
# 计算文件的MD5用于匹配commit
|
|
160
|
+
with open(yaml_path, 'r', encoding='utf-8') as f:
|
|
161
|
+
yaml_content = f.read()
|
|
162
|
+
file_md5 = hashlib.md5(yaml_content.encode("utf-8")).hexdigest()
|
|
153
163
|
response_id = f"auto_coder_{yaml_file}_{file_md5}"
|
|
154
164
|
# 查找对应的commit
|
|
155
165
|
try:
|
|
@@ -157,21 +167,38 @@ class AutoReviewCommit:
|
|
|
157
167
|
if response_id in commit.message:
|
|
158
168
|
if commit.parents:
|
|
159
169
|
parent = commit.parents[0]
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
170
|
+
# 获取所有文件的前后内容
|
|
171
|
+
for diff_item in parent.diff(commit):
|
|
172
|
+
file_path = diff_item.a_path if diff_item.a_path else diff_item.b_path
|
|
173
|
+
|
|
174
|
+
# 获取变更前内容
|
|
175
|
+
before_content = None
|
|
176
|
+
try:
|
|
177
|
+
if diff_item.a_blob:
|
|
178
|
+
before_content = repo.git.show(f"{parent.hexsha}:{file_path}")
|
|
179
|
+
except git.exc.GitCommandError:
|
|
180
|
+
pass # 文件可能是新增的
|
|
181
|
+
|
|
182
|
+
# 获取变更后内容
|
|
183
|
+
after_content = None
|
|
184
|
+
try:
|
|
185
|
+
if diff_item.b_blob:
|
|
186
|
+
after_content = repo.git.show(f"{commit.hexsha}:{file_path}")
|
|
187
|
+
except git.exc.GitCommandError:
|
|
188
|
+
pass # 文件可能被删除
|
|
189
|
+
|
|
190
|
+
changes[file_path] = (before_content, after_content)
|
|
164
191
|
break
|
|
165
192
|
except git.exc.GitCommandError as e:
|
|
166
193
|
printer = Printer()
|
|
167
194
|
printer.print_in_terminal("git_command_error", style="red", error=str(e))
|
|
168
195
|
except Exception as e:
|
|
169
196
|
printer = Printer()
|
|
170
|
-
printer.print_in_terminal("
|
|
197
|
+
printer.print_in_terminal("get_commit_changes_error", style="red", error=str(e))
|
|
171
198
|
|
|
172
|
-
|
|
199
|
+
querie_with_urls_and_changes.append((query, urls, changes))
|
|
173
200
|
|
|
174
|
-
return
|
|
201
|
+
return querie_with_urls_and_changes
|
|
175
202
|
|
|
176
203
|
|
|
177
204
|
def review_commit(self,query: str, conversations: List[Dict]) -> Generator[str,None,None]:
|
|
@@ -183,15 +210,15 @@ class AutoReviewCommit:
|
|
|
183
210
|
"""
|
|
184
211
|
printer = Printer()
|
|
185
212
|
# 获取最新的提交信息
|
|
186
|
-
|
|
187
|
-
if not
|
|
213
|
+
changes = self.parse_history_tasks()
|
|
214
|
+
if not changes:
|
|
188
215
|
printer.print_in_terminal("no_latest_commit", style="red")
|
|
189
216
|
return None
|
|
190
217
|
|
|
191
218
|
# 调用LLM进行代码审查
|
|
192
219
|
try:
|
|
193
220
|
# 获取 prompt 内容
|
|
194
|
-
query = self.review.prompt(
|
|
221
|
+
query = self.review.prompt(changes, query)
|
|
195
222
|
new_conversations = conversations.copy()[0:-1]
|
|
196
223
|
new_conversations.append({"role": "user", "content": query})
|
|
197
224
|
# 构造对话消息
|
autocoder/auto_coder.py
CHANGED
|
@@ -48,6 +48,7 @@ from autocoder.utils.auto_coder_utils.chat_stream_out import stream_out
|
|
|
48
48
|
from autocoder.common.printer import Printer
|
|
49
49
|
from autocoder.rag.token_counter import count_tokens
|
|
50
50
|
from autocoder.privacy.model_filter import ModelPathFilter
|
|
51
|
+
from autocoder.common.result_manager import ResultManager
|
|
51
52
|
|
|
52
53
|
console = Console()
|
|
53
54
|
|
|
@@ -1062,6 +1063,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1062
1063
|
os.makedirs(memory_dir, exist_ok=True)
|
|
1063
1064
|
memory_file = os.path.join(memory_dir, "chat_history.json")
|
|
1064
1065
|
console = Console()
|
|
1066
|
+
result_manager = ResultManager()
|
|
1065
1067
|
if args.new_session:
|
|
1066
1068
|
if os.path.exists(memory_file):
|
|
1067
1069
|
with open(memory_file, "r") as f:
|
|
@@ -1077,6 +1079,13 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1077
1079
|
"conversation_history": []}
|
|
1078
1080
|
with open(memory_file, "w") as f:
|
|
1079
1081
|
json.dump(chat_history, f, ensure_ascii=False)
|
|
1082
|
+
|
|
1083
|
+
result_manager.add_result(content=get_message("new_session_started"), meta={
|
|
1084
|
+
"action": "chat",
|
|
1085
|
+
"input": {
|
|
1086
|
+
"query": args.query
|
|
1087
|
+
}
|
|
1088
|
+
})
|
|
1080
1089
|
console.print(
|
|
1081
1090
|
Panel(
|
|
1082
1091
|
get_message("new_session_started"),
|
|
@@ -1268,6 +1277,12 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1268
1277
|
with open(args.target_file, "w") as f:
|
|
1269
1278
|
f.write(chat_content)
|
|
1270
1279
|
|
|
1280
|
+
result_manager = ResultManager()
|
|
1281
|
+
result_manager.append(content=result,
|
|
1282
|
+
meta={"action": "chat","input":{
|
|
1283
|
+
"query":args.query
|
|
1284
|
+
}})
|
|
1285
|
+
|
|
1271
1286
|
# Update chat history with user's response
|
|
1272
1287
|
chat_history["ask_conversation"].append(
|
|
1273
1288
|
{"role": "assistant", "content": result}
|
|
@@ -1342,7 +1357,15 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1342
1357
|
model_name=model_name,
|
|
1343
1358
|
args=args
|
|
1344
1359
|
)
|
|
1345
|
-
|
|
1360
|
+
|
|
1361
|
+
result_manager = ResultManager()
|
|
1362
|
+
result_manager.append(content=assistant_response, meta={
|
|
1363
|
+
"action": "chat",
|
|
1364
|
+
"input": {
|
|
1365
|
+
"query": args.query
|
|
1366
|
+
}
|
|
1367
|
+
})
|
|
1368
|
+
|
|
1346
1369
|
# 打印耗时和token统计
|
|
1347
1370
|
if last_meta:
|
|
1348
1371
|
elapsed_time = time.time() - start_time
|