auto-coder 0.1.335__py3-none-any.whl → 0.1.337__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.335.dist-info → auto_coder-0.1.337.dist-info}/METADATA +2 -2
- {auto_coder-0.1.335.dist-info → auto_coder-0.1.337.dist-info}/RECORD +38 -19
- autocoder/agent/agentic_filter.py +14 -7
- autocoder/auto_coder.py +34 -17
- autocoder/auto_coder_rag.py +18 -9
- autocoder/auto_coder_runner.py +95 -7
- autocoder/chat_auto_coder.py +1 -2
- autocoder/common/__init__.py +1 -0
- autocoder/common/auto_coder_lang.py +8 -0
- autocoder/common/v2/agent/__init__.py +0 -0
- autocoder/common/v2/agent/agentic_edit.py +1358 -0
- autocoder/common/v2/agent/agentic_edit_conversation.py +113 -0
- autocoder/common/v2/agent/agentic_edit_tools/__init__.py +28 -0
- autocoder/common/v2/agent/agentic_edit_tools/ask_followup_question_tool_resolver.py +70 -0
- autocoder/common/v2/agent/agentic_edit_tools/attempt_completion_tool_resolver.py +35 -0
- autocoder/common/v2/agent/agentic_edit_tools/base_tool_resolver.py +33 -0
- autocoder/common/v2/agent/agentic_edit_tools/execute_command_tool_resolver.py +88 -0
- autocoder/common/v2/agent/agentic_edit_tools/list_code_definition_names_tool_resolver.py +80 -0
- autocoder/common/v2/agent/agentic_edit_tools/list_files_tool_resolver.py +105 -0
- autocoder/common/v2/agent/agentic_edit_tools/plan_mode_respond_tool_resolver.py +35 -0
- autocoder/common/v2/agent/agentic_edit_tools/read_file_tool_resolver.py +51 -0
- autocoder/common/v2/agent/agentic_edit_tools/replace_in_file_tool_resolver.py +144 -0
- autocoder/common/v2/agent/agentic_edit_tools/search_files_tool_resolver.py +104 -0
- autocoder/common/v2/agent/agentic_edit_tools/use_mcp_tool_resolver.py +46 -0
- autocoder/common/v2/agent/agentic_edit_tools/write_to_file_tool_resolver.py +58 -0
- autocoder/common/v2/agent/agentic_edit_types.py +162 -0
- autocoder/common/v2/agent/agentic_tool_display.py +184 -0
- autocoder/common/v2/code_agentic_editblock_manager.py +812 -0
- autocoder/events/event_manager.py +4 -4
- autocoder/events/event_types.py +1 -0
- autocoder/memory/active_context_manager.py +2 -29
- autocoder/models.py +10 -2
- autocoder/utils/llms.py +4 -2
- autocoder/version.py +1 -1
- {auto_coder-0.1.335.dist-info → auto_coder-0.1.337.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.335.dist-info → auto_coder-0.1.337.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.335.dist-info → auto_coder-0.1.337.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.335.dist-info → auto_coder-0.1.337.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: auto-coder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.337
|
|
4
4
|
Summary: AutoCoder: AutoCoder
|
|
5
5
|
Author: allwefantasy
|
|
6
6
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
@@ -28,7 +28,7 @@ Requires-Dist: prompt-toolkit
|
|
|
28
28
|
Requires-Dist: tokenizers
|
|
29
29
|
Requires-Dist: aiofiles
|
|
30
30
|
Requires-Dist: readerwriterlock
|
|
31
|
-
Requires-Dist: byzerllm[saas] >=0.1.
|
|
31
|
+
Requires-Dist: byzerllm[saas] >=0.1.181
|
|
32
32
|
Requires-Dist: patch
|
|
33
33
|
Requires-Dist: diff-match-patch
|
|
34
34
|
Requires-Dist: GitPython
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
autocoder/auto_coder.py,sha256=
|
|
2
|
+
autocoder/auto_coder.py,sha256=mRNIZn7f410j33e0Y15aJeVO9fLwjG2LtaS4pF1oenY,66736
|
|
3
3
|
autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,3229
|
|
4
|
-
autocoder/auto_coder_rag.py,sha256=
|
|
4
|
+
autocoder/auto_coder_rag.py,sha256=NesRm7sIJrRQL1xxm_lbMtM7gi-KrYv9f26RfBuloZE,35386
|
|
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=
|
|
7
|
+
autocoder/auto_coder_runner.py,sha256=MMppqdwfT1a-NoIxqbQGNS2z2Wi0CWY6X3AK8morCsE,111424
|
|
8
8
|
autocoder/auto_coder_server.py,sha256=bLORGEclcVdbBVfM140JCI8WtdrU0jbgqdJIVVupiEU,20578
|
|
9
9
|
autocoder/benchmark.py,sha256=Ypomkdzd1T3GE6dRICY3Hj547dZ6_inqJbBJIp5QMco,4423
|
|
10
|
-
autocoder/chat_auto_coder.py,sha256=
|
|
10
|
+
autocoder/chat_auto_coder.py,sha256=CthuvdjVjTQOVv-zREsl8OCsZHPSP9OQcIgHULrW2Ro,25842
|
|
11
11
|
autocoder/chat_auto_coder_lang.py,sha256=RxkYAMWUB5ayX0x03yBOcEkjTcWG_EBsLXBC_bh--cc,22265
|
|
12
12
|
autocoder/command_args.py,sha256=HxflngkYtTrV17Vfgk6lyUyiG68jP2ftSc7FYr9AXwY,30585
|
|
13
13
|
autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,10013
|
|
14
14
|
autocoder/lang.py,sha256=PFtATuOhHRnfpqHQkXr6p4C893JvpsgwTMif3l-GEi0,14321
|
|
15
|
-
autocoder/models.py,sha256=
|
|
15
|
+
autocoder/models.py,sha256=_SCar82QIeBFTZZBdM2jPS6atKVhHnvE0gX3V0CsxD4,11590
|
|
16
16
|
autocoder/run_context.py,sha256=IUfSO6_gp2Wt1blFWAmOpN0b0nDrTTk4LmtCYUBIoro,1643
|
|
17
|
-
autocoder/version.py,sha256=
|
|
17
|
+
autocoder/version.py,sha256=_LNwUtBnPaBerh9KZiByo60wMmCJ6961eqCjdcRR4Zk,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
|
|
21
|
-
autocoder/agent/agentic_filter.py,sha256=
|
|
21
|
+
autocoder/agent/agentic_filter.py,sha256=9Miqj9lVOkKrKRXK9MZDouhkp2n1s_RakpRwdmLfFtY,39516
|
|
22
22
|
autocoder/agent/auto_demand_organizer.py,sha256=URAq0gSEiHeV_W4zwhOI_83kHz0Ryfj1gcfh5jwCv_w,6501
|
|
23
23
|
autocoder/agent/auto_filegroup.py,sha256=pBsAkBcpFTff-9L5OwI8xhf2xPKpl-aZwz-skF2B6dc,6296
|
|
24
24
|
autocoder/agent/auto_guess_query.py,sha256=rDSdhpPHcOGE5MuDXvIrhCXAPR4ARS1LqpyoLsx2Jhw,11374
|
|
@@ -49,12 +49,12 @@ autocoder/commands/auto_web.py,sha256=Cc0eb6JN3SvFy3GD_lpSLvIqj7F1eFDTcwg1t-zDcK
|
|
|
49
49
|
autocoder/commands/tools.py,sha256=BqQaHVgOJfS1uWRw_hgSldMc44qnEjxVNk8JI0OiMCg,33762
|
|
50
50
|
autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
|
|
51
51
|
autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
|
|
52
|
-
autocoder/common/__init__.py,sha256=
|
|
52
|
+
autocoder/common/__init__.py,sha256=U6oImbo5n_sLcFLS7ZAMZqnCc-3DYeVYD9K6r1V7mSk,14601
|
|
53
53
|
autocoder/common/action_yml_file_manager.py,sha256=DdF5P1R_B_chCnnqoA2IgogakWLZk_nItiJZUfX0_Wo,17857
|
|
54
54
|
autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
|
|
55
55
|
autocoder/common/anything2img.py,sha256=iZQmg8srXlD7N5uGl5b_ONKJMBjYoW8kPmokkG6ISF0,10118
|
|
56
56
|
autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
|
|
57
|
-
autocoder/common/auto_coder_lang.py,sha256=
|
|
57
|
+
autocoder/common/auto_coder_lang.py,sha256=cNwzXknWDDFUoG68D0xhp1KgTC25bS8pbObeL-1pRpA,40656
|
|
58
58
|
autocoder/common/auto_configure.py,sha256=D4N-fl9v8bKM5-Ds-uhkC2uGDmHH_ZjLJ759F8KXMKs,13129
|
|
59
59
|
autocoder/common/buildin_tokenizer.py,sha256=L7d5t39ZFvUd6EoMPXUhYK1toD0FHlRH1jtjKRGokWU,1236
|
|
60
60
|
autocoder/common/chunk_validation.py,sha256=BrR_ZWavW8IANuueEE7hS8NFAwEvm8TX34WnPx_1hs8,3030
|
|
@@ -112,6 +112,7 @@ autocoder/common/mcp_servers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
112
112
|
autocoder/common/mcp_servers/mcp_server_gpt4o_mini_search.py,sha256=TApShxgoozLluobXHOK1-oAE1zm0-9jdRoPLQB1qwMI,5688
|
|
113
113
|
autocoder/common/mcp_servers/mcp_server_perplexity.py,sha256=CIC26UkfH1lYoVCjfyY5xGGYVx8h0oz0Uj1c7YJ3OPw,5560
|
|
114
114
|
autocoder/common/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
115
|
+
autocoder/common/v2/code_agentic_editblock_manager.py,sha256=G0CIuV9Ki0FqMLnpA8nBT4pnkCNRvBN_4k_ZV1U1WHU,34781
|
|
115
116
|
autocoder/common/v2/code_auto_generate.py,sha256=hdhTTb0r1A8_OSuUIkxSXrwf47pXnazphufMu1vpkhI,9327
|
|
116
117
|
autocoder/common/v2/code_auto_generate_diff.py,sha256=Cd42eFxm1GiQQobiZiG9ECu9dgsCgr3lNso21onhuKI,14543
|
|
117
118
|
autocoder/common/v2/code_auto_generate_editblock.py,sha256=VaBvhMg_ryEataxM_n0L08FN_LI1Wfjoq4ecXs9jZwQ,15059
|
|
@@ -124,6 +125,24 @@ autocoder/common/v2/code_diff_manager.py,sha256=dG7dqZQHarsyPYQ0-NHbHDCvgk3ATtwB
|
|
|
124
125
|
autocoder/common/v2/code_editblock_manager.py,sha256=G0CIuV9Ki0FqMLnpA8nBT4pnkCNRvBN_4k_ZV1U1WHU,34781
|
|
125
126
|
autocoder/common/v2/code_manager.py,sha256=C403bS-f6urixwitlKHcml-J03hci-UyNwHJOqBiY6Q,9182
|
|
126
127
|
autocoder/common/v2/code_strict_diff_manager.py,sha256=v-J1kDyLg7tLGg_6_lbO9S4fNkx7M_L8Xr2G7fPptiU,9347
|
|
128
|
+
autocoder/common/v2/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
129
|
+
autocoder/common/v2/agent/agentic_edit.py,sha256=iFr2Umr1qXYGH0enzn2KJS8H2nqfuKkyBidbUKq38Bc,87031
|
|
130
|
+
autocoder/common/v2/agent/agentic_edit_conversation.py,sha256=XtN0D1stP80gKnGiVxFMZL1DbIU56AISyDkS52RMaac,4434
|
|
131
|
+
autocoder/common/v2/agent/agentic_edit_types.py,sha256=ZCgIu0Dj4xPP9s-lWtzh1-wBvoXrSkgu3pan_Oo_Ng0,4433
|
|
132
|
+
autocoder/common/v2/agent/agentic_tool_display.py,sha256=5KshKQX0YFcGobfbJIwylwkalAEuZVUO68hSrIlPM64,7341
|
|
133
|
+
autocoder/common/v2/agent/agentic_edit_tools/__init__.py,sha256=wGICCc1dYh07osB21j62zOQ9Ws0PyyOQ12UYRHmHrtI,1229
|
|
134
|
+
autocoder/common/v2/agent/agentic_edit_tools/ask_followup_question_tool_resolver.py,sha256=pjrukXjWXMIfUAUzoHzr7j2Onf1L7bxmjsUR1gGaFoA,2809
|
|
135
|
+
autocoder/common/v2/agent/agentic_edit_tools/attempt_completion_tool_resolver.py,sha256=82ZGKeRBSDKeead_XVBW4FxpiE-5dS7tBOk_3RZ6B5s,1511
|
|
136
|
+
autocoder/common/v2/agent/agentic_edit_tools/base_tool_resolver.py,sha256=Zid2m1uZd-2wVFGc_n_KAViXZyNjbdLSpI5n7ut1RUQ,1036
|
|
137
|
+
autocoder/common/v2/agent/agentic_edit_tools/execute_command_tool_resolver.py,sha256=GueQfIY2hVu2R5j9R5rBtn2znl5MlmEdGtsa6snsMHs,4112
|
|
138
|
+
autocoder/common/v2/agent/agentic_edit_tools/list_code_definition_names_tool_resolver.py,sha256=8QoMsADUDWliqiDt_dpguz31403syB8eeW0Pcw-qfb8,3842
|
|
139
|
+
autocoder/common/v2/agent/agentic_edit_tools/list_files_tool_resolver.py,sha256=ERM5E7s2azQ8vcvogan4A_LZci8Pmhmxw1uQaNQhon4,5469
|
|
140
|
+
autocoder/common/v2/agent/agentic_edit_tools/plan_mode_respond_tool_resolver.py,sha256=SZwFUxK6d2BaKWqQXi_c3IVe2iffviF6VUXJA9T9sx0,1492
|
|
141
|
+
autocoder/common/v2/agent/agentic_edit_tools/read_file_tool_resolver.py,sha256=9Bh0KVbL0qiIqwChlb77biiBiETQ3zekxGe5Fj7hXAg,2800
|
|
142
|
+
autocoder/common/v2/agent/agentic_edit_tools/replace_in_file_tool_resolver.py,sha256=tTQpCIGIzh1XO_MZm6wefMvUm_h6cKoa--oPIm-VwXM,7342
|
|
143
|
+
autocoder/common/v2/agent/agentic_edit_tools/search_files_tool_resolver.py,sha256=K-TcqY0z7nDupMkTRDAJdqW3z2Y_RUM_wUb-pOEVQRI,6044
|
|
144
|
+
autocoder/common/v2/agent/agentic_edit_tools/use_mcp_tool_resolver.py,sha256=wM2Xy4bcnD0TSLEmcM8rvvyyWenN5_KQnJMO6hJ8lTE,1716
|
|
145
|
+
autocoder/common/v2/agent/agentic_edit_tools/write_to_file_tool_resolver.py,sha256=UO4SrkDek3WDlRdlHH022W1roSNMdMcipJqDxRBlheM,3044
|
|
127
146
|
autocoder/compilers/__init__.py,sha256=C0HOms70QA747XD0uZEMmGtRFcIPenohyqECNStv0Bw,1647
|
|
128
147
|
autocoder/compilers/base_compiler.py,sha256=dsTzMO4H_RoqWfE-SntIk2B52hWuvSlWVLtkdCbHgGs,3244
|
|
129
148
|
autocoder/compilers/compiler_config_api.py,sha256=QRSwWm_EX7jSeZ3dtQqM9HI__x5aZ7U0c3fHIW_2N48,13839
|
|
@@ -149,10 +168,10 @@ autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=sbK9yFRaq8Ryt
|
|
|
149
168
|
autocoder/dispacher/actions/plugins/action_translate.py,sha256=GEn7dZA22jy5WyzINomjmzzB795p2Olg-CJla97lRF8,7744
|
|
150
169
|
autocoder/events/__init__.py,sha256=1x_juwr9Ows2RADDa2LyI4QlmPxOVOXZeLO1cht-slM,1443
|
|
151
170
|
autocoder/events/event_content.py,sha256=eLHf5M1BifSqhzzEBgAWKn3JD5_z_1mWeNdZ53TpMqk,12240
|
|
152
|
-
autocoder/events/event_manager.py,sha256=
|
|
171
|
+
autocoder/events/event_manager.py,sha256=VLHrMGlCmuhi0bhLwKyHOQNZrm3ZlB9yfN2lH_phcYQ,11839
|
|
153
172
|
autocoder/events/event_manager_singleton.py,sha256=8aBp97fgbas0KYrpHbljTg2n4RcWd85SOgQITu47ZWA,8809
|
|
154
173
|
autocoder/events/event_store.py,sha256=y6tT3P-o3yhDptrKi-UmqI_ZBNg7v21FriI3f7lo_ME,12709
|
|
155
|
-
autocoder/events/event_types.py,sha256=
|
|
174
|
+
autocoder/events/event_types.py,sha256=W_S6PTDIBdufcuPosgz64iITzQy79flL8s3hWB-vZ9o,3638
|
|
156
175
|
autocoder/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
157
176
|
autocoder/helper/project_creator.py,sha256=sgXrZyAaGc84aUT7K7d7N1ztT-mSNGoLnsT-uKMUvVw,21472
|
|
158
177
|
autocoder/index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -174,7 +193,7 @@ autocoder/linters/reactjs_linter.py,sha256=LDCXmAI15LUq8nNPyYko3oryzCc2Su05ob63j
|
|
|
174
193
|
autocoder/linters/shadow_linter.py,sha256=SKgRNVnTavNUviFC9osYMz18nGWCVOPOHx9LavEbnmc,15047
|
|
175
194
|
autocoder/linters/vue_linter.py,sha256=ZyvoxT0kSizFh_UkR7UZYO5DV9edbvDQZaibEF9W95I,20905
|
|
176
195
|
autocoder/memory/__init__.py,sha256=5FeGvsesRViYL4BkFiHw9SdlyHeWlqALpTyqOpfnBRw,179
|
|
177
|
-
autocoder/memory/active_context_manager.py,sha256=
|
|
196
|
+
autocoder/memory/active_context_manager.py,sha256=nqWD4lBLNcskXDRERhPpqnmn_i1V7_CTfQSN3xAX6b8,32297
|
|
178
197
|
autocoder/memory/active_package.py,sha256=NHLLnncFSfFcOFLWILwJLuEVd4nOoL0mqzFev6QHgzU,25480
|
|
179
198
|
autocoder/memory/async_processor.py,sha256=htHzLGupw9IHQAEdLe2AEaALZSItPi3AltDt8FMTRHk,4643
|
|
180
199
|
autocoder/memory/directory_mapper.py,sha256=BXHblOdRpeZb7URDECALp9uN5oi91KmkW9g_UaWFuZY,2513
|
|
@@ -239,7 +258,7 @@ autocoder/utils/auto_project_type.py,sha256=9_-wE9aavjbPiNSUVKxttJAdu5i5fu-zHyPY
|
|
|
239
258
|
autocoder/utils/coder.py,sha256=rK8e0svQBe0NOP26dIGToUXgha_hUDgxlWoC_p_r7oc,5698
|
|
240
259
|
autocoder/utils/conversation_store.py,sha256=esd9zLarKYe0ZsYqjjwHc_ksmVQDDEhVt-Ejul2oyys,1178
|
|
241
260
|
autocoder/utils/llm_client_interceptors.py,sha256=FEHNXoFZlCjAHQcjPRyX8FOMjo6rPXpO2AJ2zn2KTTo,901
|
|
242
|
-
autocoder/utils/llms.py,sha256=
|
|
261
|
+
autocoder/utils/llms.py,sha256=CQRNsX8SJBpeHl_zJ1N-Nj-MYyqkFCi3zETYSurCMkU,4021
|
|
243
262
|
autocoder/utils/log_capture.py,sha256=I-bsJFLWoGUiX-GKoZsH9kWJCKSV7ZlUnRt7jh-fOL0,1548
|
|
244
263
|
autocoder/utils/model_provider_selector.py,sha256=h1eVf4F7qfSOdJbtdwv7_xfIRcNBk3fVet5w1AuvK-g,7680
|
|
245
264
|
autocoder/utils/multi_turn.py,sha256=unK9OpqVRbK6uIcTKXgggX2wNmyj7s5eyEAQ2xUwHoM,88
|
|
@@ -257,9 +276,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
257
276
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
258
277
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=KW0mlmcHlStXi8-_6fXZ2-ifeJ5mgP0OV7DQFzCtIsw,14008
|
|
259
278
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
260
|
-
auto_coder-0.1.
|
|
261
|
-
auto_coder-0.1.
|
|
262
|
-
auto_coder-0.1.
|
|
263
|
-
auto_coder-0.1.
|
|
264
|
-
auto_coder-0.1.
|
|
265
|
-
auto_coder-0.1.
|
|
279
|
+
auto_coder-0.1.337.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
280
|
+
auto_coder-0.1.337.dist-info/METADATA,sha256=GH7LgmlLQFdtYtvXWvRcDzUoY5toRt_Bmf0XX8Mcghg,2747
|
|
281
|
+
auto_coder-0.1.337.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
282
|
+
auto_coder-0.1.337.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
283
|
+
auto_coder-0.1.337.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
284
|
+
auto_coder-0.1.337.dist-info/RECORD,,
|
|
@@ -259,8 +259,8 @@ class AgenticFilter:
|
|
|
259
259
|
3. **深入分析**:
|
|
260
260
|
* 使用 `read_files` 读取关键文件的内容进行确认。如果文件过大,使用 `line_ranges` 参数分段读取。
|
|
261
261
|
* 如有必要,使用 `run_python` 或 `execute_shell_command` 执行代码或命令进行更复杂的分析。
|
|
262
|
-
4. **迭代决策**: 根据工具的返回结果,你可能需要多次调用不同的工具来逐步缩小范围或获取更多信息。
|
|
263
|
-
|
|
262
|
+
4. **迭代决策**: 根据工具的返回结果,你可能需要多次调用不同的工具来逐步缩小范围或获取更多信息。
|
|
263
|
+
6. **最终响应**: 当你确定了所有需要参考和修改的文件后,**必须**调用 `output_result` 工具,并提供符合其要求格式的JSON字符串作为其 `response` 参数。
|
|
264
264
|
该json格式要求为:
|
|
265
265
|
```json
|
|
266
266
|
{
|
|
@@ -273,9 +273,17 @@ class AgenticFilter:
|
|
|
273
273
|
"reasoning": "详细说明你是如何通过分析和使用工具得出这个文件列表的。"
|
|
274
274
|
}
|
|
275
275
|
```
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
|
|
277
|
+
{% if enable_active_context %}
|
|
278
|
+
** 非常非常重要的提示 **
|
|
279
|
+
每一个目录都有一个描述信息,比如 {{ project_path }}/src/abc/bbc 的目录描述信息会放在 {{ project_path }}/.auto-coder/active-context/src/abc/bbc/active.md 文件中。
|
|
280
|
+
你可以使用 read_files 函数读取,从而帮助你更好的挑选要详细阅读哪个文件。值得注意的是,active.md 并不会包含该目录下所有的文件信息,只保存最近发生变更的文件的信息。
|
|
281
|
+
{% endif %}
|
|
282
|
+
"""
|
|
283
|
+
return {
|
|
284
|
+
"project_path": os.path.abspath(self.args.source_dir),
|
|
285
|
+
"enable_active_context": self.args.enable_active_context,
|
|
286
|
+
}
|
|
279
287
|
|
|
280
288
|
@byzerllm.prompt()
|
|
281
289
|
def _execute_command_result(self, result: str) -> str:
|
|
@@ -590,8 +598,7 @@ class AgenticFilter:
|
|
|
590
598
|
- 如果未找到匹配项,会返回提示信息
|
|
591
599
|
|
|
592
600
|
</usage>
|
|
593
|
-
</command>
|
|
594
|
-
|
|
601
|
+
</command>
|
|
595
602
|
<command>
|
|
596
603
|
<n>execute_mcp_server</n>
|
|
597
604
|
<description>执行MCP服务器</description>
|
autocoder/auto_coder.py
CHANGED
|
@@ -266,7 +266,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
266
266
|
"saas.base_url": model_info["base_url"],
|
|
267
267
|
"saas.api_key": model_info["api_key"],
|
|
268
268
|
"saas.model": model_info["model_name"],
|
|
269
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
269
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
270
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
270
271
|
}
|
|
271
272
|
)
|
|
272
273
|
|
|
@@ -289,7 +290,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
289
290
|
"saas.base_url": model_info["base_url"],
|
|
290
291
|
"saas.api_key": model_info["api_key"],
|
|
291
292
|
"saas.model": model_info["model_name"],
|
|
292
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
293
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
294
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
293
295
|
}
|
|
294
296
|
)
|
|
295
297
|
models.append(code_model)
|
|
@@ -307,7 +309,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
307
309
|
"saas.base_url": model_info["base_url"],
|
|
308
310
|
"saas.api_key": model_info["api_key"],
|
|
309
311
|
"saas.model": model_info["model_name"],
|
|
310
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
312
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
313
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
311
314
|
}
|
|
312
315
|
)
|
|
313
316
|
llm.setup_sub_client("code_model", code_model)
|
|
@@ -328,7 +331,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
328
331
|
"saas.base_url": model_info["base_url"],
|
|
329
332
|
"saas.api_key": model_info["api_key"],
|
|
330
333
|
"saas.model": model_info["model_name"],
|
|
331
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
334
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
335
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
332
336
|
}
|
|
333
337
|
)
|
|
334
338
|
models.append(rerank_model)
|
|
@@ -346,7 +350,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
346
350
|
"saas.base_url": model_info["base_url"],
|
|
347
351
|
"saas.api_key": model_info["api_key"],
|
|
348
352
|
"saas.model": model_info["model_name"],
|
|
349
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
353
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
354
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
350
355
|
}
|
|
351
356
|
)
|
|
352
357
|
llm.setup_sub_client("generate_rerank_model", rerank_model)
|
|
@@ -363,7 +368,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
363
368
|
"saas.base_url": model_info["base_url"],
|
|
364
369
|
"saas.api_key": model_info["api_key"],
|
|
365
370
|
"saas.model": model_info["model_name"],
|
|
366
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
371
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
372
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
367
373
|
}
|
|
368
374
|
)
|
|
369
375
|
llm.setup_sub_client("inference_model", inference_model)
|
|
@@ -380,7 +386,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
380
386
|
"saas.base_url": model_info["base_url"],
|
|
381
387
|
"saas.api_key": model_info["api_key"],
|
|
382
388
|
"saas.model": model_info["model_name"],
|
|
383
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
389
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
390
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
384
391
|
}
|
|
385
392
|
)
|
|
386
393
|
llm.setup_sub_client("index_filter_model", index_filter_model)
|
|
@@ -546,7 +553,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
546
553
|
"saas.base_url": model_info["base_url"],
|
|
547
554
|
"saas.api_key": model_info["api_key"],
|
|
548
555
|
"saas.model": model_info["model_name"],
|
|
549
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
556
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
557
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
550
558
|
}
|
|
551
559
|
)
|
|
552
560
|
llm.setup_sub_client("chat_model", chat_model)
|
|
@@ -563,7 +571,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
563
571
|
"saas.base_url": model_info["base_url"],
|
|
564
572
|
"saas.api_key": model_info["api_key"],
|
|
565
573
|
"saas.model": model_info["model_name"],
|
|
566
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
574
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
575
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
567
576
|
}
|
|
568
577
|
)
|
|
569
578
|
llm.setup_sub_client("vl_model", vl_model)
|
|
@@ -580,7 +589,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
580
589
|
"saas.base_url": model_info["base_url"],
|
|
581
590
|
"saas.api_key": model_info["api_key"],
|
|
582
591
|
"saas.model": model_info["model_name"],
|
|
583
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
592
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
593
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
584
594
|
}
|
|
585
595
|
)
|
|
586
596
|
llm.setup_sub_client("index_model", index_model)
|
|
@@ -597,7 +607,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
597
607
|
"saas.base_url": model_info["base_url"],
|
|
598
608
|
"saas.api_key": model_info["api_key"],
|
|
599
609
|
"saas.model": model_info["model_name"],
|
|
600
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
610
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
611
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
601
612
|
}
|
|
602
613
|
)
|
|
603
614
|
llm.setup_sub_client("sd_model", sd_model)
|
|
@@ -614,7 +625,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
614
625
|
"saas.base_url": model_info["base_url"],
|
|
615
626
|
"saas.api_key": model_info["api_key"],
|
|
616
627
|
"saas.model": model_info["model_name"],
|
|
617
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
628
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
629
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
618
630
|
}
|
|
619
631
|
)
|
|
620
632
|
llm.setup_sub_client("text2voice_model", text2voice_model)
|
|
@@ -631,7 +643,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
631
643
|
"saas.base_url": model_info["base_url"],
|
|
632
644
|
"saas.api_key": model_info["api_key"],
|
|
633
645
|
"saas.model": model_info["model_name"],
|
|
634
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
646
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
647
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
635
648
|
}
|
|
636
649
|
)
|
|
637
650
|
llm.setup_sub_client("voice2text_model", voice2text_model)
|
|
@@ -648,7 +661,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
648
661
|
"saas.base_url": model_info["base_url"],
|
|
649
662
|
"saas.api_key": model_info["api_key"],
|
|
650
663
|
"saas.model": model_info["model_name"],
|
|
651
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
664
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
665
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
652
666
|
}
|
|
653
667
|
)
|
|
654
668
|
llm.setup_sub_client("planner_model", planner_model)
|
|
@@ -665,7 +679,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
665
679
|
"saas.base_url": model_info["base_url"],
|
|
666
680
|
"saas.api_key": model_info["api_key"],
|
|
667
681
|
"saas.model": model_info["model_name"],
|
|
668
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
682
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
683
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
669
684
|
}
|
|
670
685
|
)
|
|
671
686
|
llm.setup_sub_client("commit_model", commit_model)
|
|
@@ -682,7 +697,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
682
697
|
"saas.base_url": model_info["base_url"],
|
|
683
698
|
"saas.api_key": model_info["api_key"],
|
|
684
699
|
"saas.model": model_info["model_name"],
|
|
685
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
700
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
701
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
686
702
|
}
|
|
687
703
|
)
|
|
688
704
|
llm.setup_sub_client("designer_model", designer_model)
|
|
@@ -699,7 +715,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
699
715
|
"saas.base_url": model_info["base_url"],
|
|
700
716
|
"saas.api_key": model_info["api_key"],
|
|
701
717
|
"saas.model": model_info["model_name"],
|
|
702
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
718
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
719
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
703
720
|
}
|
|
704
721
|
)
|
|
705
722
|
llm.setup_sub_client("emb_model", emb_model)
|
autocoder/auto_coder_rag.py
CHANGED
|
@@ -636,7 +636,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
636
636
|
"saas.base_url": model_info["base_url"],
|
|
637
637
|
"saas.api_key": model_info["api_key"],
|
|
638
638
|
"saas.model": model_info["model_name"],
|
|
639
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
639
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
640
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
640
641
|
}
|
|
641
642
|
)
|
|
642
643
|
|
|
@@ -652,7 +653,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
652
653
|
"saas.base_url": model_info["base_url"],
|
|
653
654
|
"saas.api_key": model_info["api_key"],
|
|
654
655
|
"saas.model": model_info["model_name"],
|
|
655
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
656
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
657
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
656
658
|
}
|
|
657
659
|
)
|
|
658
660
|
llm.setup_sub_client("recall_model", recall_model)
|
|
@@ -668,7 +670,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
668
670
|
"saas.base_url": model_info["base_url"],
|
|
669
671
|
"saas.api_key": model_info["api_key"],
|
|
670
672
|
"saas.model": model_info["model_name"],
|
|
671
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
673
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
674
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
672
675
|
}
|
|
673
676
|
)
|
|
674
677
|
llm.setup_sub_client("chunk_model", chunk_model)
|
|
@@ -684,7 +687,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
684
687
|
"saas.base_url": model_info["base_url"],
|
|
685
688
|
"saas.api_key": model_info["api_key"],
|
|
686
689
|
"saas.model": model_info["model_name"],
|
|
687
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
690
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
691
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
688
692
|
}
|
|
689
693
|
)
|
|
690
694
|
llm.setup_sub_client("qa_model", qa_model)
|
|
@@ -700,7 +704,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
700
704
|
"saas.base_url": model_info["base_url"],
|
|
701
705
|
"saas.api_key": model_info["api_key"],
|
|
702
706
|
"saas.model": model_info["model_name"],
|
|
703
|
-
"saas.is_reasoning": False
|
|
707
|
+
"saas.is_reasoning": False,
|
|
708
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
704
709
|
}
|
|
705
710
|
)
|
|
706
711
|
llm.setup_sub_client("emb_model", emb_model)
|
|
@@ -792,7 +797,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
792
797
|
"saas.base_url": model_info["base_url"],
|
|
793
798
|
"saas.api_key": model_info["api_key"],
|
|
794
799
|
"saas.model": model_info["model_name"],
|
|
795
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
800
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
801
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
796
802
|
}
|
|
797
803
|
)
|
|
798
804
|
|
|
@@ -806,7 +812,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
806
812
|
"saas.base_url": model_info["base_url"],
|
|
807
813
|
"saas.api_key": model_info["api_key"],
|
|
808
814
|
"saas.model": model_info["model_name"],
|
|
809
|
-
"saas.is_reasoning": False
|
|
815
|
+
"saas.is_reasoning": False,
|
|
816
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
810
817
|
}
|
|
811
818
|
)
|
|
812
819
|
llm.setup_sub_client("emb_model", emb_model)
|
|
@@ -852,7 +859,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
852
859
|
"saas.base_url": model_info["base_url"],
|
|
853
860
|
"saas.api_key": model_info["api_key"],
|
|
854
861
|
"saas.model": model_info["model_name"],
|
|
855
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
862
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
863
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
856
864
|
}
|
|
857
865
|
)
|
|
858
866
|
|
|
@@ -882,7 +890,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
882
890
|
"saas.base_url": model_info["base_url"],
|
|
883
891
|
"saas.api_key": model_info["api_key"],
|
|
884
892
|
"saas.model": model_info["model_name"],
|
|
885
|
-
"saas.is_reasoning": model_info["is_reasoning"]
|
|
893
|
+
"saas.is_reasoning": model_info["is_reasoning"],
|
|
894
|
+
"saas.max_output_tokens": model_info.get("max_output_tokens", 8096)
|
|
886
895
|
}
|
|
887
896
|
)
|
|
888
897
|
|
autocoder/auto_coder_runner.py
CHANGED
|
@@ -22,6 +22,8 @@ from autocoder.common.result_manager import ResultManager
|
|
|
22
22
|
from autocoder.version import __version__
|
|
23
23
|
from autocoder.auto_coder import main as auto_coder_main
|
|
24
24
|
from autocoder.utils import get_last_yaml_file
|
|
25
|
+
from autocoder.commands.auto_command import CommandAutoTuner, AutoCommandRequest, CommandConfig, MemoryConfig
|
|
26
|
+
from autocoder.common.v2.agent.agentic_edit import AgenticEdit,AgenticEditRequest
|
|
25
27
|
from autocoder.index.symbols_utils import (
|
|
26
28
|
extract_symbols,
|
|
27
29
|
SymbolType,
|
|
@@ -58,11 +60,12 @@ from autocoder.memory.active_context_manager import ActiveContextManager
|
|
|
58
60
|
from autocoder.common.command_completer import CommandCompleter,FileSystemModel as CCFileSystemModel,MemoryConfig as CCMemoryModel
|
|
59
61
|
from autocoder.common.conf_validator import ConfigValidator
|
|
60
62
|
from autocoder import command_parser as CommandParser
|
|
61
|
-
from loguru import logger
|
|
63
|
+
from loguru import logger as global_logger
|
|
62
64
|
from autocoder.utils.project_structure import EnhancedFileAnalyzer
|
|
65
|
+
from autocoder.common import SourceCodeList,SourceCode
|
|
63
66
|
|
|
64
|
-
## 对外API,用于第三方集成 auto-coder 使用。
|
|
65
67
|
|
|
68
|
+
## 对外API,用于第三方集成 auto-coder 使用。
|
|
66
69
|
class SymbolItem(BaseModel):
|
|
67
70
|
symbol_name: str
|
|
68
71
|
symbol_type: SymbolType
|
|
@@ -222,6 +225,36 @@ def get_all_extensions(directory: str = ".") -> str:
|
|
|
222
225
|
# 转换为逗号分隔的字符串
|
|
223
226
|
return ",".join(sorted(all_extensions))
|
|
224
227
|
|
|
228
|
+
def configure_logger():
|
|
229
|
+
# 设置日志目录和文件
|
|
230
|
+
log_dir = os.path.join(project_root, ".auto-coder", "logs")
|
|
231
|
+
os.makedirs(log_dir, exist_ok=True)
|
|
232
|
+
log_file = os.path.join(log_dir, "auto-coder.log")
|
|
233
|
+
|
|
234
|
+
# 配置全局日志
|
|
235
|
+
# 默认情况下,所有日志都写入文件
|
|
236
|
+
# 控制台上默认不输出任何日志,除非显式配置
|
|
237
|
+
global_logger.configure(
|
|
238
|
+
handlers=[
|
|
239
|
+
{
|
|
240
|
+
"sink": log_file,
|
|
241
|
+
"level": "INFO",
|
|
242
|
+
"rotation": "10 MB",
|
|
243
|
+
"retention": "1 week",
|
|
244
|
+
"format": "{time:YYYY-MM-DD HH:mm:ss} | {level} | {name} | {message}",
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"sink": sys.stdout,
|
|
248
|
+
"level": "INFO",
|
|
249
|
+
"format": "{time:YYYY-MM-DD HH:mm:ss} | {name} | {message}",
|
|
250
|
+
# 默认不打印任何日志到控制台
|
|
251
|
+
"filter": lambda record: False
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
configure_logger()
|
|
257
|
+
|
|
225
258
|
def initialize_system(args:InitializeSystemRequest):
|
|
226
259
|
from autocoder.utils.model_provider_selector import ModelProviderSelector
|
|
227
260
|
from autocoder import models as models_module
|
|
@@ -2746,12 +2779,67 @@ def conf_import(path: str):
|
|
|
2746
2779
|
from autocoder.common.conf_import_export import import_conf
|
|
2747
2780
|
import_conf(os.getcwd(), path)
|
|
2748
2781
|
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
""
|
|
2752
|
-
|
|
2753
|
-
|
|
2782
|
+
def generate_new_yaml(query: str):
|
|
2783
|
+
memory = get_memory()
|
|
2784
|
+
conf = memory.get("conf",{})
|
|
2785
|
+
current_files = memory.get("current_files",{}).get("files",[])
|
|
2786
|
+
auto_coder_main(["next", "chat_action"])
|
|
2787
|
+
latest_yaml_file = get_last_yaml_file("actions")
|
|
2788
|
+
if latest_yaml_file:
|
|
2789
|
+
yaml_config = {
|
|
2790
|
+
"include_file": ["./base/base.yml"],
|
|
2791
|
+
"auto_merge": conf.get("auto_merge", "editblock"),
|
|
2792
|
+
"human_as_model": conf.get("human_as_model", "false") == "true",
|
|
2793
|
+
"skip_build_index": conf.get("skip_build_index", "true") == "true",
|
|
2794
|
+
"skip_confirm": conf.get("skip_confirm", "true") == "true",
|
|
2795
|
+
"silence": conf.get("silence", "true") == "true",
|
|
2796
|
+
"include_project_structure": conf.get("include_project_structure", "true")
|
|
2797
|
+
== "true",
|
|
2798
|
+
"exclude_files": memory.get("exclude_files", []),
|
|
2799
|
+
}
|
|
2800
|
+
yaml_config["context"] = ""
|
|
2801
|
+
for key, value in conf.items():
|
|
2802
|
+
converted_value = convert_config_value(key, value)
|
|
2803
|
+
if converted_value is not None:
|
|
2804
|
+
yaml_config[key] = converted_value
|
|
2805
|
+
|
|
2806
|
+
yaml_config["urls"] = current_files + get_llm_friendly_package_docs(
|
|
2807
|
+
return_paths=True
|
|
2808
|
+
)
|
|
2809
|
+
# handle image
|
|
2810
|
+
v = Image.convert_image_paths_from(query)
|
|
2811
|
+
yaml_config["query"] = v
|
|
2754
2812
|
|
|
2813
|
+
yaml_content = convert_yaml_config_to_str(yaml_config=yaml_config)
|
|
2814
|
+
|
|
2815
|
+
execute_file = os.path.join("actions", latest_yaml_file)
|
|
2816
|
+
with open(os.path.join(execute_file), "w",encoding="utf-8") as f:
|
|
2817
|
+
f.write(yaml_content)
|
|
2818
|
+
return execute_file,convert_yaml_to_config(execute_file)
|
|
2819
|
+
|
|
2820
|
+
@run_in_raw_thread()
|
|
2821
|
+
def auto_command(query: str,extra_args: Dict[str,Any]={}):
|
|
2822
|
+
"""处理/auto指令"""
|
|
2823
|
+
args = get_final_config()
|
|
2824
|
+
memory = get_memory()
|
|
2825
|
+
if args.enable_agentic_edit:
|
|
2826
|
+
execute_file,args = generate_new_yaml(query)
|
|
2827
|
+
args.file = execute_file
|
|
2828
|
+
current_files = memory.get("current_files",{}).get("files",[])
|
|
2829
|
+
sources = []
|
|
2830
|
+
for file in current_files:
|
|
2831
|
+
with open(file,"r",encoding="utf-8") as f:
|
|
2832
|
+
sources.append(SourceCode(module_name=file,source_code=f.read()))
|
|
2833
|
+
|
|
2834
|
+
llm = get_single_llm(args.code_model or args.model,product_mode=args.product_mode)
|
|
2835
|
+
agent = AgenticEdit(llm=llm,args=args,files=SourceCodeList(sources=sources),
|
|
2836
|
+
conversation_history=[],
|
|
2837
|
+
memory_config=MemoryConfig(memory=memory,
|
|
2838
|
+
save_memory_func=save_memory), command_config=CommandConfig)
|
|
2839
|
+
agent.run_in_terminal(AgenticEditRequest(user_input=query))
|
|
2840
|
+
return
|
|
2841
|
+
|
|
2842
|
+
args = get_final_config()
|
|
2755
2843
|
# 准备请求参数
|
|
2756
2844
|
request = AutoCommandRequest(
|
|
2757
2845
|
user_input=query
|
autocoder/chat_auto_coder.py
CHANGED
autocoder/common/__init__.py
CHANGED
|
@@ -825,6 +825,14 @@ MESSAGES = {
|
|
|
825
825
|
"/compile/check/end": {
|
|
826
826
|
"en": "Finished compile error checking process.",
|
|
827
827
|
"zh": "结束编译错误检查过程."
|
|
828
|
+
},
|
|
829
|
+
"/agent/edit/objective":{
|
|
830
|
+
"en":"Objective",
|
|
831
|
+
"zh":"目标"
|
|
832
|
+
},
|
|
833
|
+
"/agent/edit/user_query":{
|
|
834
|
+
"en":"User Query",
|
|
835
|
+
"zh":"用户查询"
|
|
828
836
|
}
|
|
829
837
|
}
|
|
830
838
|
|
|
File without changes
|