auto-coder 0.1.335__py3-none-any.whl → 0.1.336__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.336.dist-info}/METADATA +2 -2
- {auto_coder-0.1.335.dist-info → auto_coder-0.1.336.dist-info}/RECORD +34 -16
- autocoder/auto_coder.py +34 -17
- autocoder/auto_coder_rag.py +18 -9
- autocoder/auto_coder_runner.py +45 -4
- autocoder/common/__init__.py +1 -0
- autocoder/common/v2/agent/__init__.py +0 -0
- autocoder/common/v2/agent/agentic_edit.py +1302 -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 +99 -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.336.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.335.dist-info → auto_coder-0.1.336.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.335.dist-info → auto_coder-0.1.336.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.335.dist-info → auto_coder-0.1.336.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.336
|
|
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,10 +1,10 @@
|
|
|
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=W08NHr_I-9ldhXUhatnKrUCBL33_mQpF7KFqzp0zMEI,109203
|
|
8
8
|
autocoder/auto_coder_server.py,sha256=bLORGEclcVdbBVfM140JCI8WtdrU0jbgqdJIVVupiEU,20578
|
|
9
9
|
autocoder/benchmark.py,sha256=Ypomkdzd1T3GE6dRICY3Hj547dZ6_inqJbBJIp5QMco,4423
|
|
10
10
|
autocoder/chat_auto_coder.py,sha256=SzH6fdoH8kJgARYXBu0CTB8J9PY8Q2T9CrIB844PXtM,25841
|
|
@@ -12,9 +12,9 @@ autocoder/chat_auto_coder_lang.py,sha256=RxkYAMWUB5ayX0x03yBOcEkjTcWG_EBsLXBC_bh
|
|
|
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=znLFQLSAKbCRErJEcoRffYh44RYOI_DI4IWhNI0JIy0,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
|
|
@@ -49,7 +49,7 @@ 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
|
|
@@ -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,23 @@ 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=Vv5e_lgzfd9PZS10bJR0yvFzP4MLAVCZB45s02RWXkU,83440
|
|
130
|
+
autocoder/common/v2/agent/agentic_edit_types.py,sha256=ZCgIu0Dj4xPP9s-lWtzh1-wBvoXrSkgu3pan_Oo_Ng0,4433
|
|
131
|
+
autocoder/common/v2/agent/agentic_tool_display.py,sha256=O-H7vV5G-Jlkrul_GWmfUEsJZdeUbwtbBlfONlYD7bY,7382
|
|
132
|
+
autocoder/common/v2/agent/agentic_edit_tools/__init__.py,sha256=wGICCc1dYh07osB21j62zOQ9Ws0PyyOQ12UYRHmHrtI,1229
|
|
133
|
+
autocoder/common/v2/agent/agentic_edit_tools/ask_followup_question_tool_resolver.py,sha256=pjrukXjWXMIfUAUzoHzr7j2Onf1L7bxmjsUR1gGaFoA,2809
|
|
134
|
+
autocoder/common/v2/agent/agentic_edit_tools/attempt_completion_tool_resolver.py,sha256=82ZGKeRBSDKeead_XVBW4FxpiE-5dS7tBOk_3RZ6B5s,1511
|
|
135
|
+
autocoder/common/v2/agent/agentic_edit_tools/base_tool_resolver.py,sha256=Zid2m1uZd-2wVFGc_n_KAViXZyNjbdLSpI5n7ut1RUQ,1036
|
|
136
|
+
autocoder/common/v2/agent/agentic_edit_tools/execute_command_tool_resolver.py,sha256=GueQfIY2hVu2R5j9R5rBtn2znl5MlmEdGtsa6snsMHs,4112
|
|
137
|
+
autocoder/common/v2/agent/agentic_edit_tools/list_code_definition_names_tool_resolver.py,sha256=8QoMsADUDWliqiDt_dpguz31403syB8eeW0Pcw-qfb8,3842
|
|
138
|
+
autocoder/common/v2/agent/agentic_edit_tools/list_files_tool_resolver.py,sha256=ERM5E7s2azQ8vcvogan4A_LZci8Pmhmxw1uQaNQhon4,5469
|
|
139
|
+
autocoder/common/v2/agent/agentic_edit_tools/plan_mode_respond_tool_resolver.py,sha256=SZwFUxK6d2BaKWqQXi_c3IVe2iffviF6VUXJA9T9sx0,1492
|
|
140
|
+
autocoder/common/v2/agent/agentic_edit_tools/read_file_tool_resolver.py,sha256=9Bh0KVbL0qiIqwChlb77biiBiETQ3zekxGe5Fj7hXAg,2800
|
|
141
|
+
autocoder/common/v2/agent/agentic_edit_tools/replace_in_file_tool_resolver.py,sha256=tTQpCIGIzh1XO_MZm6wefMvUm_h6cKoa--oPIm-VwXM,7342
|
|
142
|
+
autocoder/common/v2/agent/agentic_edit_tools/search_files_tool_resolver.py,sha256=Q5U5CMS-06vwXlI0DZImtGZRpi-WXTb5GNDeIpjIdxQ,5571
|
|
143
|
+
autocoder/common/v2/agent/agentic_edit_tools/use_mcp_tool_resolver.py,sha256=wM2Xy4bcnD0TSLEmcM8rvvyyWenN5_KQnJMO6hJ8lTE,1716
|
|
144
|
+
autocoder/common/v2/agent/agentic_edit_tools/write_to_file_tool_resolver.py,sha256=UO4SrkDek3WDlRdlHH022W1roSNMdMcipJqDxRBlheM,3044
|
|
127
145
|
autocoder/compilers/__init__.py,sha256=C0HOms70QA747XD0uZEMmGtRFcIPenohyqECNStv0Bw,1647
|
|
128
146
|
autocoder/compilers/base_compiler.py,sha256=dsTzMO4H_RoqWfE-SntIk2B52hWuvSlWVLtkdCbHgGs,3244
|
|
129
147
|
autocoder/compilers/compiler_config_api.py,sha256=QRSwWm_EX7jSeZ3dtQqM9HI__x5aZ7U0c3fHIW_2N48,13839
|
|
@@ -149,10 +167,10 @@ autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=sbK9yFRaq8Ryt
|
|
|
149
167
|
autocoder/dispacher/actions/plugins/action_translate.py,sha256=GEn7dZA22jy5WyzINomjmzzB795p2Olg-CJla97lRF8,7744
|
|
150
168
|
autocoder/events/__init__.py,sha256=1x_juwr9Ows2RADDa2LyI4QlmPxOVOXZeLO1cht-slM,1443
|
|
151
169
|
autocoder/events/event_content.py,sha256=eLHf5M1BifSqhzzEBgAWKn3JD5_z_1mWeNdZ53TpMqk,12240
|
|
152
|
-
autocoder/events/event_manager.py,sha256=
|
|
170
|
+
autocoder/events/event_manager.py,sha256=VLHrMGlCmuhi0bhLwKyHOQNZrm3ZlB9yfN2lH_phcYQ,11839
|
|
153
171
|
autocoder/events/event_manager_singleton.py,sha256=8aBp97fgbas0KYrpHbljTg2n4RcWd85SOgQITu47ZWA,8809
|
|
154
172
|
autocoder/events/event_store.py,sha256=y6tT3P-o3yhDptrKi-UmqI_ZBNg7v21FriI3f7lo_ME,12709
|
|
155
|
-
autocoder/events/event_types.py,sha256=
|
|
173
|
+
autocoder/events/event_types.py,sha256=W_S6PTDIBdufcuPosgz64iITzQy79flL8s3hWB-vZ9o,3638
|
|
156
174
|
autocoder/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
157
175
|
autocoder/helper/project_creator.py,sha256=sgXrZyAaGc84aUT7K7d7N1ztT-mSNGoLnsT-uKMUvVw,21472
|
|
158
176
|
autocoder/index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -174,7 +192,7 @@ autocoder/linters/reactjs_linter.py,sha256=LDCXmAI15LUq8nNPyYko3oryzCc2Su05ob63j
|
|
|
174
192
|
autocoder/linters/shadow_linter.py,sha256=SKgRNVnTavNUviFC9osYMz18nGWCVOPOHx9LavEbnmc,15047
|
|
175
193
|
autocoder/linters/vue_linter.py,sha256=ZyvoxT0kSizFh_UkR7UZYO5DV9edbvDQZaibEF9W95I,20905
|
|
176
194
|
autocoder/memory/__init__.py,sha256=5FeGvsesRViYL4BkFiHw9SdlyHeWlqALpTyqOpfnBRw,179
|
|
177
|
-
autocoder/memory/active_context_manager.py,sha256=
|
|
195
|
+
autocoder/memory/active_context_manager.py,sha256=nqWD4lBLNcskXDRERhPpqnmn_i1V7_CTfQSN3xAX6b8,32297
|
|
178
196
|
autocoder/memory/active_package.py,sha256=NHLLnncFSfFcOFLWILwJLuEVd4nOoL0mqzFev6QHgzU,25480
|
|
179
197
|
autocoder/memory/async_processor.py,sha256=htHzLGupw9IHQAEdLe2AEaALZSItPi3AltDt8FMTRHk,4643
|
|
180
198
|
autocoder/memory/directory_mapper.py,sha256=BXHblOdRpeZb7URDECALp9uN5oi91KmkW9g_UaWFuZY,2513
|
|
@@ -239,7 +257,7 @@ autocoder/utils/auto_project_type.py,sha256=9_-wE9aavjbPiNSUVKxttJAdu5i5fu-zHyPY
|
|
|
239
257
|
autocoder/utils/coder.py,sha256=rK8e0svQBe0NOP26dIGToUXgha_hUDgxlWoC_p_r7oc,5698
|
|
240
258
|
autocoder/utils/conversation_store.py,sha256=esd9zLarKYe0ZsYqjjwHc_ksmVQDDEhVt-Ejul2oyys,1178
|
|
241
259
|
autocoder/utils/llm_client_interceptors.py,sha256=FEHNXoFZlCjAHQcjPRyX8FOMjo6rPXpO2AJ2zn2KTTo,901
|
|
242
|
-
autocoder/utils/llms.py,sha256=
|
|
260
|
+
autocoder/utils/llms.py,sha256=CQRNsX8SJBpeHl_zJ1N-Nj-MYyqkFCi3zETYSurCMkU,4021
|
|
243
261
|
autocoder/utils/log_capture.py,sha256=I-bsJFLWoGUiX-GKoZsH9kWJCKSV7ZlUnRt7jh-fOL0,1548
|
|
244
262
|
autocoder/utils/model_provider_selector.py,sha256=h1eVf4F7qfSOdJbtdwv7_xfIRcNBk3fVet5w1AuvK-g,7680
|
|
245
263
|
autocoder/utils/multi_turn.py,sha256=unK9OpqVRbK6uIcTKXgggX2wNmyj7s5eyEAQ2xUwHoM,88
|
|
@@ -257,9 +275,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
257
275
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
258
276
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=KW0mlmcHlStXi8-_6fXZ2-ifeJ5mgP0OV7DQFzCtIsw,14008
|
|
259
277
|
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.
|
|
278
|
+
auto_coder-0.1.336.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
279
|
+
auto_coder-0.1.336.dist-info/METADATA,sha256=jFmhNbFpLI9K9ggO4_IYJ7FdnWg2P8j2VSZYQQZJwao,2747
|
|
280
|
+
auto_coder-0.1.336.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
281
|
+
auto_coder-0.1.336.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
282
|
+
auto_coder-0.1.336.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
283
|
+
auto_coder-0.1.336.dist-info/RECORD,,
|
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
|
@@ -58,11 +58,12 @@ from autocoder.memory.active_context_manager import ActiveContextManager
|
|
|
58
58
|
from autocoder.common.command_completer import CommandCompleter,FileSystemModel as CCFileSystemModel,MemoryConfig as CCMemoryModel
|
|
59
59
|
from autocoder.common.conf_validator import ConfigValidator
|
|
60
60
|
from autocoder import command_parser as CommandParser
|
|
61
|
-
from loguru import logger
|
|
61
|
+
from loguru import logger as global_logger
|
|
62
62
|
from autocoder.utils.project_structure import EnhancedFileAnalyzer
|
|
63
|
+
from autocoder.common import SourceCodeList
|
|
63
64
|
|
|
64
|
-
## 对外API,用于第三方集成 auto-coder 使用。
|
|
65
65
|
|
|
66
|
+
## 对外API,用于第三方集成 auto-coder 使用。
|
|
66
67
|
class SymbolItem(BaseModel):
|
|
67
68
|
symbol_name: str
|
|
68
69
|
symbol_type: SymbolType
|
|
@@ -222,6 +223,36 @@ def get_all_extensions(directory: str = ".") -> str:
|
|
|
222
223
|
# 转换为逗号分隔的字符串
|
|
223
224
|
return ",".join(sorted(all_extensions))
|
|
224
225
|
|
|
226
|
+
def configure_logger():
|
|
227
|
+
# 设置日志目录和文件
|
|
228
|
+
log_dir = os.path.join(project_root, ".auto-coder", "logs")
|
|
229
|
+
os.makedirs(log_dir, exist_ok=True)
|
|
230
|
+
log_file = os.path.join(log_dir, "auto-coder.log")
|
|
231
|
+
|
|
232
|
+
# 配置全局日志
|
|
233
|
+
# 默认情况下,所有日志都写入文件
|
|
234
|
+
# 控制台上默认不输出任何日志,除非显式配置
|
|
235
|
+
global_logger.configure(
|
|
236
|
+
handlers=[
|
|
237
|
+
{
|
|
238
|
+
"sink": log_file,
|
|
239
|
+
"level": "INFO",
|
|
240
|
+
"rotation": "10 MB",
|
|
241
|
+
"retention": "1 week",
|
|
242
|
+
"format": "{time:YYYY-MM-DD HH:mm:ss} | {level} | {name} | {message}",
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"sink": sys.stdout,
|
|
246
|
+
"level": "INFO",
|
|
247
|
+
"format": "{time:YYYY-MM-DD HH:mm:ss} | {name} | {message}",
|
|
248
|
+
# 默认不打印任何日志到控制台
|
|
249
|
+
"filter": lambda record: False
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
configure_logger()
|
|
255
|
+
|
|
225
256
|
def initialize_system(args:InitializeSystemRequest):
|
|
226
257
|
from autocoder.utils.model_provider_selector import ModelProviderSelector
|
|
227
258
|
from autocoder import models as models_module
|
|
@@ -2747,11 +2778,21 @@ def conf_import(path: str):
|
|
|
2747
2778
|
import_conf(os.getcwd(), path)
|
|
2748
2779
|
|
|
2749
2780
|
@run_in_raw_thread()
|
|
2750
|
-
def auto_command(query: str,extra_args: Dict[str,Any]={}):
|
|
2751
|
-
"""处理/auto指令"""
|
|
2781
|
+
def auto_command(query: str,extra_args: Dict[str,Any]={}):
|
|
2782
|
+
"""处理/auto指令"""
|
|
2752
2783
|
from autocoder.commands.auto_command import CommandAutoTuner, AutoCommandRequest, CommandConfig, MemoryConfig
|
|
2753
2784
|
args = get_final_config()
|
|
2754
2785
|
|
|
2786
|
+
if args.enable_agentic_edit:
|
|
2787
|
+
from autocoder.common.v2.agent.agentic_edit import AgenticEdit,AgenticEditRequest
|
|
2788
|
+
llm = get_single_llm(args.code_model or args.model,product_mode=args.product_mode)
|
|
2789
|
+
agent = AgenticEdit(llm=llm,args=args,files=SourceCodeList(sources=[]),
|
|
2790
|
+
conversation_history=[],
|
|
2791
|
+
memory_config=MemoryConfig(memory=memory,
|
|
2792
|
+
save_memory_func=save_memory), command_config=CommandConfig)
|
|
2793
|
+
agent.run_in_terminal(AgenticEditRequest(user_input=query))
|
|
2794
|
+
return
|
|
2795
|
+
|
|
2755
2796
|
# 准备请求参数
|
|
2756
2797
|
request = AutoCommandRequest(
|
|
2757
2798
|
user_input=query
|
autocoder/common/__init__.py
CHANGED
|
File without changes
|