auto-coder 0.1.249__py3-none-any.whl → 0.1.250__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.249.dist-info → auto_coder-0.1.250.dist-info}/METADATA +1 -1
- {auto_coder-0.1.249.dist-info → auto_coder-0.1.250.dist-info}/RECORD +13 -13
- autocoder/agent/auto_review_commit.py +0 -1
- autocoder/auto_coder.py +2 -1
- autocoder/common/__init__.py +2 -0
- autocoder/common/command_generator.py +2 -2
- autocoder/index/filter/quick_filter.py +4 -2
- autocoder/utils/auto_coder_utils/chat_stream_out.py +28 -7
- autocoder/version.py +1 -1
- {auto_coder-0.1.249.dist-info → auto_coder-0.1.250.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.249.dist-info → auto_coder-0.1.250.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.249.dist-info → auto_coder-0.1.250.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.249.dist-info → auto_coder-0.1.250.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=iysR5Bd2IREUKkGkfcmuoLlqn76L70iNKcG-Y-BQvY0,62918
|
|
3
3
|
autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,3229
|
|
4
4
|
autocoder/auto_coder_rag.py,sha256=illKgzP2bv-Tq50ujsofJnOHdI4pzr0ALtfR8NHHWdQ,22351
|
|
5
5
|
autocoder/auto_coder_rag_client_mcp.py,sha256=WV7j5JUiQge0x4-B7Hp5-pSAFXLbvLpzQMcCovbauIM,6276
|
|
@@ -11,12 +11,12 @@ autocoder/chat_auto_coder_lang.py,sha256=ffLIVhOrODHamiy4csir-1TD7q7P9NeuZoZ9VaH
|
|
|
11
11
|
autocoder/command_args.py,sha256=9aYJ-AmPxP1sQh6ciw04FWHjSn31f2W9afXFwo8wgx4,30441
|
|
12
12
|
autocoder/lang.py,sha256=U6AjVV8Rs1uLyjFCZ8sT6WWuNUxMBqkXXIOs4S120uk,14511
|
|
13
13
|
autocoder/models.py,sha256=_9Kc8oS_tnnqKzRGnybgOfn1NOey7OXZ8y9qhBmgiB4,5517
|
|
14
|
-
autocoder/version.py,sha256=
|
|
14
|
+
autocoder/version.py,sha256=wNwxrmLzoMunbZEL7IU7ZAvpehOc0XEYZBzjCnolPhU,23
|
|
15
15
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
autocoder/agent/auto_demand_organizer.py,sha256=NWSAEsEk94vT3lGjfo25kKLMwYdPcpy9e-i21txPasQ,6942
|
|
17
17
|
autocoder/agent/auto_filegroup.py,sha256=CW7bqp0FW1GIEMnl-blyAc2UGT7O9Mom0q66ITz1ckM,6635
|
|
18
18
|
autocoder/agent/auto_guess_query.py,sha256=rDSdhpPHcOGE5MuDXvIrhCXAPR4ARS1LqpyoLsx2Jhw,11374
|
|
19
|
-
autocoder/agent/auto_review_commit.py,sha256=
|
|
19
|
+
autocoder/agent/auto_review_commit.py,sha256=7na6LiMg9jxtdX5hplJ2m-9tx2HzRBAEZ6h8lcsmasw,7591
|
|
20
20
|
autocoder/agent/auto_tool.py,sha256=DBzip-P_T6ZtT2eHexPcusmKYD0h7ufzp7TLwXAY10E,11554
|
|
21
21
|
autocoder/agent/coder.py,sha256=x6bdJwDuETGg9ebQnYlUWCxCtQcDGg73LtI6McpWslQ,72034
|
|
22
22
|
autocoder/agent/designer.py,sha256=EpRbzO58Xym3GrnppIT1Z8ZFAlnNfgzHbIzZ3PX-Yv8,27037
|
|
@@ -25,7 +25,7 @@ autocoder/agent/project_reader.py,sha256=tWLaPoLw1gI6kO_NzivQj28KbobU2ceOLuppHMb
|
|
|
25
25
|
autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
|
|
27
27
|
autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
|
|
28
|
-
autocoder/common/__init__.py,sha256=
|
|
28
|
+
autocoder/common/__init__.py,sha256=xkPcT6OixAN7JLOXcvvXn23Oon0FOmzNXoysxzj6p3k,11890
|
|
29
29
|
autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
|
|
30
30
|
autocoder/common/anything2img.py,sha256=4TREa-sOA-iargieUy7MpyCYVUE-9Mmq0wJtwomPqnE,7662
|
|
31
31
|
autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
|
|
@@ -44,7 +44,7 @@ autocoder/common/code_auto_merge_editblock.py,sha256=sp7C0fZJMVcNgI8uWy43CKDk7gG
|
|
|
44
44
|
autocoder/common/code_auto_merge_strict_diff.py,sha256=9rm0NJ_n6M3LohEX7xl1Jym0xmm8UEYqj_ZTSO3oSlM,9519
|
|
45
45
|
autocoder/common/code_modification_ranker.py,sha256=TycYdtxfNfde2N9-9jEB-9IL2Q3PoHS-k-r9JqZYD6s,6545
|
|
46
46
|
autocoder/common/command_completer.py,sha256=SSeb8MDH0JPvfdyW-S2uaHnui4VBDfSQvQPLbv3ORPA,9314
|
|
47
|
-
autocoder/common/command_generator.py,sha256
|
|
47
|
+
autocoder/common/command_generator.py,sha256=-hmbD_AnCa5HxL4BznuEfYAf_l8AxU5fAG5F0sM_fuE,2116
|
|
48
48
|
autocoder/common/command_templates.py,sha256=mnB3n8i0yjH1mqzyClEg8Wpr9VbZV44kxky66Zu6OJY,8557
|
|
49
49
|
autocoder/common/const.py,sha256=eTjhjh4Aj4CUzviJ81jaf3Y5cwqsLATySn2wJxaS6RQ,2911
|
|
50
50
|
autocoder/common/files.py,sha256=CguxG9digkWBJpRaILErZmL_G5ryPRahPmPFWGB7X18,1973
|
|
@@ -86,7 +86,7 @@ autocoder/index/symbols_utils.py,sha256=CjcjUVajmJZB75Ty3a7kMv1BZphrm-tIBAdOJv6u
|
|
|
86
86
|
autocoder/index/types.py,sha256=a2s_KV5FJlq7jqA2ELSo9E1sjuLwDB-JJYMhSpzBAhU,596
|
|
87
87
|
autocoder/index/filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
88
|
autocoder/index/filter/normal_filter.py,sha256=APu34iSvWhtlLtWgkj8N3Vo4oW1TegtZQq2bwDX_cs4,8031
|
|
89
|
-
autocoder/index/filter/quick_filter.py,sha256=
|
|
89
|
+
autocoder/index/filter/quick_filter.py,sha256=rkRmDOxT2ZF2f2d-xOPtpzVxkSYiw2KWW7g7FY40A0E,9522
|
|
90
90
|
autocoder/pyproject/__init__.py,sha256=dQ2_7YZ7guybT9BhfxSGn43eLQJGQN2zgeKa6--JlaQ,14403
|
|
91
91
|
autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
92
|
autocoder/rag/api_server.py,sha256=dRbhAZVRAOlZ64Cnxf4_rKb4iJwHnrWS9Zr67IVORw0,7288
|
|
@@ -140,11 +140,11 @@ autocoder/utils/rest.py,sha256=hLBhr78y-WVnV0oQf9Rxc22EwqF78KINkScvYa1MuYA,6435
|
|
|
140
140
|
autocoder/utils/tests.py,sha256=BqphrwyycGAvs-5mhH8pKtMZdObwhFtJ5MC_ZAOiLq8,1340
|
|
141
141
|
autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
142
142
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
|
-
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=
|
|
143
|
+
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=5kKOrPy1GWZ6qHjni-YNJJb2x0rD7_3Idl2M9sWxVfU,10481
|
|
144
144
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
145
|
-
auto_coder-0.1.
|
|
146
|
-
auto_coder-0.1.
|
|
147
|
-
auto_coder-0.1.
|
|
148
|
-
auto_coder-0.1.
|
|
149
|
-
auto_coder-0.1.
|
|
150
|
-
auto_coder-0.1.
|
|
145
|
+
auto_coder-0.1.250.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
146
|
+
auto_coder-0.1.250.dist-info/METADATA,sha256=ZAZ-ZHjFf6PUo8PYcj62mgVAEO2CXzJBRSA1z-bppc8,2616
|
|
147
|
+
auto_coder-0.1.250.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
148
|
+
auto_coder-0.1.250.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
149
|
+
auto_coder-0.1.250.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
150
|
+
auto_coder-0.1.250.dist-info/RECORD,,
|
|
@@ -5,7 +5,6 @@ import byzerllm
|
|
|
5
5
|
import pydantic
|
|
6
6
|
import git
|
|
7
7
|
from rich.console import Console
|
|
8
|
-
from autocoder.utils.auto_coder_utils.chat_stream_out import stream_out
|
|
9
8
|
from autocoder.common.printer import Printer
|
|
10
9
|
from autocoder.common import AutoCoderArgs
|
|
11
10
|
from autocoder.common.utils_code_auto_generate import stream_chat_with_continue
|
autocoder/auto_coder.py
CHANGED
autocoder/common/__init__.py
CHANGED
|
@@ -54,9 +54,9 @@ def generate_shell_script(user_input: str, llm: byzerllm.ByzerLLM) -> str:
|
|
|
54
54
|
result, _ = stream_out(
|
|
55
55
|
llm.stream_chat_oai(conversations=conversations, delta_mode=True),
|
|
56
56
|
model_name=llm.default_model_name,
|
|
57
|
-
title=title
|
|
57
|
+
title=title
|
|
58
58
|
)
|
|
59
59
|
|
|
60
60
|
# 提取代码块
|
|
61
|
-
code = code_utils.extract_code(result)[
|
|
61
|
+
code = code_utils.extract_code(result)[-1][1]
|
|
62
62
|
return code
|
|
@@ -84,7 +84,8 @@ class QuickFilter():
|
|
|
84
84
|
full_response, _ = stream_out(
|
|
85
85
|
stream_generator,
|
|
86
86
|
model_name=model_name,
|
|
87
|
-
title=self.printer.get_message_from_key_with_format("quick_filter_title", model_name=model_name)
|
|
87
|
+
title=self.printer.get_message_from_key_with_format("quick_filter_title", model_name=model_name),
|
|
88
|
+
args=self.args
|
|
88
89
|
)
|
|
89
90
|
file_number_list = to_model(full_response, FileNumberList)
|
|
90
91
|
else:
|
|
@@ -197,7 +198,8 @@ class QuickFilter():
|
|
|
197
198
|
full_response, last_meta = stream_out(
|
|
198
199
|
stream_generator,
|
|
199
200
|
model_name=model_name,
|
|
200
|
-
title=self.printer.get_message_from_key_with_format("quick_filter_title", model_name=model_name)
|
|
201
|
+
title=self.printer.get_message_from_key_with_format("quick_filter_title", model_name=model_name),
|
|
202
|
+
args=self.args
|
|
201
203
|
)
|
|
202
204
|
# 解析结果
|
|
203
205
|
file_number_list = to_model(full_response, FileNumberList)
|
|
@@ -10,6 +10,7 @@ from autocoder.utils.request_queue import RequestValue, RequestOption, StreamVal
|
|
|
10
10
|
from autocoder.utils.request_queue import request_queue
|
|
11
11
|
import time
|
|
12
12
|
from byzerllm.utils.types import SingleOutputMeta
|
|
13
|
+
from autocoder.common import AutoCoderArgs
|
|
13
14
|
|
|
14
15
|
MAX_HISTORY_LINES = 40 # 最大保留历史行数
|
|
15
16
|
|
|
@@ -144,7 +145,8 @@ def stream_out(
|
|
|
144
145
|
request_id: Optional[str] = None,
|
|
145
146
|
console: Optional[Console] = None,
|
|
146
147
|
model_name: Optional[str] = None,
|
|
147
|
-
title: Optional[str] = None
|
|
148
|
+
title: Optional[str] = None,
|
|
149
|
+
args: Optional[AutoCoderArgs] = None
|
|
148
150
|
) -> Tuple[str, Optional[SingleOutputMeta]]:
|
|
149
151
|
"""
|
|
150
152
|
处理流式输出事件并在终端中展示
|
|
@@ -155,17 +157,22 @@ def stream_out(
|
|
|
155
157
|
console: Rich Console对象
|
|
156
158
|
model_name: 模型名称
|
|
157
159
|
title: 面板标题,如果没有提供则使用默认值
|
|
160
|
+
args: AutoCoderArgs对象
|
|
158
161
|
Returns:
|
|
159
|
-
Tuple[str, Dict[
|
|
162
|
+
Tuple[str, Dict[SingleOutputMeta]]: 返回完整的响应内容和最后的元数据
|
|
160
163
|
"""
|
|
161
164
|
if console is None:
|
|
162
165
|
console = Console(force_terminal=True, color_system="auto", height=None)
|
|
163
|
-
|
|
166
|
+
|
|
167
|
+
keep_reasoning_content = True
|
|
168
|
+
if args:
|
|
169
|
+
keep_reasoning_content = args.keep_reasoning_content
|
|
170
|
+
|
|
164
171
|
lines_buffer = [] # 存储历史行
|
|
165
172
|
current_line = "" # 当前行
|
|
166
173
|
assistant_response = ""
|
|
167
174
|
last_meta = None
|
|
168
|
-
panel_title = title if title is not None else f"Response[ {model_name} ]"
|
|
175
|
+
panel_title = title if title is not None else f"Response[ {model_name} ]"
|
|
169
176
|
try:
|
|
170
177
|
with Live(
|
|
171
178
|
Panel("", title=panel_title, border_style="green"),
|
|
@@ -179,8 +186,22 @@ def stream_out(
|
|
|
179
186
|
|
|
180
187
|
if reasoning_content == "" and content == "":
|
|
181
188
|
continue
|
|
182
|
-
|
|
183
|
-
|
|
189
|
+
|
|
190
|
+
if keep_reasoning_content:
|
|
191
|
+
# 处理思考内容
|
|
192
|
+
if reasoning_content:
|
|
193
|
+
if assistant_response == "": # 首次遇到思考内容时添加开标签
|
|
194
|
+
assistant_response = "<thinking>"
|
|
195
|
+
assistant_response += reasoning_content
|
|
196
|
+
|
|
197
|
+
# 处理正式内容
|
|
198
|
+
if content:
|
|
199
|
+
# 如果之前有思考内容,需要先关闭thinking标签
|
|
200
|
+
if "</thinking>" not in assistant_response and "<thinking>" in assistant_response:
|
|
201
|
+
assistant_response += "</thinking>"
|
|
202
|
+
assistant_response += content
|
|
203
|
+
else:
|
|
204
|
+
assistant_response += content
|
|
184
205
|
|
|
185
206
|
display_delta = reasoning_content if reasoning_content else content
|
|
186
207
|
|
|
@@ -230,7 +251,7 @@ def stream_out(
|
|
|
230
251
|
title=f"Final {panel_title}",
|
|
231
252
|
border_style="blue"
|
|
232
253
|
)
|
|
233
|
-
)
|
|
254
|
+
)
|
|
234
255
|
|
|
235
256
|
except Exception as e:
|
|
236
257
|
console.print(Panel(
|
autocoder/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.250"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|