auto-coder 0.1.233__py3-none-any.whl → 0.1.237__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.233.dist-info → auto_coder-0.1.237.dist-info}/METADATA +2 -3
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.dist-info}/RECORD +24 -21
- autocoder/auto_coder.py +68 -35
- autocoder/chat_auto_coder.py +107 -84
- autocoder/chat_auto_coder_lang.py +69 -17
- autocoder/common/__init__.py +3 -0
- autocoder/common/auto_coder_lang.py +141 -0
- autocoder/common/code_auto_merge.py +12 -9
- autocoder/common/code_auto_merge_diff.py +5 -4
- autocoder/common/code_auto_merge_editblock.py +35 -33
- autocoder/common/code_auto_merge_strict_diff.py +5 -4
- autocoder/common/code_modification_ranker.py +74 -44
- autocoder/common/printer.py +49 -0
- autocoder/dispacher/actions/action.py +68 -19
- autocoder/dispacher/actions/plugins/action_regex_project.py +5 -0
- autocoder/index/entry.py +57 -14
- autocoder/index/filter/quick_filter.py +7 -6
- autocoder/index/index.py +54 -16
- autocoder/utils/types.py +0 -0
- autocoder/version.py +1 -1
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.dist-info}/top_level.txt +0 -0
autocoder/chat_auto_coder.py
CHANGED
|
@@ -53,6 +53,7 @@ from autocoder import models
|
|
|
53
53
|
import shlex
|
|
54
54
|
from autocoder.utils.llms import get_single_llm
|
|
55
55
|
import pkg_resources
|
|
56
|
+
from autocoder.common.printer import Printer
|
|
56
57
|
|
|
57
58
|
class SymbolItem(BaseModel):
|
|
58
59
|
symbol_name: str
|
|
@@ -370,6 +371,33 @@ def initialize_system(args):
|
|
|
370
371
|
"deepseek_chat",
|
|
371
372
|
]
|
|
372
373
|
|
|
374
|
+
try:
|
|
375
|
+
subprocess.run(deploy_cmd, check=True)
|
|
376
|
+
print_status(get_message("deploy_complete"), "success")
|
|
377
|
+
except subprocess.CalledProcessError:
|
|
378
|
+
print_status(get_message("deploy_fail"), "error")
|
|
379
|
+
return
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
deploy_cmd = [
|
|
383
|
+
"byzerllm",
|
|
384
|
+
"deploy",
|
|
385
|
+
"--pretrained_model_type",
|
|
386
|
+
"saas/reasoning_openai",
|
|
387
|
+
"--cpus_per_worker",
|
|
388
|
+
"0.001",
|
|
389
|
+
"--gpus_per_worker",
|
|
390
|
+
"0",
|
|
391
|
+
"--worker_concurrency",
|
|
392
|
+
"1000",
|
|
393
|
+
"--num_workers",
|
|
394
|
+
"1",
|
|
395
|
+
"--infer_params",
|
|
396
|
+
f"saas.base_url=https://api.deepseek.com/v1 saas.api_key={api_key} saas.model=deepseek-reasoner",
|
|
397
|
+
"--model",
|
|
398
|
+
"deepseek_r1_chat",
|
|
399
|
+
]
|
|
400
|
+
|
|
373
401
|
try:
|
|
374
402
|
subprocess.run(deploy_cmd, check=True)
|
|
375
403
|
print_status(get_message("deploy_complete"), "success")
|
|
@@ -510,32 +538,31 @@ def redirect_stdout():
|
|
|
510
538
|
|
|
511
539
|
|
|
512
540
|
def configure(conf: str, skip_print=False):
|
|
541
|
+
printer = Printer()
|
|
513
542
|
parts = conf.split(None, 1)
|
|
514
543
|
if len(parts) == 2 and parts[0] in ["/drop", "/unset", "/remove"]:
|
|
515
544
|
key = parts[1].strip()
|
|
516
545
|
if key in memory["conf"]:
|
|
517
546
|
del memory["conf"][key]
|
|
518
547
|
save_memory()
|
|
519
|
-
|
|
548
|
+
printer.print_in_terminal("config_delete_success", style="green", key=key)
|
|
520
549
|
else:
|
|
521
|
-
|
|
550
|
+
printer.print_in_terminal("config_not_found", style="yellow", key=key)
|
|
522
551
|
else:
|
|
523
552
|
parts = conf.split(":", 1)
|
|
524
553
|
if len(parts) != 2:
|
|
525
|
-
|
|
526
|
-
"\033[91mError: Invalid configuration format. Use 'key:value' or '/drop key'.\033[0m"
|
|
527
|
-
)
|
|
554
|
+
printer.print_in_terminal("config_invalid_format", style="red")
|
|
528
555
|
return
|
|
529
556
|
key, value = parts
|
|
530
557
|
key = key.strip()
|
|
531
558
|
value = value.strip()
|
|
532
559
|
if not value:
|
|
533
|
-
|
|
560
|
+
printer.print_in_terminal("config_value_empty", style="red")
|
|
534
561
|
return
|
|
535
562
|
memory["conf"][key] = value
|
|
536
563
|
save_memory()
|
|
537
564
|
if not skip_print:
|
|
538
|
-
|
|
565
|
+
printer.print_in_terminal("config_set_success", style="green", key=key, value=value)
|
|
539
566
|
|
|
540
567
|
# word_completer = WordCompleter(commands)
|
|
541
568
|
|
|
@@ -1004,15 +1031,10 @@ def add_files(args: List[str]):
|
|
|
1004
1031
|
groups_info = memory["current_files"]["groups_info"]
|
|
1005
1032
|
|
|
1006
1033
|
console = Console()
|
|
1034
|
+
printer = Printer()
|
|
1007
1035
|
|
|
1008
1036
|
if not args:
|
|
1009
|
-
|
|
1010
|
-
Panel(
|
|
1011
|
-
"Please provide arguments for the /add_files command.",
|
|
1012
|
-
title="Error",
|
|
1013
|
-
border_style="red",
|
|
1014
|
-
)
|
|
1015
|
-
)
|
|
1037
|
+
printer.print_in_terminal("add_files_no_args", style="red")
|
|
1016
1038
|
return
|
|
1017
1039
|
|
|
1018
1040
|
if args[0] == "/refresh":
|
|
@@ -1226,7 +1248,7 @@ def add_files(args: List[str]):
|
|
|
1226
1248
|
if files_to_add:
|
|
1227
1249
|
memory["current_files"]["files"].extend(files_to_add)
|
|
1228
1250
|
table = Table(
|
|
1229
|
-
title="
|
|
1251
|
+
title=get_message("add_files_added_files"),
|
|
1230
1252
|
show_header=True,
|
|
1231
1253
|
header_style="bold magenta",
|
|
1232
1254
|
show_lines=True, # 这会在每行之间添加分割线
|
|
@@ -1241,29 +1263,20 @@ def add_files(args: List[str]):
|
|
|
1241
1263
|
)
|
|
1242
1264
|
console.print(Panel(table, border_style="green"))
|
|
1243
1265
|
else:
|
|
1244
|
-
|
|
1245
|
-
Panel(
|
|
1246
|
-
"All specified files are already in the current session or no matches found.",
|
|
1247
|
-
title="No Files Added",
|
|
1248
|
-
border_style="yellow",
|
|
1249
|
-
)
|
|
1250
|
-
)
|
|
1266
|
+
printer.print_in_terminal("add_files_matched", style="yellow")
|
|
1251
1267
|
|
|
1252
1268
|
completer.update_current_files(memory["current_files"]["files"])
|
|
1253
1269
|
save_memory()
|
|
1254
1270
|
|
|
1255
1271
|
|
|
1256
1272
|
def remove_files(file_names: List[str]):
|
|
1257
|
-
console = Console()
|
|
1258
1273
|
project_root = os.getcwd()
|
|
1274
|
+
printer = Printer()
|
|
1259
1275
|
|
|
1260
1276
|
if "/all" in file_names:
|
|
1261
1277
|
memory["current_files"]["files"] = []
|
|
1262
1278
|
memory["current_files"]["current_groups"] = []
|
|
1263
|
-
|
|
1264
|
-
Panel("Removed all files.",
|
|
1265
|
-
title="Files Removed", border_style="green")
|
|
1266
|
-
)
|
|
1279
|
+
printer.print_in_terminal("remove_files_all", style="green")
|
|
1267
1280
|
else:
|
|
1268
1281
|
removed_files = []
|
|
1269
1282
|
for file in memory["current_files"]["files"]:
|
|
@@ -1275,21 +1288,20 @@ def remove_files(file_names: List[str]):
|
|
|
1275
1288
|
memory["current_files"]["files"].remove(file)
|
|
1276
1289
|
|
|
1277
1290
|
if removed_files:
|
|
1278
|
-
table = Table(
|
|
1279
|
-
|
|
1291
|
+
table = Table(
|
|
1292
|
+
show_header=True,
|
|
1293
|
+
header_style="bold magenta"
|
|
1280
1294
|
)
|
|
1281
1295
|
table.add_column("File", style="green")
|
|
1282
1296
|
for f in removed_files:
|
|
1283
1297
|
table.add_row(os.path.relpath(f, project_root))
|
|
1284
|
-
|
|
1285
|
-
|
|
1298
|
+
|
|
1299
|
+
console = Console()
|
|
1286
1300
|
console.print(
|
|
1287
|
-
Panel(
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
)
|
|
1292
|
-
)
|
|
1301
|
+
Panel(table, border_style="green",
|
|
1302
|
+
title=printer.get_message_from_key("files_removed")))
|
|
1303
|
+
else:
|
|
1304
|
+
printer.print_in_terminal("remove_files_none", style="yellow")
|
|
1293
1305
|
|
|
1294
1306
|
completer.update_current_files(memory["current_files"]["files"])
|
|
1295
1307
|
save_memory()
|
|
@@ -1399,6 +1411,7 @@ def convert_yaml_to_config(yaml_file: str):
|
|
|
1399
1411
|
def mcp(query: str):
|
|
1400
1412
|
query = query.strip()
|
|
1401
1413
|
mcp_server = get_mcp_server()
|
|
1414
|
+
printer = Printer()
|
|
1402
1415
|
|
|
1403
1416
|
# Handle remove command
|
|
1404
1417
|
if query.startswith("/remove"):
|
|
@@ -1406,29 +1419,29 @@ def mcp(query: str):
|
|
|
1406
1419
|
response = mcp_server.send_request(
|
|
1407
1420
|
McpRemoveRequest(server_name=server_name))
|
|
1408
1421
|
if response.error:
|
|
1409
|
-
|
|
1422
|
+
printer.print_in_terminal("mcp_remove_error", style="red", error=response.error)
|
|
1410
1423
|
else:
|
|
1411
|
-
|
|
1424
|
+
printer.print_in_terminal("mcp_remove_success", style="green", result=response.result)
|
|
1412
1425
|
return
|
|
1413
1426
|
|
|
1414
1427
|
# Handle list command
|
|
1415
1428
|
if query.startswith("/list_running"):
|
|
1416
1429
|
response = mcp_server.send_request(McpListRunningRequest())
|
|
1417
1430
|
if response.error:
|
|
1418
|
-
|
|
1431
|
+
printer.print_in_terminal("mcp_list_running_error", style="red", error=response.error)
|
|
1419
1432
|
else:
|
|
1420
|
-
|
|
1421
|
-
|
|
1433
|
+
printer.print_in_terminal("mcp_list_running_title")
|
|
1434
|
+
printer.print_str_in_terminal(response.result)
|
|
1422
1435
|
return
|
|
1423
1436
|
|
|
1424
1437
|
# Handle list command
|
|
1425
1438
|
if query.startswith("/list"):
|
|
1426
1439
|
response = mcp_server.send_request(McpListRequest())
|
|
1427
1440
|
if response.error:
|
|
1428
|
-
|
|
1441
|
+
printer.print_in_terminal("mcp_list_builtin_error", style="red", error=response.error)
|
|
1429
1442
|
else:
|
|
1430
|
-
|
|
1431
|
-
|
|
1443
|
+
printer.print_in_terminal("mcp_list_builtin_title")
|
|
1444
|
+
printer.print_str_in_terminal(response.result)
|
|
1432
1445
|
return
|
|
1433
1446
|
|
|
1434
1447
|
# Handle refresh command
|
|
@@ -1436,9 +1449,9 @@ def mcp(query: str):
|
|
|
1436
1449
|
server_name = query.replace("/refresh", "", 1).strip()
|
|
1437
1450
|
response = mcp_server.send_request(McpRefreshRequest(name=server_name or None))
|
|
1438
1451
|
if response.error:
|
|
1439
|
-
|
|
1452
|
+
printer.print_in_terminal("mcp_refresh_error", style="red", error=response.error)
|
|
1440
1453
|
else:
|
|
1441
|
-
|
|
1454
|
+
printer.print_in_terminal("mcp_refresh_success", style="green")
|
|
1442
1455
|
return
|
|
1443
1456
|
|
|
1444
1457
|
# Handle add command
|
|
@@ -1448,9 +1461,9 @@ def mcp(query: str):
|
|
|
1448
1461
|
response = mcp_server.send_request(request)
|
|
1449
1462
|
|
|
1450
1463
|
if response.error:
|
|
1451
|
-
|
|
1464
|
+
printer.print_in_terminal("mcp_install_error", style="red", error=response.error)
|
|
1452
1465
|
else:
|
|
1453
|
-
|
|
1466
|
+
printer.print_in_terminal("mcp_install_success", style="green", result=response.result)
|
|
1454
1467
|
return
|
|
1455
1468
|
|
|
1456
1469
|
# Handle default query
|
|
@@ -1486,13 +1499,16 @@ def mcp(query: str):
|
|
|
1486
1499
|
model=args.inference_model or args.model
|
|
1487
1500
|
)
|
|
1488
1501
|
)
|
|
1489
|
-
|
|
1502
|
+
|
|
1490
1503
|
if response.error:
|
|
1491
|
-
|
|
1504
|
+
printer.print_panel(
|
|
1492
1505
|
f"Error from MCP server: {response.error}",
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1506
|
+
text_options={"justify": "left"},
|
|
1507
|
+
panel_options={
|
|
1508
|
+
"title": printer.get_message_from_key("mcp_error_title"),
|
|
1509
|
+
"border_style": "red"
|
|
1510
|
+
}
|
|
1511
|
+
)
|
|
1496
1512
|
else:
|
|
1497
1513
|
# Save conversation
|
|
1498
1514
|
mcp_dir = os.path.join(".auto-coder", "mcp", "conversations")
|
|
@@ -1501,17 +1517,20 @@ def mcp(query: str):
|
|
|
1501
1517
|
file_path = os.path.join(mcp_dir, f"{timestamp}.md")
|
|
1502
1518
|
|
|
1503
1519
|
# Format response as markdown
|
|
1504
|
-
markdown_content = f"#
|
|
1520
|
+
markdown_content = f"# {printer.get_message_from_key('mcp_response_title')}\n\n{response.result}"
|
|
1505
1521
|
|
|
1506
1522
|
# Save to file
|
|
1507
1523
|
with open(file_path, "w", encoding="utf-8") as f:
|
|
1508
1524
|
f.write(markdown_content)
|
|
1509
1525
|
|
|
1510
1526
|
# Print with markdown formatting
|
|
1511
|
-
|
|
1512
|
-
Markdown(markdown_content),
|
|
1513
|
-
|
|
1514
|
-
|
|
1527
|
+
printer.print_panel(
|
|
1528
|
+
Markdown(markdown_content),
|
|
1529
|
+
text_options={"justify": "left"},
|
|
1530
|
+
panel_options={
|
|
1531
|
+
"border_style": "green"
|
|
1532
|
+
}
|
|
1533
|
+
)
|
|
1515
1534
|
|
|
1516
1535
|
|
|
1517
1536
|
def code_next(query: str):
|
|
@@ -1715,7 +1734,8 @@ def coding(query: str):
|
|
|
1715
1734
|
== "true",
|
|
1716
1735
|
}
|
|
1717
1736
|
|
|
1718
|
-
yaml_config["context"] = ""
|
|
1737
|
+
yaml_config["context"] = ""
|
|
1738
|
+
yaml_config["in_code_apply"] = is_apply
|
|
1719
1739
|
|
|
1720
1740
|
for key, value in conf.items():
|
|
1721
1741
|
converted_value = convert_config_value(key, value)
|
|
@@ -2076,11 +2096,11 @@ def manage_models(params, query: str):
|
|
|
2076
2096
|
/models /add_model name=xxx base_url=xxx ... - Add model with custom params
|
|
2077
2097
|
/models /remove <name> - Remove model by name
|
|
2078
2098
|
"""
|
|
2079
|
-
|
|
2099
|
+
printer = Printer()
|
|
2080
2100
|
console = Console()
|
|
2081
2101
|
|
|
2082
2102
|
if params.product_mode != "lite":
|
|
2083
|
-
|
|
2103
|
+
printer.print_in_terminal("models_lite_only", style="red")
|
|
2084
2104
|
return
|
|
2085
2105
|
|
|
2086
2106
|
models_data = models.load_models()
|
|
@@ -2100,17 +2120,21 @@ def manage_models(params, query: str):
|
|
|
2100
2120
|
if "/remove" in query:
|
|
2101
2121
|
subcmd = "/remove"
|
|
2102
2122
|
query = query.replace("/remove", "", 1).strip()
|
|
2123
|
+
|
|
2103
2124
|
if not subcmd:
|
|
2104
|
-
|
|
2125
|
+
printer.print_in_terminal("models_usage")
|
|
2105
2126
|
return
|
|
2106
2127
|
|
|
2107
2128
|
if subcmd == "/list":
|
|
2108
2129
|
if models_data:
|
|
2109
|
-
table = Table(
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2130
|
+
table = Table(
|
|
2131
|
+
title=printer.get_message_from_key("models_title"),
|
|
2132
|
+
expand=True,
|
|
2133
|
+
show_lines=True
|
|
2134
|
+
)
|
|
2135
|
+
table.add_column("Name", style="cyan", width=40, no_wrap=False)
|
|
2136
|
+
table.add_column("Model Name", style="magenta", width=30, overflow="fold")
|
|
2137
|
+
table.add_column("Description", style="white", width=50, overflow="fold")
|
|
2114
2138
|
for m in models_data:
|
|
2115
2139
|
# Check if api_key_path exists and file exists
|
|
2116
2140
|
api_key_path = m.get("api_key_path", "")
|
|
@@ -2118,17 +2142,16 @@ def manage_models(params, query: str):
|
|
|
2118
2142
|
if api_key_path:
|
|
2119
2143
|
api_key_file = os.path.expanduser(f"~/.auto-coder/keys/{api_key_path}")
|
|
2120
2144
|
if os.path.exists(api_key_file):
|
|
2121
|
-
name = f"{name}*"
|
|
2122
|
-
|
|
2145
|
+
name = f"{name}*"
|
|
2146
|
+
|
|
2123
2147
|
table.add_row(
|
|
2124
|
-
name,
|
|
2125
|
-
m.get("model_type", ""),
|
|
2148
|
+
name,
|
|
2126
2149
|
m.get("model_name", ""),
|
|
2127
2150
|
m.get("description", "")
|
|
2128
2151
|
)
|
|
2129
2152
|
console.print(table)
|
|
2130
2153
|
else:
|
|
2131
|
-
|
|
2154
|
+
printer.print_in_terminal("models_no_models", style="yellow")
|
|
2132
2155
|
|
|
2133
2156
|
elif subcmd == "/add":
|
|
2134
2157
|
# Support both simplified and legacy formats
|
|
@@ -2138,11 +2161,11 @@ def manage_models(params, query: str):
|
|
|
2138
2161
|
name, api_key = args[0], args[1]
|
|
2139
2162
|
result = models.update_model_with_api_key(name, api_key)
|
|
2140
2163
|
if result:
|
|
2141
|
-
|
|
2164
|
+
printer.print_in_terminal("models_added", style="green", name=name)
|
|
2142
2165
|
else:
|
|
2143
|
-
|
|
2166
|
+
printer.print_in_terminal("models_add_failed", style="red", name=name)
|
|
2144
2167
|
else:
|
|
2145
|
-
|
|
2168
|
+
printer.print_in_terminal("models_add_usage", style="red")
|
|
2146
2169
|
|
|
2147
2170
|
elif subcmd == "/add_model":
|
|
2148
2171
|
# Parse key=value pairs: /models /add_model name=abc base_url=http://xx ...
|
|
@@ -2151,19 +2174,19 @@ def manage_models(params, query: str):
|
|
|
2151
2174
|
data_dict = {}
|
|
2152
2175
|
for pair in kv_pairs:
|
|
2153
2176
|
if '=' not in pair:
|
|
2154
|
-
|
|
2177
|
+
printer.print_in_terminal("models_add_model_params", style="red")
|
|
2155
2178
|
continue
|
|
2156
2179
|
k, v = pair.split('=', 1)
|
|
2157
2180
|
data_dict[k.strip()] = v.strip()
|
|
2158
2181
|
|
|
2159
2182
|
# Name is required
|
|
2160
2183
|
if "name" not in data_dict:
|
|
2161
|
-
|
|
2184
|
+
printer.print_in_terminal("models_add_model_name_required", style="red")
|
|
2162
2185
|
return
|
|
2163
2186
|
|
|
2164
2187
|
# Check duplication
|
|
2165
2188
|
if any(m["name"] == data_dict["name"] for m in models_data):
|
|
2166
|
-
|
|
2189
|
+
printer.print_in_terminal("models_add_model_exists", style="yellow", name=data_dict["name"])
|
|
2167
2190
|
return
|
|
2168
2191
|
|
|
2169
2192
|
# Create model with defaults
|
|
@@ -2179,23 +2202,23 @@ def manage_models(params, query: str):
|
|
|
2179
2202
|
|
|
2180
2203
|
models_data.append(final_model)
|
|
2181
2204
|
models.save_models(models_data)
|
|
2182
|
-
|
|
2205
|
+
printer.print_in_terminal("models_add_model_success", style="green", name=data_dict["name"])
|
|
2183
2206
|
|
|
2184
2207
|
elif subcmd == "/remove":
|
|
2185
2208
|
args = query.strip().split(" ")
|
|
2186
2209
|
if len(args) < 1:
|
|
2187
|
-
|
|
2210
|
+
printer.print_in_terminal("models_add_usage", style="red")
|
|
2188
2211
|
return
|
|
2189
2212
|
name = args[0]
|
|
2190
2213
|
filtered_models = [m for m in models_data if m["name"] != name]
|
|
2191
2214
|
if len(filtered_models) == len(models_data):
|
|
2192
|
-
|
|
2215
|
+
printer.print_in_terminal("models_add_model_remove", style="yellow", name=name)
|
|
2193
2216
|
return
|
|
2194
2217
|
models.save_models(filtered_models)
|
|
2195
|
-
|
|
2218
|
+
printer.print_in_terminal("models_add_model_removed", style="green", name=name)
|
|
2196
2219
|
|
|
2197
2220
|
else:
|
|
2198
|
-
|
|
2221
|
+
printer.print_in_terminal("models_unknown_subcmd", style="yellow", subcmd=subcmd)
|
|
2199
2222
|
|
|
2200
2223
|
def exclude_dirs(dir_names: List[str]):
|
|
2201
2224
|
new_dirs = dir_names
|
|
@@ -2,6 +2,19 @@ import locale
|
|
|
2
2
|
|
|
3
3
|
MESSAGES = {
|
|
4
4
|
"en": {
|
|
5
|
+
"mcp_remove_error": "Error removing MCP server: {error}",
|
|
6
|
+
"mcp_remove_success": "Successfully removed MCP server: {result}",
|
|
7
|
+
"mcp_list_running_error": "Error listing running MCP servers: {error}",
|
|
8
|
+
"mcp_list_running_title": "Running MCP servers:",
|
|
9
|
+
"mcp_list_builtin_error": "Error listing builtin MCP servers: {error}",
|
|
10
|
+
"mcp_list_builtin_title": "Available builtin MCP servers:",
|
|
11
|
+
"mcp_refresh_error": "Error refreshing MCP servers: {error}",
|
|
12
|
+
"mcp_refresh_success": "Successfully refreshed MCP servers",
|
|
13
|
+
"mcp_install_error": "Error installing MCP server: {error}",
|
|
14
|
+
"mcp_install_success": "Successfully installed MCP server: {result}",
|
|
15
|
+
"mcp_query_empty": "Please enter your query.",
|
|
16
|
+
"mcp_error_title": "Error",
|
|
17
|
+
"mcp_response_title": "MCP Response",
|
|
5
18
|
"initializing": "🚀 Initializing system...",
|
|
6
19
|
"not_initialized": "The current directory is not initialized as an auto-coder project.",
|
|
7
20
|
"init_prompt": "Do you want to initialize the project now? (y/n): ",
|
|
@@ -68,21 +81,47 @@ MESSAGES = {
|
|
|
68
81
|
"commit_desc": "Auto generate yaml file and commit changes based on user's manual changes",
|
|
69
82
|
"models_desc": "Manage model configurations, only available in lite mode",
|
|
70
83
|
"models_usage": "Usage: /models /list|/add|/add_model|/remove ...",
|
|
71
|
-
"models_added": "Added/Updated model '{name}' successfully.",
|
|
72
|
-
"models_add_failed": "Failed to add model '{name}'. Model not found in defaults.",
|
|
84
|
+
"models_added": "Added/Updated model '{{name}}' successfully.",
|
|
85
|
+
"models_add_failed": "Failed to add model '{{name}}'. Model not found in defaults.",
|
|
73
86
|
"models_add_usage": "Usage: /models /add <name> <api_key> or\n/models /add <name> <model_type> <model_name> <base_url> <api_key_path> [description]",
|
|
74
87
|
"models_add_model_params": "Please provide parameters in key=value format",
|
|
75
88
|
"models_add_model_name_required": "'name' parameter is required",
|
|
76
|
-
"models_add_model_exists": "Model '{name}' already exists.",
|
|
77
|
-
"models_add_model_success": "Successfully added custom model: {name}",
|
|
78
|
-
"models_add_model_remove": "Model '{name}' not found.",
|
|
79
|
-
"models_add_model_removed": "Removed model: {name}",
|
|
80
|
-
"models_unknown_subcmd": "Unknown subcommand: {subcmd}",
|
|
89
|
+
"models_add_model_exists": "Model '{{name}}' already exists.",
|
|
90
|
+
"models_add_model_success": "Successfully added custom model: {{name}}",
|
|
91
|
+
"models_add_model_remove": "Model '{{name}}' not found.",
|
|
92
|
+
"models_add_model_removed": "Removed model: {{name}}",
|
|
93
|
+
"models_unknown_subcmd": "Unknown subcommand: {{subcmd}}",
|
|
81
94
|
"models_title": "All Models (内置 + models.json)",
|
|
82
95
|
"models_no_models": "No models found.",
|
|
83
|
-
"models_lite_only": "The /models command is only available in lite mode"
|
|
96
|
+
"models_lite_only": "The /models command is only available in lite mode",
|
|
97
|
+
"models_api_key_exists": "API key file exists: {{path}}",
|
|
98
|
+
"config_invalid_format": "Error: Invalid configuration format. Use 'key:value' or '/drop key'.",
|
|
99
|
+
"config_value_empty": "Error: Value cannot be empty. Use 'key:value'.",
|
|
100
|
+
"config_set_success": "Set {{key}} to {{value}}",
|
|
101
|
+
"config_delete_success": "Deleted configuration: {{key}}",
|
|
102
|
+
"config_not_found": "Configuration not found: {{key}}",
|
|
103
|
+
"add_files_matched": "All specified files are already in the current session or no matches found.",
|
|
104
|
+
"add_files_added_files": "Added Files",
|
|
105
|
+
"add_files_no_args": "Please provide arguments for the /add_files command.",
|
|
106
|
+
"remove_files_all": "Removed all files.",
|
|
107
|
+
"remove_files_removed": "Removed Files",
|
|
108
|
+
"remove_files_none": "No files were removed.",
|
|
109
|
+
"files_removed": "Files Removed"
|
|
84
110
|
},
|
|
85
111
|
"zh": {
|
|
112
|
+
"mcp_remove_error": "移除 MCP 服务器时出错:{error}",
|
|
113
|
+
"mcp_remove_success": "成功移除 MCP 服务器:{result}",
|
|
114
|
+
"mcp_list_running_error": "列出运行中的 MCP 服务器时出错:{error}",
|
|
115
|
+
"mcp_list_running_title": "正在运行的 MCP 服务器:",
|
|
116
|
+
"mcp_list_builtin_error": "列出内置 MCP 服务器时出错:{error}",
|
|
117
|
+
"mcp_list_builtin_title": "可用的内置 MCP 服务器:",
|
|
118
|
+
"mcp_refresh_error": "刷新 MCP 服务器时出错:{error}",
|
|
119
|
+
"mcp_refresh_success": "成功刷新 MCP 服务器",
|
|
120
|
+
"mcp_install_error": "安装 MCP 服务器时出错:{error}",
|
|
121
|
+
"mcp_install_success": "成功安装 MCP 服务器:{result}",
|
|
122
|
+
"mcp_query_empty": "请输入您的查询。",
|
|
123
|
+
"mcp_error_title": "错误",
|
|
124
|
+
"mcp_response_title": "MCP 响应",
|
|
86
125
|
"initializing": "🚀 正在初始化系统...",
|
|
87
126
|
"not_initialized": "当前目录未初始化为auto-coder项目。",
|
|
88
127
|
"init_prompt": "是否现在初始化项目?(y/n): ",
|
|
@@ -147,21 +186,34 @@ MESSAGES = {
|
|
|
147
186
|
"exit_desc": "退出程序",
|
|
148
187
|
"design_desc": "根据需求设计SVG图片",
|
|
149
188
|
"commit_desc": "根据用户人工修改的代码自动生成yaml文件并提交更改",
|
|
150
|
-
"models_desc": "
|
|
189
|
+
"models_desc": "管理模型配置,仅在lite模式下可用",
|
|
151
190
|
"models_usage": "用法: /models /list|/add|/add_model|/remove ...",
|
|
152
|
-
"models_added": "成功添加/更新模型 '{name}'。",
|
|
153
|
-
"models_add_failed": "添加模型 '{name}' 失败。在默认模型中未找到该模型。",
|
|
191
|
+
"models_added": "成功添加/更新模型 '{{name}}'。",
|
|
192
|
+
"models_add_failed": "添加模型 '{{name}}' 失败。在默认模型中未找到该模型。",
|
|
154
193
|
"models_add_usage": "用法: /models /add <name> <api_key> 或\n/models /add <name> <model_type> <model_name> <base_url> <api_key_path> [description]",
|
|
155
194
|
"models_add_model_params": "请提供 key=value 格式的参数",
|
|
156
195
|
"models_add_model_name_required": "缺少必需的 'name' 参数",
|
|
157
|
-
"models_add_model_exists": "模型 '{name}' 已存在。",
|
|
158
|
-
"models_add_model_success": "成功添加自定义模型: {name}",
|
|
159
|
-
"models_add_model_remove": "找不到模型 '{name}'。",
|
|
160
|
-
"models_add_model_removed": "已移除模型: {name}",
|
|
161
|
-
"models_unknown_subcmd": "未知的子命令: {subcmd}",
|
|
196
|
+
"models_add_model_exists": "模型 '{{name}}' 已存在。",
|
|
197
|
+
"models_add_model_success": "成功添加自定义模型: {{name}}",
|
|
198
|
+
"models_add_model_remove": "找不到模型 '{{name}}'。",
|
|
199
|
+
"models_add_model_removed": "已移除模型: {{name}}",
|
|
200
|
+
"models_unknown_subcmd": "未知的子命令: {{subcmd}}",
|
|
162
201
|
"models_title": "所有模型 (内置 + models.json)",
|
|
163
202
|
"models_no_models": "未找到任何模型。",
|
|
164
|
-
"models_lite_only": "/models 命令仅在 lite 模式下可用"
|
|
203
|
+
"models_lite_only": "/models 命令仅在 lite 模式下可用",
|
|
204
|
+
"models_api_key_exists": "API密钥文件存在: {{path}}",
|
|
205
|
+
"config_invalid_format": "错误:配置格式无效。请使用 'key:value' 或 '/drop key'。",
|
|
206
|
+
"config_value_empty": "错误:值不能为空。请使用 'key:value'。",
|
|
207
|
+
"config_set_success": "已设置 {{key}} 为 {{value}}",
|
|
208
|
+
"config_delete_success": "已删除配置:{{key}}",
|
|
209
|
+
"config_not_found": "未找到配置:{{key}}",
|
|
210
|
+
"add_files_matched": "所有指定的文件都已在当前会话中或未找到匹配项。",
|
|
211
|
+
"add_files_added_files": "已添加的文件",
|
|
212
|
+
"add_files_no_args": "请为 /add_files 命令提供参数。",
|
|
213
|
+
"remove_files_all": "已移除所有文件。",
|
|
214
|
+
"remove_files_removed": "已移除的文件",
|
|
215
|
+
"remove_files_none": "没有文件被移除。",
|
|
216
|
+
"files_removed": "移除的文件"
|
|
165
217
|
}
|
|
166
218
|
}
|
|
167
219
|
|
autocoder/common/__init__.py
CHANGED