auto-coder 0.1.330__py3-none-any.whl → 0.1.331__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.330.dist-info → auto_coder-0.1.331.dist-info}/METADATA +1 -1
- {auto_coder-0.1.330.dist-info → auto_coder-0.1.331.dist-info}/RECORD +40 -40
- autocoder/agent/project_reader.py +1 -14
- autocoder/auto_coder.py +1 -24
- autocoder/command_args.py +1 -6
- autocoder/commands/tools.py +0 -13
- autocoder/common/__init__.py +6 -3
- autocoder/common/auto_coder_lang.py +12 -0
- autocoder/common/code_auto_generate.py +6 -160
- autocoder/common/code_auto_generate_diff.py +5 -111
- autocoder/common/code_auto_generate_editblock.py +5 -95
- autocoder/common/code_auto_generate_strict_diff.py +6 -112
- autocoder/common/code_auto_merge_editblock.py +1 -45
- autocoder/common/command_templates.py +2 -9
- autocoder/common/stream_out_type.py +3 -0
- autocoder/common/types.py +2 -1
- autocoder/common/v2/code_auto_generate.py +6 -4
- autocoder/common/v2/code_auto_generate_diff.py +4 -3
- autocoder/common/v2/code_auto_generate_editblock.py +9 -4
- autocoder/common/v2/code_auto_generate_strict_diff.py +182 -14
- autocoder/common/v2/code_auto_merge_diff.py +560 -306
- autocoder/common/v2/code_auto_merge_editblock.py +11 -44
- autocoder/common/v2/code_auto_merge_strict_diff.py +76 -7
- autocoder/common/v2/code_editblock_manager.py +141 -6
- autocoder/dispacher/actions/action.py +15 -28
- autocoder/dispacher/actions/plugins/action_regex_project.py +5 -9
- autocoder/helper/project_creator.py +0 -1
- autocoder/index/entry.py +0 -43
- autocoder/index/filter/normal_filter.py +0 -16
- autocoder/lang.py +2 -4
- autocoder/pyproject/__init__.py +2 -19
- autocoder/rag/cache/simple_cache.py +31 -6
- autocoder/regexproject/__init__.py +4 -22
- autocoder/suffixproject/__init__.py +6 -24
- autocoder/tsproject/__init__.py +5 -22
- autocoder/version.py +1 -1
- {auto_coder-0.1.330.dist-info → auto_coder-0.1.331.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.330.dist-info → auto_coder-0.1.331.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.330.dist-info → auto_coder-0.1.331.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.330.dist-info → auto_coder-0.1.331.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
autocoder/auto_coder.py,sha256=
|
|
2
|
+
autocoder/auto_coder.py,sha256=QmyewhE563ignvp-l8dCx09qXOMeieak1GS2Rqi_enY,65767
|
|
3
3
|
autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,3229
|
|
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
|
|
@@ -9,12 +9,12 @@ autocoder/auto_coder_server.py,sha256=bLORGEclcVdbBVfM140JCI8WtdrU0jbgqdJIVVupiE
|
|
|
9
9
|
autocoder/benchmark.py,sha256=Ypomkdzd1T3GE6dRICY3Hj547dZ6_inqJbBJIp5QMco,4423
|
|
10
10
|
autocoder/chat_auto_coder.py,sha256=SzH6fdoH8kJgARYXBu0CTB8J9PY8Q2T9CrIB844PXtM,25841
|
|
11
11
|
autocoder/chat_auto_coder_lang.py,sha256=p1SUPw1_YBHK69yNViXr6iFhHL-PjFnrXExA2mXJ5ko,21655
|
|
12
|
-
autocoder/command_args.py,sha256=
|
|
12
|
+
autocoder/command_args.py,sha256=HxflngkYtTrV17Vfgk6lyUyiG68jP2ftSc7FYr9AXwY,30585
|
|
13
13
|
autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,10013
|
|
14
|
-
autocoder/lang.py,sha256=
|
|
14
|
+
autocoder/lang.py,sha256=PFtATuOhHRnfpqHQkXr6p4C893JvpsgwTMif3l-GEi0,14321
|
|
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=
|
|
17
|
+
autocoder/version.py,sha256=yJ6WUFWfws0zYz86Smz11Y81MnSkSGeRfMKwHjLqzy8,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
|
|
@@ -25,37 +25,37 @@ autocoder/agent/auto_tool.py,sha256=DBzip-P_T6ZtT2eHexPcusmKYD0h7ufzp7TLwXAY10E,
|
|
|
25
25
|
autocoder/agent/coder.py,sha256=x6bdJwDuETGg9ebQnYlUWCxCtQcDGg73LtI6McpWslQ,72034
|
|
26
26
|
autocoder/agent/designer.py,sha256=EpRbzO58Xym3GrnppIT1Z8ZFAlnNfgzHbIzZ3PX-Yv8,27037
|
|
27
27
|
autocoder/agent/planner.py,sha256=SZTSZHxHzDmuWZo3K5fs79RwvJLWurg-nbJRRNbX65o,9195
|
|
28
|
-
autocoder/agent/project_reader.py,sha256=
|
|
28
|
+
autocoder/agent/project_reader.py,sha256=PuZSc5vpfNxSeUzCVljCfSh10IFR97C0zWw_0EnkaWE,17727
|
|
29
29
|
autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
30
|
autocoder/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
31
|
autocoder/commands/auto_command.py,sha256=fZ4TNU4YA9qdoVHmZX0rb6sV_N-DEcgSLaC5s3PGSHA,64200
|
|
32
32
|
autocoder/commands/auto_web.py,sha256=Cc0eb6JN3SvFy3GD_lpSLvIqj7F1eFDTcwg1t-zDcKg,39024
|
|
33
|
-
autocoder/commands/tools.py,sha256=
|
|
33
|
+
autocoder/commands/tools.py,sha256=g9azj-fCtbAezTgfy5kWQZBBzCiyRPR94NYY2rp-URE,31317
|
|
34
34
|
autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
|
|
35
35
|
autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
|
|
36
|
-
autocoder/common/__init__.py,sha256=
|
|
36
|
+
autocoder/common/__init__.py,sha256=zTl8hcMCkRoLmdhP0-8unRDApqGUWF6YtYAKXlVdAV4,14440
|
|
37
37
|
autocoder/common/action_yml_file_manager.py,sha256=DdF5P1R_B_chCnnqoA2IgogakWLZk_nItiJZUfX0_Wo,17857
|
|
38
38
|
autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
|
|
39
39
|
autocoder/common/anything2img.py,sha256=iZQmg8srXlD7N5uGl5b_ONKJMBjYoW8kPmokkG6ISF0,10118
|
|
40
40
|
autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
|
|
41
|
-
autocoder/common/auto_coder_lang.py,sha256=
|
|
41
|
+
autocoder/common/auto_coder_lang.py,sha256=c665tX3zqHhew0JBL2Vig-KjGf9uwsIPi673EjbhkI0,39067
|
|
42
42
|
autocoder/common/auto_configure.py,sha256=D4N-fl9v8bKM5-Ds-uhkC2uGDmHH_ZjLJ759F8KXMKs,13129
|
|
43
43
|
autocoder/common/buildin_tokenizer.py,sha256=L7d5t39ZFvUd6EoMPXUhYK1toD0FHlRH1jtjKRGokWU,1236
|
|
44
44
|
autocoder/common/chunk_validation.py,sha256=BrR_ZWavW8IANuueEE7hS8NFAwEvm8TX34WnPx_1hs8,3030
|
|
45
45
|
autocoder/common/cleaner.py,sha256=NU72i8C6o9m0vXExab7nao5bstBUsfJFcj11cXa9l4U,1089
|
|
46
46
|
autocoder/common/code_auto_execute.py,sha256=4KXGmiGObr_B1d6tzV9dwS6MifCSc3Gm4j2d6ildBXQ,6867
|
|
47
|
-
autocoder/common/code_auto_generate.py,sha256=
|
|
48
|
-
autocoder/common/code_auto_generate_diff.py,sha256=
|
|
49
|
-
autocoder/common/code_auto_generate_editblock.py,sha256=
|
|
50
|
-
autocoder/common/code_auto_generate_strict_diff.py,sha256=
|
|
47
|
+
autocoder/common/code_auto_generate.py,sha256=0TuyfWdWeddBlgCzPC3JtJnYGBWa8idgSC6Oe3AXRz4,11634
|
|
48
|
+
autocoder/common/code_auto_generate_diff.py,sha256=ULsGMmo0zQ-7e0HzLB8YRFxk_mnb642KZFcUZ3No8Ns,18480
|
|
49
|
+
autocoder/common/code_auto_generate_editblock.py,sha256=1Ut08WskHURfo5zWV7vezxFWwVEXOzU840IzPCQj3Nc,21192
|
|
50
|
+
autocoder/common/code_auto_generate_strict_diff.py,sha256=2AZpweA8tv-wfg5ZHs5f2VAxJtq7C43Fw8dbGJxL778,17363
|
|
51
51
|
autocoder/common/code_auto_merge.py,sha256=WaU-T-ZVn3QDaA_SrdkHciUPKDcTfVa-IbhHKBYEv5w,9961
|
|
52
52
|
autocoder/common/code_auto_merge_diff.py,sha256=DcljWrtlejq2cb9Gj-jBjvUQzRbCE2uMNGg8SBOhEnk,19271
|
|
53
|
-
autocoder/common/code_auto_merge_editblock.py,sha256=
|
|
53
|
+
autocoder/common/code_auto_merge_editblock.py,sha256=5PLH8Ey4GYsPNMGn36pSy_IgwgZ8-j1QF5FEv-THC-0,18397
|
|
54
54
|
autocoder/common/code_auto_merge_strict_diff.py,sha256=C35pFxhkgypsm50VDAFOBAT6YXMtzKTvIpEUH1GjZZg,13209
|
|
55
55
|
autocoder/common/code_modification_ranker.py,sha256=Ld3wtjV10zW7lN_L3bKEsvi7RvAleB8r1DD9eLmVnx4,13462
|
|
56
56
|
autocoder/common/command_completer.py,sha256=jBFi8Y1xWmMcxwdDz6Gs7r8ADFPb7eRr9egWU0vLxLo,35787
|
|
57
57
|
autocoder/common/command_generator.py,sha256=YwB_E818vx0fQDOpLD61GivsSgLnrIoxKrY22ka49JU,2797
|
|
58
|
-
autocoder/common/command_templates.py,sha256=
|
|
58
|
+
autocoder/common/command_templates.py,sha256=HjI-lo7H-XeQGsHKUtEI3vnhFH1QFibW9X7fahim8oE,8259
|
|
59
59
|
autocoder/common/computer_use.py,sha256=Z5RL-DgkcbF55YDsqnJ37loXGcm_1tzTheukjTTayJM,35816
|
|
60
60
|
autocoder/common/conf_import_export.py,sha256=w__WsIobe6nmsGns2pV-laU7R5ZvtQNuIbXebxhbY7A,3967
|
|
61
61
|
autocoder/common/conf_validator.py,sha256=EzSmadpZ22D9e8iWmfeWodUeYJt0IgMoaAOmCleXliI,8795
|
|
@@ -83,26 +83,26 @@ autocoder/common/search.py,sha256=245iPFgWhMldoUK3CqCP89ltaxZiNPK73evoG6Fp1h8,16
|
|
|
83
83
|
autocoder/common/search_replace.py,sha256=GphFkc57Hb673CAwmbiocqTbw8vrV7TrZxtOhD0332g,22147
|
|
84
84
|
autocoder/common/shells.py,sha256=elminFpNosnV0hsEUcsugDxlGO8NfH96uah-8bkaBvA,19929
|
|
85
85
|
autocoder/common/stats_panel.py,sha256=wGl9O45pjVVDxhNumLv4_NfLYSlUP_18Tw4hcJSjw50,4596
|
|
86
|
-
autocoder/common/stream_out_type.py,sha256=
|
|
86
|
+
autocoder/common/stream_out_type.py,sha256=V4bWuIrhl4Xgao2s15YzEIHee-B89yIgxMf9-rFR_xo,584
|
|
87
87
|
autocoder/common/sys_prompt.py,sha256=JlexfjZt554faqbgkCmzOJqYUzDHfbnxly5ugFfHfEE,26403
|
|
88
88
|
autocoder/common/text.py,sha256=KGRQq314GHBmY4MWG8ossRoQi1_DTotvhxchpn78c-k,1003
|
|
89
89
|
autocoder/common/token_cost_caculate.py,sha256=MSWJtl7YpQSUt-gFQoqUcJMblyPqHXe2ZioiZOFkV80,10085
|
|
90
|
-
autocoder/common/types.py,sha256
|
|
90
|
+
autocoder/common/types.py,sha256=-WC8AsXFsbX2NV7janGY-zw0-W6JsAHRvKJiXimiv4w,693
|
|
91
91
|
autocoder/common/utils_code_auto_generate.py,sha256=Tvb3Mqxedj0Jhi0faKyWvILuNCty9fZi341fyIs33tA,4550
|
|
92
92
|
autocoder/common/mcp_servers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
93
93
|
autocoder/common/mcp_servers/mcp_server_gpt4o_mini_search.py,sha256=TApShxgoozLluobXHOK1-oAE1zm0-9jdRoPLQB1qwMI,5688
|
|
94
94
|
autocoder/common/mcp_servers/mcp_server_perplexity.py,sha256=CIC26UkfH1lYoVCjfyY5xGGYVx8h0oz0Uj1c7YJ3OPw,5560
|
|
95
95
|
autocoder/common/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
|
-
autocoder/common/v2/code_auto_generate.py,sha256=
|
|
97
|
-
autocoder/common/v2/code_auto_generate_diff.py,sha256=
|
|
98
|
-
autocoder/common/v2/code_auto_generate_editblock.py,sha256=
|
|
99
|
-
autocoder/common/v2/code_auto_generate_strict_diff.py,sha256=
|
|
96
|
+
autocoder/common/v2/code_auto_generate.py,sha256=sbCuIKTXih22_4smECpiGYUZTzRxZ1lJTQwvKr1iSg4,9279
|
|
97
|
+
autocoder/common/v2/code_auto_generate_diff.py,sha256=fAubSNnMjhfWQ2pSbraiPkreV9ZWeItSn22i9IKeTAk,14495
|
|
98
|
+
autocoder/common/v2/code_auto_generate_editblock.py,sha256=pPURKddglbRKg9qz0peVa5tDNxxofLwjtU1GO3RPkUk,15011
|
|
99
|
+
autocoder/common/v2/code_auto_generate_strict_diff.py,sha256=Eym7FU3Iz4T98imykBHEjPPCajfi7PYnZhpvz-9U3dk,17386
|
|
100
100
|
autocoder/common/v2/code_auto_merge.py,sha256=FZHrIZyFUkFmv4EbproXfIIUfGx_L3EPfvjldsYlplI,9345
|
|
101
|
-
autocoder/common/v2/code_auto_merge_diff.py,sha256=
|
|
102
|
-
autocoder/common/v2/code_auto_merge_editblock.py,sha256=
|
|
103
|
-
autocoder/common/v2/code_auto_merge_strict_diff.py,sha256=
|
|
101
|
+
autocoder/common/v2/code_auto_merge_diff.py,sha256=DcljWrtlejq2cb9Gj-jBjvUQzRbCE2uMNGg8SBOhEnk,19271
|
|
102
|
+
autocoder/common/v2/code_auto_merge_editblock.py,sha256=yQ8FsFM54Uu9kxy2XciSx7Z1mWAqHQ9dW982YDp7Iqg,20729
|
|
103
|
+
autocoder/common/v2/code_auto_merge_strict_diff.py,sha256=C35pFxhkgypsm50VDAFOBAT6YXMtzKTvIpEUH1GjZZg,13209
|
|
104
104
|
autocoder/common/v2/code_diff_manager.py,sha256=ciXviNjldX9ce9lgIvmWoG_8JT2GnwRW8U7QCWVdAH0,10512
|
|
105
|
-
autocoder/common/v2/code_editblock_manager.py,sha256=
|
|
105
|
+
autocoder/common/v2/code_editblock_manager.py,sha256=WyOj0uuJfqQdX7vxC74L-sZXqXCOg88CzfQLr6VKfBw,22756
|
|
106
106
|
autocoder/common/v2/code_manager.py,sha256=C403bS-f6urixwitlKHcml-J03hci-UyNwHJOqBiY6Q,9182
|
|
107
107
|
autocoder/common/v2/code_strict_diff_manager.py,sha256=v-J1kDyLg7tLGg_6_lbO9S4fNkx7M_L8Xr2G7fPptiU,9347
|
|
108
108
|
autocoder/compilers/__init__.py,sha256=C0HOms70QA747XD0uZEMmGtRFcIPenohyqECNStv0Bw,1647
|
|
@@ -123,10 +123,10 @@ autocoder/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
123
123
|
autocoder/db/store.py,sha256=tFT66bP2ZKIqZip-uhLkHRSLaaOAUUDZfozJwcqix3c,1908
|
|
124
124
|
autocoder/dispacher/__init__.py,sha256=GTGpU9KbyAu3QMsbecnETYHMoIDBfKKP8iEVsU8gKcg,957
|
|
125
125
|
autocoder/dispacher/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
126
|
-
autocoder/dispacher/actions/action.py,sha256=
|
|
126
|
+
autocoder/dispacher/actions/action.py,sha256=bsrJA7GfjL0AWtC9AsXlxPL1Rd_-ycHRGWhSvTNWq_M,22609
|
|
127
127
|
autocoder/dispacher/actions/copilot.py,sha256=2nQzKt8Sr40mIDOizZWyl4ekCwaHYklvgGlVfvhOlFM,13106
|
|
128
128
|
autocoder/dispacher/actions/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
129
|
-
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=
|
|
129
|
+
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=sbK9yFRaq8RytwWG-NxuJJMQDgsZwBjST3StObMQksc,7811
|
|
130
130
|
autocoder/dispacher/actions/plugins/action_translate.py,sha256=GEn7dZA22jy5WyzINomjmzzB795p2Olg-CJla97lRF8,7744
|
|
131
131
|
autocoder/events/__init__.py,sha256=1x_juwr9Ows2RADDa2LyI4QlmPxOVOXZeLO1cht-slM,1443
|
|
132
132
|
autocoder/events/event_content.py,sha256=g55Z55s-ud9IzYp6u7BnLSsHHAAg34w1jrHo-C1w68A,12280
|
|
@@ -135,15 +135,15 @@ autocoder/events/event_manager_singleton.py,sha256=8aBp97fgbas0KYrpHbljTg2n4RcWd
|
|
|
135
135
|
autocoder/events/event_store.py,sha256=y6tT3P-o3yhDptrKi-UmqI_ZBNg7v21FriI3f7lo_ME,12709
|
|
136
136
|
autocoder/events/event_types.py,sha256=wONd3wC_BhGXTbXIlb4kFIr7gkhYSBjQE30JjTc8tnU,3558
|
|
137
137
|
autocoder/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
138
|
-
autocoder/helper/project_creator.py,sha256=
|
|
138
|
+
autocoder/helper/project_creator.py,sha256=YPqWV6nyMQnlpv_lqVIo-oFZ_TgQVs9L2J040WqEZWo,17325
|
|
139
139
|
autocoder/index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
140
|
-
autocoder/index/entry.py,sha256=
|
|
140
|
+
autocoder/index/entry.py,sha256=4C3m3F9Hxmq8sIchrZ7e90a0VAGrSYUWTKQeggBXXrQ,14046
|
|
141
141
|
autocoder/index/for_command.py,sha256=BFvljE4t6VaMBGboZAuhUCzVK0EitCy_n5D_7FEnihw,3204
|
|
142
142
|
autocoder/index/index.py,sha256=-_GtT67ERxqdI4ajDyWr2cTsordpG_G9SYSwbTxDAcA,32491
|
|
143
143
|
autocoder/index/symbols_utils.py,sha256=_EP7E_qWXxluAxq3FGZLlLfdrfwx3FmxCdulI8VGuac,2244
|
|
144
144
|
autocoder/index/types.py,sha256=a2s_KV5FJlq7jqA2ELSo9E1sjuLwDB-JJYMhSpzBAhU,596
|
|
145
145
|
autocoder/index/filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
146
|
-
autocoder/index/filter/normal_filter.py,sha256=
|
|
146
|
+
autocoder/index/filter/normal_filter.py,sha256=W8UD2a8yWRx41PBx-GzlLETEkU9uhDnQcLdJ3rPxZsI,7567
|
|
147
147
|
autocoder/index/filter/quick_filter.py,sha256=ozESEgy506FQ5ecjOumyo4D_KMrterB1QLmnVtiyOiM,43264
|
|
148
148
|
autocoder/linters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
149
149
|
autocoder/linters/base_linter.py,sha256=1_0DPESnSyF3ZcQhoFkBYJylT5w-B61Rx-3A9uhuPlg,3066
|
|
@@ -167,7 +167,7 @@ autocoder/plugins/token_helper_plugin.py,sha256=ST4SbZNP6k7SLQDkKbulhTyWCruytiUy
|
|
|
167
167
|
autocoder/plugins/utils.py,sha256=ht_BM5V4b161PatTTbGkpW6TBddC23fR7uW-Ywb2zU4,263
|
|
168
168
|
autocoder/privacy/__init__.py,sha256=LnIVvGu_K66zCE-yhN_-dPO8R80pQyedCsXJ7wRqQaI,72
|
|
169
169
|
autocoder/privacy/model_filter.py,sha256=-N9ZvxxDKpxU7hkn-tKv-QHyXjvkCopUaKgvJwTOGQs,3369
|
|
170
|
-
autocoder/pyproject/__init__.py,sha256=
|
|
170
|
+
autocoder/pyproject/__init__.py,sha256=qn0_-6O_LP-ZH91nneYrn3yaIMYCYYRD1Z3MSNhXUXI,13754
|
|
171
171
|
autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
172
172
|
autocoder/rag/api_server.py,sha256=StGyxrM-7-W2vYHJq-i_Fv-MHrl9UgVWY272Hd-6VJ4,13090
|
|
173
173
|
autocoder/rag/conversation_to_queries.py,sha256=xwmErn4WbdADnhK1me-h_6fV3KYrl_y1qPNQl1aoI6o,4810
|
|
@@ -199,7 +199,7 @@ autocoder/rag/cache/file_monitor_cache.py,sha256=OdSXTH3vo6inAzkN5d55I0RN03GUlSl
|
|
|
199
199
|
autocoder/rag/cache/local_byzer_storage_cache.py,sha256=1xskK7X_hFEAsHHoT_F9lFYhQOTrpQtsFyFCIeI2Mvk,31964
|
|
200
200
|
autocoder/rag/cache/local_duckdb_storage_cache.py,sha256=37WH2mlOgykBUrp6ow43kcaaKFZc1CRTkNLSFdELPcE,32714
|
|
201
201
|
autocoder/rag/cache/rag_file_meta.py,sha256=RQ3n4wfkHlB-1ljS3sFSi8ijbsUPeIqBSgjmmbRuwRI,20521
|
|
202
|
-
autocoder/rag/cache/simple_cache.py,sha256=
|
|
202
|
+
autocoder/rag/cache/simple_cache.py,sha256=yGmt8iXY2ZVif4_2-_DqWGl_zG0fzgSI3tUOxvdqHZU,14230
|
|
203
203
|
autocoder/rag/loaders/__init__.py,sha256=EQHEZ5Cmz-mGP2SllUTvcIbYCnF7W149dNpNItfs0yE,304
|
|
204
204
|
autocoder/rag/loaders/docx_loader.py,sha256=ZswPqiiLngUEpzLhNNm1nmwEYV7ZHFEfIoXoG7c5GDU,614
|
|
205
205
|
autocoder/rag/loaders/excel_loader.py,sha256=Ue8YB1z_kBs8SjIPuBskyM08Q1JiONs_BJZPrzi59oo,896
|
|
@@ -209,11 +209,11 @@ autocoder/rag/stream_event/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
|
209
209
|
autocoder/rag/stream_event/event_writer.py,sha256=l7kq_LnDDE8E5dZ-73C7J2MgzSL7WrozdXk0eV-k55Q,409
|
|
210
210
|
autocoder/rag/stream_event/types.py,sha256=rtLwOE8rShmi1dJdxyBpAV5ZjLBGG9vptMiSzMxGuIA,318
|
|
211
211
|
autocoder/regex_project/__init__.py,sha256=EBZeCL5ORyD_9_5u_UuG4s7XtpXOu0y1sWDmxWFtufE,6781
|
|
212
|
-
autocoder/regexproject/__init__.py,sha256=
|
|
212
|
+
autocoder/regexproject/__init__.py,sha256=QMXphSxjuv_LDIx0L_0jnnvCzMfmrOl0VMTVmXabeL0,8976
|
|
213
213
|
autocoder/shadows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
214
214
|
autocoder/shadows/shadow_manager.py,sha256=pRojC9vW6Thhb1WcUtW_NvShsAh7fRP_HZHaKTKc5Aw,19189
|
|
215
|
-
autocoder/suffixproject/__init__.py,sha256=
|
|
216
|
-
autocoder/tsproject/__init__.py,sha256=
|
|
215
|
+
autocoder/suffixproject/__init__.py,sha256=XZwHQuY5QLRpb__wS2Kad2wQGHSuY-PoANkdwGl0D6s,10354
|
|
216
|
+
autocoder/tsproject/__init__.py,sha256=e_TWVyXQQxYKsXqdQZuFVqNCQLdtBVNJRTs0fgLXVdA,11055
|
|
217
217
|
autocoder/utils/__init__.py,sha256=W47ac6IOZhNR1rdbho9fvhHnPI_N1i4oMcZOwxLelbU,1123
|
|
218
218
|
autocoder/utils/_markitdown.py,sha256=RU88qn4eZfYIy0GDrPxlI8oYXIypbi63VRJjdlnE0VU,47431
|
|
219
219
|
autocoder/utils/auto_project_type.py,sha256=9_-wE9aavjbPiNSUVKxttJAdu5i5fu-zHyPYHr5XtWk,4422
|
|
@@ -238,9 +238,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
238
238
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
239
239
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=xuBeWD0YOckqRo8JB1WkVIMOYH6c24m7JfV4svBfPDo,15113
|
|
240
240
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
241
|
-
auto_coder-0.1.
|
|
242
|
-
auto_coder-0.1.
|
|
243
|
-
auto_coder-0.1.
|
|
244
|
-
auto_coder-0.1.
|
|
245
|
-
auto_coder-0.1.
|
|
246
|
-
auto_coder-0.1.
|
|
241
|
+
auto_coder-0.1.331.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
242
|
+
auto_coder-0.1.331.dist-info/METADATA,sha256=XZ9ZAEw5zdve-Ng2HOdN4JOwDV4lSKBdbJ-fMvap9T0,2747
|
|
243
|
+
auto_coder-0.1.331.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
244
|
+
auto_coder-0.1.331.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
245
|
+
auto_coder-0.1.331.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
246
|
+
auto_coder-0.1.331.dist-info/RECORD,,
|
|
@@ -185,20 +185,7 @@ def get_tools(args: AutoCoderArgs, llm: byzerllm.ByzerLLM):
|
|
|
185
185
|
返回值是 用户对你问题的回答。
|
|
186
186
|
|
|
187
187
|
注意,尽量不要询问用户,除非你感受到你无法回答用户的问题。
|
|
188
|
-
'''
|
|
189
|
-
|
|
190
|
-
if args.request_id and not args.silence and not args.skip_events:
|
|
191
|
-
event_data = {
|
|
192
|
-
"question": question
|
|
193
|
-
}
|
|
194
|
-
response_json = queue_communicate.send_event(
|
|
195
|
-
request_id=args.request_id,
|
|
196
|
-
event=CommunicateEvent(
|
|
197
|
-
event_type=CommunicateEventType.ASK_HUMAN.value,
|
|
198
|
-
data=json.dumps(event_data, ensure_ascii=False),
|
|
199
|
-
),
|
|
200
|
-
)
|
|
201
|
-
return response_json
|
|
188
|
+
'''
|
|
202
189
|
|
|
203
190
|
console = Console()
|
|
204
191
|
|
autocoder/auto_coder.py
CHANGED
|
@@ -475,30 +475,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
475
475
|
border_style="blue",
|
|
476
476
|
expand=False,
|
|
477
477
|
)
|
|
478
|
-
)
|
|
479
|
-
|
|
480
|
-
if args.request_id and not args.silence and not args.skip_events:
|
|
481
|
-
event_data = {
|
|
482
|
-
"instruction": final_ins,
|
|
483
|
-
"model": model,
|
|
484
|
-
"request_id": args.request_id,
|
|
485
|
-
}
|
|
486
|
-
response_json = queue_communicate.send_event(
|
|
487
|
-
request_id=args.request_id,
|
|
488
|
-
event=CommunicateEvent(
|
|
489
|
-
event_type=CommunicateEventType.CODE_HUMAN_AS_MODEL.value,
|
|
490
|
-
data=json.dumps(event_data, ensure_ascii=False),
|
|
491
|
-
),
|
|
492
|
-
)
|
|
493
|
-
response = json.loads(response_json)
|
|
494
|
-
v = [
|
|
495
|
-
{
|
|
496
|
-
"predict": response["value"],
|
|
497
|
-
"input": input_value[0]["instruction"],
|
|
498
|
-
"metadata": {},
|
|
499
|
-
}
|
|
500
|
-
]
|
|
501
|
-
return False, v
|
|
478
|
+
)
|
|
502
479
|
|
|
503
480
|
lines = []
|
|
504
481
|
while True:
|
autocoder/command_args.py
CHANGED
|
@@ -195,12 +195,7 @@ def parse_args(input_args: Optional[List[str]] = None) -> AutoCoderArgs:
|
|
|
195
195
|
parser.add_argument(
|
|
196
196
|
"--image_max_iter", type=int, default=1, help=desc["image_max_iter"]
|
|
197
197
|
)
|
|
198
|
-
|
|
199
|
-
parser.add_argument(
|
|
200
|
-
"--enable_multi_round_generate",
|
|
201
|
-
action="store_true",
|
|
202
|
-
help=desc["enable_multi_round_generate"],
|
|
203
|
-
)
|
|
198
|
+
|
|
204
199
|
parser.add_argument(
|
|
205
200
|
"--skip_confirm", action="store_true", help=desc["skip_confirm"]
|
|
206
201
|
)
|
autocoder/commands/tools.py
CHANGED
|
@@ -105,19 +105,6 @@ class AutoCommandTools:
|
|
|
105
105
|
注意,尽量不要询问用户,除非你感受到你无法回答用户的问题。
|
|
106
106
|
'''
|
|
107
107
|
|
|
108
|
-
if self.args.request_id and not self.args.silence and not self.args.skip_events:
|
|
109
|
-
event_data = {
|
|
110
|
-
"question": question
|
|
111
|
-
}
|
|
112
|
-
response_json = queue_communicate.send_event(
|
|
113
|
-
request_id=self.args.request_id,
|
|
114
|
-
event=CommunicateEvent(
|
|
115
|
-
event_type=CommunicateEventType.ASK_HUMAN.value,
|
|
116
|
-
data=json.dumps(event_data, ensure_ascii=False),
|
|
117
|
-
),
|
|
118
|
-
)
|
|
119
|
-
return response_json
|
|
120
|
-
|
|
121
108
|
# 如果是在web模式下,则使用event_manager事件来询问用户
|
|
122
109
|
if get_run_context().is_web():
|
|
123
110
|
answer = get_event_manager(
|
autocoder/common/__init__.py
CHANGED
|
@@ -244,7 +244,7 @@ class AutoCoderArgs(pydantic.BaseModel):
|
|
|
244
244
|
execute: Optional[bool] = None
|
|
245
245
|
package_name: Optional[str] = ""
|
|
246
246
|
script_path: Optional[str] = ""
|
|
247
|
-
|
|
247
|
+
|
|
248
248
|
model: Optional[str] = ""
|
|
249
249
|
chat_model: Optional[str] = ""
|
|
250
250
|
model_max_length: Optional[int] = 2000
|
|
@@ -326,13 +326,14 @@ class AutoCoderArgs(pydantic.BaseModel):
|
|
|
326
326
|
image_max_iter: Optional[int] = 1
|
|
327
327
|
|
|
328
328
|
urls: Optional[Union[str, List[str]]] = ""
|
|
329
|
-
urls_use_model: Optional[bool] = False
|
|
330
|
-
enable_multi_round_generate: Optional[bool] = False
|
|
329
|
+
urls_use_model: Optional[bool] = False
|
|
331
330
|
command: Optional[str] = None
|
|
332
331
|
doc_command: Optional[str] = None
|
|
333
332
|
required_exts: Optional[str] = None
|
|
334
333
|
hybrid_index_max_output_tokens: Optional[int] = 1000000
|
|
335
334
|
|
|
335
|
+
enable_multi_round_generate: Optional[bool] = False
|
|
336
|
+
|
|
336
337
|
monitor_mode: bool = False
|
|
337
338
|
enable_hybrid_index: bool = False
|
|
338
339
|
rag_build_name: Optional[str] = None
|
|
@@ -420,9 +421,11 @@ class AutoCoderArgs(pydantic.BaseModel):
|
|
|
420
421
|
|
|
421
422
|
enable_auto_fix_lint: Optional[bool] = False
|
|
422
423
|
enable_auto_fix_compile: Optional[bool] = False
|
|
424
|
+
enable_auto_fix_merge: Optional[bool] = False
|
|
423
425
|
|
|
424
426
|
auto_fix_lint_max_attempts: Optional[int] = 5
|
|
425
427
|
auto_fix_compile_max_attempts: Optional[int] = 5
|
|
428
|
+
auto_fix_merge_max_attempts: Optional[int] = 5
|
|
426
429
|
|
|
427
430
|
ignore_clean_shadows: Optional[bool] = False
|
|
428
431
|
|
|
@@ -773,6 +773,18 @@ MESSAGES = {
|
|
|
773
773
|
"max_compile_attempts_reached": {
|
|
774
774
|
"en": "Maximum compilation attempts reached",
|
|
775
775
|
"zh": "已达到最大编译尝试次数"
|
|
776
|
+
},
|
|
777
|
+
"unmerged_blocks_fixed": {
|
|
778
|
+
"en": "Unmerged blocks fixed successfully",
|
|
779
|
+
"zh": "未合并代码块已成功修复"
|
|
780
|
+
},
|
|
781
|
+
"unmerged_blocks_attempt_status": {
|
|
782
|
+
"en": "Fixing unmerged blocks attempt {{attempt}}/{{max_correction_attempts}}",
|
|
783
|
+
"zh": "正在尝试修复未合并代码块 {{attempt}}/{{max_correction_attempts}}"
|
|
784
|
+
},
|
|
785
|
+
"max_unmerged_blocks_attempts_reached": {
|
|
786
|
+
"en": "Maximum unmerged blocks fix attempts reached",
|
|
787
|
+
"zh": "已达到最大未合并代码块修复尝试次数"
|
|
776
788
|
}
|
|
777
789
|
}
|
|
778
790
|
|
|
@@ -51,69 +51,7 @@ class CodeAutoGenerate:
|
|
|
51
51
|
{{ instruction }}
|
|
52
52
|
|
|
53
53
|
"""
|
|
54
|
-
|
|
55
|
-
@byzerllm.prompt(llm=lambda self: self.llm)
|
|
56
|
-
def multi_round_instruction(
|
|
57
|
-
self, instruction: str, content: str, context: str = "", package_context: str = ""
|
|
58
|
-
) -> str:
|
|
59
|
-
"""
|
|
60
|
-
{%- if structure %}
|
|
61
|
-
{{ structure }}
|
|
62
|
-
{%- endif %}
|
|
63
|
-
|
|
64
|
-
{%- if content %}
|
|
65
|
-
下面是一些文件路径以及每个文件对应的源码:
|
|
66
|
-
<files>
|
|
67
|
-
{{ content }}
|
|
68
|
-
</files>
|
|
69
|
-
{%- endif %}
|
|
70
|
-
|
|
71
|
-
{%- if package_context %}
|
|
72
|
-
下面是上面文件的一些信息(包括最近的变更情况):
|
|
73
|
-
<package_context>
|
|
74
|
-
{{ package_context }}
|
|
75
|
-
</package_context>
|
|
76
|
-
{%- endif %}
|
|
77
|
-
|
|
78
|
-
{%- if context %}
|
|
79
|
-
<extra_context>
|
|
80
|
-
{{ context }}
|
|
81
|
-
</extra_context>
|
|
82
|
-
{%- endif %}
|
|
83
|
-
|
|
84
|
-
下面是用户的需求:
|
|
85
|
-
|
|
86
|
-
{{ instruction }}
|
|
87
|
-
|
|
88
|
-
如果你需要生成代码,你生成的代码要符合这个格式:
|
|
89
|
-
|
|
90
|
-
```{lang}
|
|
91
|
-
##File: {FILE_PATH}
|
|
92
|
-
{CODE}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
```{lang}
|
|
96
|
-
##File: {FILE_PATH}
|
|
97
|
-
{CODE}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
其中,{lang}是代码的语言,{CODE}是代码的内容, {FILE_PATH} 是文件的路径(请尽量使用绝对路径),他们都在代码块中,请严格按上面的格式进行内容生成。
|
|
101
|
-
每次生成一个文件的代码,然后询问我是否继续,当我回复继续,继续生成下一个文件的代码。当没有后续任务时,请回复 "__完成__" 或者 "__EOF__"。
|
|
102
|
-
请确保每份代码的完整性,而不要只生成修改部分。
|
|
103
|
-
"""
|
|
104
|
-
|
|
105
|
-
if not self.args.include_project_structure:
|
|
106
|
-
return {
|
|
107
|
-
"structure": "",
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return {
|
|
111
|
-
"structure": (
|
|
112
|
-
self.action.pp.get_tree_like_directory_structure()
|
|
113
|
-
if self.action
|
|
114
|
-
else ""
|
|
115
|
-
)
|
|
116
|
-
}
|
|
54
|
+
|
|
117
55
|
|
|
118
56
|
@byzerllm.prompt(llm=lambda self: self.llm)
|
|
119
57
|
def single_round_instruction(
|
|
@@ -197,15 +135,6 @@ class CodeAutoGenerate:
|
|
|
197
135
|
source_code_list = SourceCodeList(filtered_sources)
|
|
198
136
|
source_content = source_code_list.to_str()
|
|
199
137
|
|
|
200
|
-
if self.args.request_id and not self.args.skip_events:
|
|
201
|
-
queue_communicate.send_event_no_wait(
|
|
202
|
-
request_id=self.args.request_id,
|
|
203
|
-
event=CommunicateEvent(
|
|
204
|
-
event_type=CommunicateEventType.CODE_GENERATE_START.value,
|
|
205
|
-
data=query,
|
|
206
|
-
),
|
|
207
|
-
)
|
|
208
|
-
|
|
209
138
|
# 获取包上下文信息
|
|
210
139
|
package_context = ""
|
|
211
140
|
|
|
@@ -264,15 +193,16 @@ class CodeAutoGenerate:
|
|
|
264
193
|
if not self.args.human_as_model:
|
|
265
194
|
with ThreadPoolExecutor(max_workers=len(self.llms) * self.generate_times_same_model) as executor:
|
|
266
195
|
futures = []
|
|
196
|
+
count = 0
|
|
267
197
|
for llm in self.llms:
|
|
268
198
|
model_names_list = llm_utils.get_llm_names(llm)
|
|
269
199
|
model_name = None
|
|
270
200
|
if model_names_list:
|
|
271
201
|
model_name = model_names_list[0]
|
|
272
202
|
|
|
273
|
-
for
|
|
203
|
+
for _ in range(self.generate_times_same_model):
|
|
274
204
|
model_names.append(model_name)
|
|
275
|
-
if
|
|
205
|
+
if count == 0:
|
|
276
206
|
def job():
|
|
277
207
|
stream_generator = stream_chat_with_continue(
|
|
278
208
|
llm=llm,
|
|
@@ -303,7 +233,7 @@ class CodeAutoGenerate:
|
|
|
303
233
|
llm_config=llm_config,
|
|
304
234
|
args=self.args
|
|
305
235
|
))
|
|
306
|
-
|
|
236
|
+
count += 1
|
|
307
237
|
temp_results = [future.result() for future in futures]
|
|
308
238
|
for result in temp_results:
|
|
309
239
|
results.append(result.content)
|
|
@@ -338,90 +268,6 @@ class CodeAutoGenerate:
|
|
|
338
268
|
"generated_tokens_cost": generated_tokens_cost
|
|
339
269
|
}
|
|
340
270
|
|
|
341
|
-
if self.args.request_id and not self.args.skip_events:
|
|
342
|
-
queue_communicate.send_event_no_wait(
|
|
343
|
-
request_id=self.args.request_id,
|
|
344
|
-
event=CommunicateEvent(
|
|
345
|
-
event_type=CommunicateEventType.CODE_GENERATE_END.value,
|
|
346
|
-
data=json.dumps(statistics, ensure_ascii=False),
|
|
347
|
-
),
|
|
348
|
-
)
|
|
349
|
-
|
|
350
271
|
return CodeGenerateResult(contents=results, conversations=conversations_list, metadata=statistics)
|
|
351
272
|
|
|
352
|
-
|
|
353
|
-
self, query: str, source_code_list: SourceCodeList, max_steps: int = 10
|
|
354
|
-
) -> Tuple[List[str], List[Dict[str, str]]]:
|
|
355
|
-
llm_config = {"human_as_model": self.args.human_as_model}
|
|
356
|
-
result = []
|
|
357
|
-
source_content = source_code_list.to_str()
|
|
358
|
-
|
|
359
|
-
# 获取包上下文信息
|
|
360
|
-
package_context = ""
|
|
361
|
-
|
|
362
|
-
if self.args.enable_active_context:
|
|
363
|
-
# 初始化活动上下文管理器
|
|
364
|
-
active_context_manager = ActiveContextManager(self.llm, self.args.source_dir)
|
|
365
|
-
# 获取活动上下文信息
|
|
366
|
-
result = active_context_manager.load_active_contexts_for_files(
|
|
367
|
-
[source.module_name for source in source_code_list.sources]
|
|
368
|
-
)
|
|
369
|
-
# 将活动上下文信息格式化为文本
|
|
370
|
-
if result.contexts:
|
|
371
|
-
package_context_parts = []
|
|
372
|
-
for dir_path, context in result.contexts.items():
|
|
373
|
-
package_context_parts.append(f"<package_info>{context.content}</package_info>")
|
|
374
|
-
|
|
375
|
-
package_context = "\n".join(package_context_parts)
|
|
376
|
-
|
|
377
|
-
if self.args.template == "common":
|
|
378
|
-
init_prompt = self.multi_round_instruction.prompt(
|
|
379
|
-
instruction=query, content=source_content, context=self.args.context,
|
|
380
|
-
package_context=package_context
|
|
381
|
-
)
|
|
382
|
-
elif self.args.template == "auto_implement":
|
|
383
|
-
init_prompt = self.auto_implement_function.prompt(
|
|
384
|
-
instruction=query, content=source_content
|
|
385
|
-
)
|
|
386
|
-
|
|
387
|
-
conversations = [{"role": "user", "content": init_prompt}]
|
|
388
|
-
|
|
389
|
-
with open(self.args.target_file, "w",encoding="utf-8") as file:
|
|
390
|
-
file.write(init_prompt)
|
|
391
|
-
|
|
392
|
-
t = self.llm.chat_oai(conversations=conversations, llm_config=llm_config)
|
|
393
|
-
|
|
394
|
-
result.append(t[0].output)
|
|
395
|
-
|
|
396
|
-
conversations.append({"role": "assistant", "content": t[0].output})
|
|
397
|
-
|
|
398
|
-
if (
|
|
399
|
-
"__完成__" in t[0].output
|
|
400
|
-
or "/done" in t[0].output
|
|
401
|
-
or "__EOF__" in t[0].output
|
|
402
|
-
):
|
|
403
|
-
return result, conversations
|
|
404
|
-
|
|
405
|
-
current_step = 0
|
|
406
|
-
|
|
407
|
-
while current_step < max_steps:
|
|
408
|
-
|
|
409
|
-
conversations.append({"role": "user", "content": "继续"})
|
|
410
|
-
|
|
411
|
-
with open(self.args.target_file, "w",encoding="utf-8") as file:
|
|
412
|
-
file.write("继续")
|
|
413
|
-
|
|
414
|
-
t = self.llm.chat_oai(conversations=conversations, llm_config=llm_config)
|
|
415
|
-
|
|
416
|
-
result.append(t[0].output)
|
|
417
|
-
conversations.append({"role": "assistant", "content": t[0].output})
|
|
418
|
-
current_step += 1
|
|
419
|
-
|
|
420
|
-
if (
|
|
421
|
-
"__完成__" in t[0].output
|
|
422
|
-
or "/done" in t[0].output
|
|
423
|
-
or "__EOF__" in t[0].output
|
|
424
|
-
):
|
|
425
|
-
return CodeGenerateResult(contents=["\n\n".join(result)], conversations=[conversations])
|
|
426
|
-
|
|
427
|
-
return CodeGenerateResult(contents=["\n\n".join(result)], conversations=[conversations])
|
|
273
|
+
|