@baimingtao/lbs-agent 1.3.0 → 1.5.0
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.
- package/bin/lbs.js +44 -31
- package/interfaces/cli/_impl/cli_theme.py +179 -146
- package/interfaces/cli/_impl/commands/chat_repl.py +83 -92
- package/interfaces/cli/_impl/commands/run_agent.py +20 -13
- package/interfaces/cli/_impl/commands/setup.py +20 -20
- package/package.json +1 -1
- package/runtime/orchestration/display.py +86 -62
- package/runtime/orchestration/loop/main_loop.py +25 -16
- package/scripts/init.js +31 -31
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
"""LBS Agent REPL
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
- 用户进入交互循环,每次输入一行
|
|
5
|
-
- 内建命令以 `/` 开头(/help, /exit, /model, /agent, /session, /status, /clear, /new)
|
|
6
|
-
- 其他输入走 Orchestrator.run_agent_sync()
|
|
7
|
-
- 每次 turn 自动保存到 session(持久化)
|
|
8
|
-
|
|
9
|
-
用法:
|
|
10
|
-
lbs chat # 默认 agent
|
|
11
|
-
lbs chat --agent code
|
|
12
|
-
lbs chat --agent code --provider minmax --model MiniMax-M3
|
|
13
|
-
lbs chat --session <id> # 恢复已有 session
|
|
14
|
-
lbs chat --query "single query" # 非交互(等价于 lbs run)
|
|
1
|
+
"""LBS Agent REPL — Aurora Terminal v2。
|
|
2
|
+
|
|
3
|
+
极简留白,符号驱动,渐变品牌。
|
|
15
4
|
"""
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
@@ -24,21 +13,21 @@ from application.container import AgentSystemContainer
|
|
|
24
13
|
from config.config import AppConfig
|
|
25
14
|
from interfaces.cli._impl.commands.common import project_root
|
|
26
15
|
from interfaces.cli._impl.cli_theme import (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
C, p, dim, faint, pink, purple, mint, ok, err,
|
|
17
|
+
gradient_text, header, session_card, separator,
|
|
18
|
+
prompt_symbol, footer, usage_line, result_text,
|
|
19
|
+
error_text, agent_tag, model_tag, react_header,
|
|
20
|
+
react_iter, thinking_block, tool_card, timeline_item,
|
|
31
21
|
)
|
|
32
22
|
|
|
33
23
|
|
|
34
24
|
@dataclass
|
|
35
25
|
class ChatState:
|
|
36
|
-
"""REPL 运行时状态。"""
|
|
37
26
|
container: object = None
|
|
38
27
|
orchestrator: object = None
|
|
39
28
|
session_service: object = None
|
|
40
29
|
session_id: str = ""
|
|
41
|
-
agent_name: str = "
|
|
30
|
+
agent_name: str = "chat"
|
|
42
31
|
provider_name: str = ""
|
|
43
32
|
model_name: str = ""
|
|
44
33
|
turn_count: int = 0
|
|
@@ -46,11 +35,9 @@ class ChatState:
|
|
|
46
35
|
|
|
47
36
|
|
|
48
37
|
def _resolve_agent(config: AppConfig) -> str:
|
|
49
|
-
"""选默认 agent:chat 优先(REPL 专用),其次 main/第一个。"""
|
|
50
38
|
names = list(config.agents.agents.keys()) if config.agents else []
|
|
51
39
|
if not names:
|
|
52
40
|
raise RuntimeError("没有配置任何 agent")
|
|
53
|
-
# chat 是 REPL 专用(无 evidence 强制,纯对话)
|
|
54
41
|
if "chat" in names:
|
|
55
42
|
return "chat"
|
|
56
43
|
if "main" in names:
|
|
@@ -59,38 +46,47 @@ def _resolve_agent(config: AppConfig) -> str:
|
|
|
59
46
|
|
|
60
47
|
|
|
61
48
|
def _print_banner(state: ChatState) -> None:
|
|
62
|
-
"""启动
|
|
49
|
+
"""启动 — 极简留白"""
|
|
63
50
|
print()
|
|
64
|
-
print(
|
|
65
|
-
|
|
66
|
-
|
|
51
|
+
print(header())
|
|
52
|
+
|
|
53
|
+
rows = [
|
|
54
|
+
("session", faint(state.session_id) if state.session_id else faint("(unsaved)")),
|
|
55
|
+
("agent", agent_tag(state.agent_name)),
|
|
56
|
+
("model", model_tag(state.model_name) if state.model_name else faint("(default)")),
|
|
57
|
+
("provider", purple(state.provider_name) if state.provider_name else faint("(default)")),
|
|
58
|
+
("turns", faint(str(state.turn_count))),
|
|
59
|
+
]
|
|
60
|
+
print(session_card(rows))
|
|
67
61
|
print()
|
|
68
|
-
print(
|
|
62
|
+
print(separator())
|
|
63
|
+
print(f" {faint('Ask anything...')}")
|
|
64
|
+
print(separator())
|
|
69
65
|
print()
|
|
70
66
|
|
|
71
67
|
|
|
72
68
|
def _print_turn_header(state: ChatState) -> None:
|
|
73
|
-
"""
|
|
69
|
+
"""输入提示符 — 只有 ❯"""
|
|
74
70
|
print()
|
|
75
|
-
print(
|
|
71
|
+
print(f" {prompt_symbol()} ", end="", flush=True)
|
|
76
72
|
|
|
77
73
|
|
|
78
74
|
def _print_help() -> None:
|
|
79
75
|
print()
|
|
80
|
-
print(f" {
|
|
76
|
+
print(f" {gradient_text('Commands')}")
|
|
81
77
|
print()
|
|
82
78
|
cmds = [
|
|
83
|
-
("/help", "
|
|
84
|
-
("/exit", "退出
|
|
85
|
-
("/new", "
|
|
86
|
-
("/status", "
|
|
87
|
-
("/agent", "
|
|
88
|
-
("/model", "
|
|
89
|
-
("/history", "
|
|
79
|
+
("/help", "显示帮助"),
|
|
80
|
+
("/exit", "退出"),
|
|
81
|
+
("/new", "新 session"),
|
|
82
|
+
("/status", "状态"),
|
|
83
|
+
("/agent", "切换 agent"),
|
|
84
|
+
("/model", "切换 model"),
|
|
85
|
+
("/history", "历史"),
|
|
90
86
|
("/clear", "清屏"),
|
|
91
87
|
]
|
|
92
88
|
for cmd, desc in cmds:
|
|
93
|
-
print(f" {
|
|
89
|
+
print(f" {pink(cmd.ljust(12))} {faint(desc)}")
|
|
94
90
|
print()
|
|
95
91
|
|
|
96
92
|
|
|
@@ -98,11 +94,8 @@ def _cmd_list_agents(state: ChatState) -> None:
|
|
|
98
94
|
agents = state.container.config.agents.agents
|
|
99
95
|
print()
|
|
100
96
|
for name, a in agents.items():
|
|
101
|
-
if name == state.agent_name
|
|
102
|
-
|
|
103
|
-
else:
|
|
104
|
-
marker = ""
|
|
105
|
-
print(f" {agent_badge(name)} {dim(a.display_name)}{marker}")
|
|
97
|
+
current = f" {ok('← current')}" if name == state.agent_name else ""
|
|
98
|
+
print(f" {agent_tag(name)} {faint(a.display_name)}{current}")
|
|
106
99
|
print()
|
|
107
100
|
|
|
108
101
|
|
|
@@ -110,20 +103,21 @@ def _cmd_list_models(state: ChatState) -> None:
|
|
|
110
103
|
config = state.container.config
|
|
111
104
|
provider_name = state.provider_name or config.models.default_provider
|
|
112
105
|
if provider_name not in config.models.providers:
|
|
113
|
-
|
|
106
|
+
msg = f"无 provider '{provider_name}'"
|
|
107
|
+
print(f" {error_text(msg)}")
|
|
114
108
|
return
|
|
115
|
-
|
|
109
|
+
prov = config.models.providers[provider_name]
|
|
116
110
|
print()
|
|
117
|
-
print(f" {
|
|
118
|
-
for m in
|
|
119
|
-
marker = f"
|
|
120
|
-
print(f" {
|
|
111
|
+
print(f" {faint('provider')} {purple(provider_name)}")
|
|
112
|
+
for m in prov.models:
|
|
113
|
+
marker = f" {ok('←')}" if m == state.model_name else ""
|
|
114
|
+
print(f" {model_tag(m)}{marker}")
|
|
121
115
|
print()
|
|
122
116
|
|
|
123
117
|
|
|
124
118
|
def _cmd_history(state: ChatState, n: int = 5) -> None:
|
|
125
119
|
if not state.session_id:
|
|
126
|
-
print(f" {
|
|
120
|
+
print(f" {faint('无 session')}")
|
|
127
121
|
return
|
|
128
122
|
try:
|
|
129
123
|
messages = list(state.session_service.session_store.load_session_messages(state.session_id))
|
|
@@ -134,33 +128,31 @@ def _cmd_history(state: ChatState, n: int = 5) -> None:
|
|
|
134
128
|
if role in ("user", "assistant"):
|
|
135
129
|
recent.append((role, content))
|
|
136
130
|
print()
|
|
137
|
-
print(f" {dim(f'最近 {len(recent)} 条消息')}")
|
|
138
131
|
for role, content in recent:
|
|
139
|
-
|
|
140
|
-
print(f" {
|
|
132
|
+
rc = C.PINK if role == "user" else C.MINT_D
|
|
133
|
+
print(f" {p(role.ljust(9), rc)} {faint(content)}")
|
|
141
134
|
print()
|
|
142
135
|
except Exception as e:
|
|
143
|
-
|
|
136
|
+
msg = f"读取失败: {e}"
|
|
137
|
+
print(f" {error_text(msg)}")
|
|
144
138
|
|
|
145
139
|
|
|
146
140
|
def _cmd_status(state: ChatState) -> None:
|
|
147
141
|
elapsed = int(time.time() - state.started_at)
|
|
148
142
|
rows = [
|
|
149
|
-
("session", state.session_id
|
|
150
|
-
("agent",
|
|
151
|
-
("
|
|
152
|
-
("
|
|
153
|
-
("turns",
|
|
154
|
-
("elapsed",
|
|
143
|
+
("session", faint(state.session_id) if state.session_id else faint("(unsaved)")),
|
|
144
|
+
("agent", agent_tag(state.agent_name)),
|
|
145
|
+
("model", model_tag(state.model_name) if state.model_name else faint("(default)")),
|
|
146
|
+
("provider", purple(state.provider_name) if state.provider_name else faint("(default)")),
|
|
147
|
+
("turns", faint(str(state.turn_count))),
|
|
148
|
+
("elapsed", faint(f"{elapsed}s")),
|
|
155
149
|
]
|
|
156
150
|
print()
|
|
157
|
-
|
|
158
|
-
print(kv_row(label, val))
|
|
151
|
+
print(session_card(rows))
|
|
159
152
|
print()
|
|
160
153
|
|
|
161
154
|
|
|
162
155
|
def _handle_command(state: ChatState, line: str) -> bool:
|
|
163
|
-
"""处理 / 命令。返回 True 表示继续循环,False 表示退出。"""
|
|
164
156
|
parts = line.strip().split(maxsplit=1)
|
|
165
157
|
cmd = parts[0].lower()
|
|
166
158
|
arg = parts[1] if len(parts) > 1 else ""
|
|
@@ -173,13 +165,14 @@ def _handle_command(state: ChatState, line: str) -> bool:
|
|
|
173
165
|
state.session_id = ""
|
|
174
166
|
state.turn_count = 0
|
|
175
167
|
state.started_at = time.time()
|
|
176
|
-
print(f" {
|
|
168
|
+
print(f" {ok('◇')} {faint('new session')}")
|
|
177
169
|
elif cmd == "/session":
|
|
178
170
|
if arg:
|
|
179
171
|
state.session_id = arg
|
|
180
|
-
print(f" {
|
|
172
|
+
print(f" {ok('◇')} {faint('switched to')} {pink(arg)}")
|
|
181
173
|
else:
|
|
182
|
-
|
|
174
|
+
sid = state.session_id or "(none)"
|
|
175
|
+
print(f" {faint('session:')} {sid}")
|
|
183
176
|
elif cmd == "/status":
|
|
184
177
|
_cmd_status(state)
|
|
185
178
|
elif cmd == "/agent":
|
|
@@ -189,15 +182,16 @@ def _handle_command(state: ChatState, line: str) -> bool:
|
|
|
189
182
|
agents = state.container.config.agents.agents
|
|
190
183
|
if arg in agents:
|
|
191
184
|
state.agent_name = arg
|
|
192
|
-
print(f" {
|
|
185
|
+
print(f" {ok('◇')} {faint('agent')} {agent_tag(arg)}")
|
|
193
186
|
else:
|
|
194
|
-
|
|
187
|
+
msg = f"无 agent '{arg}'"
|
|
188
|
+
print(f" {error_text(msg)}")
|
|
195
189
|
elif cmd == "/model":
|
|
196
190
|
if not arg:
|
|
197
191
|
_cmd_list_models(state)
|
|
198
192
|
else:
|
|
199
193
|
state.model_name = arg
|
|
200
|
-
print(f" {
|
|
194
|
+
print(f" {ok('◇')} {faint('model')} {model_tag(arg)}")
|
|
201
195
|
elif cmd == "/clear":
|
|
202
196
|
print("\033[2J\033[H", end="")
|
|
203
197
|
elif cmd == "/history":
|
|
@@ -205,16 +199,16 @@ def _handle_command(state: ChatState, line: str) -> bool:
|
|
|
205
199
|
n = int(arg) if arg else 5
|
|
206
200
|
_cmd_history(state, n)
|
|
207
201
|
except ValueError:
|
|
208
|
-
print(f" {
|
|
202
|
+
print(f" {error_text('/history [n] — n 须为整数')}")
|
|
209
203
|
elif cmd == "/save":
|
|
210
|
-
print(f" {
|
|
204
|
+
print(f" {faint('session 每次 turn 自动保存')}")
|
|
211
205
|
else:
|
|
212
|
-
print(f" {
|
|
206
|
+
print(f" {error_text(f'未知命令: {cmd}')}")
|
|
213
207
|
return True
|
|
214
208
|
|
|
215
209
|
|
|
216
210
|
def _run_turn(state: ChatState, user_input: str) -> None:
|
|
217
|
-
"""
|
|
211
|
+
"""跑一轮对话"""
|
|
218
212
|
t0 = time.time()
|
|
219
213
|
try:
|
|
220
214
|
result = state.orchestrator.run_agent_sync(
|
|
@@ -224,24 +218,23 @@ def _run_turn(state: ChatState, user_input: str) -> None:
|
|
|
224
218
|
session_id=state.session_id,
|
|
225
219
|
)
|
|
226
220
|
elapsed = time.time() - t0
|
|
227
|
-
# 显示结果
|
|
228
221
|
if result.success:
|
|
229
222
|
content = (result.content or "").strip()
|
|
230
|
-
print(f"\n{
|
|
223
|
+
print(f"\n{result_text(content)}")
|
|
231
224
|
else:
|
|
232
|
-
|
|
233
|
-
print(f"\n {
|
|
234
|
-
|
|
235
|
-
print(usage_bar(elapsed, result.iterations, result.total_tool_calls))
|
|
236
|
-
# 保存 session_id
|
|
225
|
+
e = result.error or "(无错误信息)"
|
|
226
|
+
print(f"\n {error_text(e[:300])}")
|
|
227
|
+
print(usage_line(elapsed, result.iterations, result.total_tool_calls))
|
|
237
228
|
if not state.session_id:
|
|
238
|
-
|
|
229
|
+
sid = result.session_id if hasattr(result, "session_id") and result.session_id else ""
|
|
230
|
+
state.session_id = sid or f"chat-{int(state.started_at)}"
|
|
239
231
|
except KeyboardInterrupt:
|
|
240
|
-
print(f"\n {
|
|
232
|
+
print(f"\n {p('⏸', C.WARN)} {faint('已中断')}")
|
|
241
233
|
except Exception as e:
|
|
242
234
|
elapsed = time.time() - t0
|
|
243
|
-
|
|
244
|
-
print(f" {
|
|
235
|
+
msg = f"{type(e).__name__}: {str(e)[:200]}"
|
|
236
|
+
print(f"\n {error_text(msg)}")
|
|
237
|
+
print(f" {faint(f'{elapsed:.1f}s')}")
|
|
245
238
|
|
|
246
239
|
|
|
247
240
|
def cmd_chat(
|
|
@@ -255,14 +248,12 @@ def cmd_chat(
|
|
|
255
248
|
"""进入 chat REPL 或单次 query。"""
|
|
256
249
|
container = AgentSystemContainer(config=config, project_root=project_root)
|
|
257
250
|
|
|
258
|
-
# 选 agent
|
|
259
251
|
if not agent_name:
|
|
260
252
|
agent_name = _resolve_agent(config)
|
|
261
253
|
|
|
262
|
-
# 验证 agent 存在
|
|
263
254
|
if agent_name not in config.agents.agents:
|
|
264
255
|
msg = f"Agent '{agent_name}' 不存在"
|
|
265
|
-
print(f" {
|
|
256
|
+
print(f" {error_text(msg)}")
|
|
266
257
|
return 1
|
|
267
258
|
|
|
268
259
|
state = ChatState(
|
|
@@ -275,7 +266,6 @@ def cmd_chat(
|
|
|
275
266
|
session_id=session_id,
|
|
276
267
|
)
|
|
277
268
|
|
|
278
|
-
# 单次 query 模式
|
|
279
269
|
if query:
|
|
280
270
|
state.turn_count = 1
|
|
281
271
|
_print_turn_header(state)
|
|
@@ -283,9 +273,10 @@ def cmd_chat(
|
|
|
283
273
|
_run_turn(state, query)
|
|
284
274
|
return 0
|
|
285
275
|
|
|
286
|
-
# REPL
|
|
276
|
+
# REPL
|
|
287
277
|
_print_banner(state)
|
|
288
|
-
|
|
278
|
+
print(footer())
|
|
279
|
+
print()
|
|
289
280
|
|
|
290
281
|
while True:
|
|
291
282
|
try:
|
|
@@ -295,7 +286,7 @@ def cmd_chat(
|
|
|
295
286
|
print("\n")
|
|
296
287
|
break
|
|
297
288
|
except KeyboardInterrupt:
|
|
298
|
-
print(f"\n {
|
|
289
|
+
print(f"\n {p('用 /exit 退出', C.WARN)}")
|
|
299
290
|
continue
|
|
300
291
|
|
|
301
292
|
line = line.strip()
|
|
@@ -308,5 +299,5 @@ def cmd_chat(
|
|
|
308
299
|
state.turn_count += 1
|
|
309
300
|
_run_turn(state, line)
|
|
310
301
|
|
|
311
|
-
print(f"\n {
|
|
302
|
+
print(f"\n {ok('◇')} {faint('Session saved. Bye.')}")
|
|
312
303
|
return 0
|
|
@@ -78,25 +78,32 @@ def cmd_run_agent(config: AppConfig, agent_name: str, task: str) -> None:
|
|
|
78
78
|
except Exception as e:
|
|
79
79
|
print(f" [WARN] session save failed: {e}")
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
print(f"
|
|
85
|
-
print(f"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
from runtime.orchestration.display import green, red, faint, pink, bold, color, Colors
|
|
82
|
+
sep = color("─" * 52, Colors.FAINT)
|
|
83
|
+
icon = green("✓") if result.success else red("✕")
|
|
84
|
+
print(f"\n{sep}")
|
|
85
|
+
print(f" {icon} {bold(result.agent_name)}")
|
|
86
|
+
parts = [
|
|
87
|
+
faint(f"iter {result.iterations}"),
|
|
88
|
+
faint(f"tools {result.total_tool_calls}"),
|
|
89
|
+
color(f"{result.duration_seconds:.1f}s", Colors.MINT_D),
|
|
90
|
+
]
|
|
91
|
+
print(" " + faint(" · ").join(parts))
|
|
89
92
|
if result.error:
|
|
90
|
-
print(f"
|
|
91
|
-
print(
|
|
92
|
-
print(
|
|
93
|
+
print(f" {red(result.error[:200])}")
|
|
94
|
+
print(sep)
|
|
95
|
+
print()
|
|
96
|
+
if result.content:
|
|
97
|
+
print(result.content)
|
|
98
|
+
else:
|
|
99
|
+
print(faint("(无输出)"))
|
|
93
100
|
print()
|
|
94
101
|
|
|
95
102
|
if result.steps:
|
|
96
|
-
print(f"
|
|
103
|
+
print(f" {faint('trace')}")
|
|
97
104
|
for step in result.steps:
|
|
98
105
|
tools = ", ".join(t.name for t in step.tool_execs) if step.tool_execs else "-"
|
|
99
|
-
print(f"
|
|
106
|
+
print(f" {faint(f'{step.iteration:02d}')} {pink('·')} {faint(tools)}")
|
|
100
107
|
print()
|
|
101
108
|
finally:
|
|
102
109
|
container.shutdown()
|
|
@@ -73,10 +73,10 @@ def _paint(text: str, *codes: str) -> str:
|
|
|
73
73
|
def _header(title: str) -> None:
|
|
74
74
|
"""打印章节标题 (带边框)。"""
|
|
75
75
|
print()
|
|
76
|
-
print(_paint(" ┌─────────────────────────────────────────────────────────┐", _C.
|
|
77
|
-
print(_paint(" │ ", _C.
|
|
78
|
-
+ _paint(" " * max(0, 47 - len(title) - 14) + "│", _C.
|
|
79
|
-
print(_paint(" └─────────────────────────────────────────────────────────┘", _C.
|
|
76
|
+
print(_paint(" ┌─────────────────────────────────────────────────────────┐", _C.PINK))
|
|
77
|
+
print(_paint(" │ ", _C.PINK) + _paint(f"⚙ LBS Setup — {title}", _C.BOLD, _C.PINK)
|
|
78
|
+
+ _paint(" " * max(0, 47 - len(title) - 14) + "│", _C.PINK))
|
|
79
|
+
print(_paint(" └─────────────────────────────────────────────────────────┘", _C.PINK))
|
|
80
80
|
print()
|
|
81
81
|
|
|
82
82
|
|
|
@@ -85,7 +85,7 @@ def _info(msg: str) -> None:
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
def _success(msg: str) -> None:
|
|
88
|
-
print(_paint(" ✓ ", _C.
|
|
88
|
+
print(_paint(" ✓ ", _C.OK) + _paint(msg, _C.OK))
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
def _warn(msg: str) -> None:
|
|
@@ -93,7 +93,7 @@ def _warn(msg: str) -> None:
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
def _error(msg: str) -> None:
|
|
96
|
-
print(_paint(" ✖ ", _C.
|
|
96
|
+
print(_paint(" ✖ ", _C.ERR) + _paint(msg, _C.ERR))
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
def _prompt(label: str, default: str = "") -> str:
|
|
@@ -111,7 +111,7 @@ def _prompt_choice(label: str, options: list[str], default: str = "") -> str:
|
|
|
111
111
|
"""带选项列表的输入提示。"""
|
|
112
112
|
print(_paint(f" ▸ {label}", _C.MINT))
|
|
113
113
|
for i, opt in enumerate(options, 1):
|
|
114
|
-
marker = _paint("→", _C.
|
|
114
|
+
marker = _paint("→", _C.OK) if opt == default else " "
|
|
115
115
|
print(f" {marker} {i}. {opt}")
|
|
116
116
|
val = _prompt("选择编号或直接输入", default)
|
|
117
117
|
if val.isdigit():
|
|
@@ -467,10 +467,10 @@ def run_setup(section: str | None = None) -> int:
|
|
|
467
467
|
root.mkdir(parents=True, exist_ok=True)
|
|
468
468
|
|
|
469
469
|
print()
|
|
470
|
-
print(_paint(" ┌─────────────────────────────────────────────────────────┐", _C.
|
|
471
|
-
print(_paint(" │ ", _C.
|
|
472
|
-
+ _paint(" │", _C.
|
|
473
|
-
print(_paint(" └─────────────────────────────────────────────────────────┘", _C.
|
|
470
|
+
print(_paint(" ┌─────────────────────────────────────────────────────────┐", _C.PINK))
|
|
471
|
+
print(_paint(" │ ", _C.PINK) + _paint("⚙ LBS Agent Setup Wizard", _C.BOLD, _C.PINK)
|
|
472
|
+
+ _paint(" │", _C.PINK))
|
|
473
|
+
print(_paint(" └─────────────────────────────────────────────────────────┘", _C.PINK))
|
|
474
474
|
print()
|
|
475
475
|
_info(f"配置目录: {root}")
|
|
476
476
|
print()
|
|
@@ -496,15 +496,15 @@ def run_setup(section: str | None = None) -> int:
|
|
|
496
496
|
|
|
497
497
|
def _print_done() -> None:
|
|
498
498
|
print()
|
|
499
|
-
print(_paint(" ┌─────────────────────────────────────────────────────────┐", _C.
|
|
500
|
-
print(_paint(" │ ", _C.
|
|
501
|
-
+ _paint(" │", _C.
|
|
502
|
-
print(_paint(" │ │", _C.
|
|
503
|
-
print(_paint(" │ ", _C.
|
|
504
|
-
print(_paint(" │ ", _C.
|
|
505
|
-
print(_paint(" │ │", _C.
|
|
506
|
-
print(_paint(" │ ", _C.
|
|
507
|
-
print(_paint(" └─────────────────────────────────────────────────────────┘", _C.
|
|
499
|
+
print(_paint(" ┌─────────────────────────────────────────────────────────┐", _C.OK))
|
|
500
|
+
print(_paint(" │ ", _C.OK) + _paint("✅ 配置完成!", _C.BOLD, _C.OK)
|
|
501
|
+
+ _paint(" │", _C.OK))
|
|
502
|
+
print(_paint(" │ │", _C.OK))
|
|
503
|
+
print(_paint(" │ ", _C.OK) + _paint("配置文件:", _C.BOLD) + paint_path(_models_yaml_path()) + _paint(" │", _C.OK))
|
|
504
|
+
print(_paint(" │ ", _C.OK) + _paint("密钥文件:", _C.BOLD) + paint_path(_env_path()) + _paint(" │", _C.OK))
|
|
505
|
+
print(_paint(" │ │", _C.OK))
|
|
506
|
+
print(_paint(" │ ", _C.OK) + _paint("现在可以运行:", _C.BOLD) + paint_cmd(" lbs status") + _paint(" │", _C.OK))
|
|
507
|
+
print(_paint(" └─────────────────────────────────────────────────────────┘", _C.OK))
|
|
508
508
|
print()
|
|
509
509
|
|
|
510
510
|
|