feat: 新增 BotOps 子模块——aibox 的 Textual TUI 前端(流式 Markdown 渲染+自动重连+任务侧栏)
This commit is contained in:
1 parent
afb55494e5
commit
f91d4166d6
14 files changed
+569
No files matched your search
@@ -0,0 +1,14 @@
|
||||
"""底部状态栏:连接状态 + 服务器地址 + 附加信息。"""
|
||||
from textual.widgets import Static
|
||||
|
||||
|
||||
class StatusBar(Static):
|
||||
def set_state(self, connected: bool, uri: str = "", extra: str = ""):
|
||||
dot = "●" if connected else "○"
|
||||
color = "green" if connected else "red"
|
||||
text = f"[{color}]{dot}[/] {'已连接' if connected else '未连接'}"
|
||||
if uri:
|
||||
text += f" {uri}"
|
||||
if extra:
|
||||
text += f" | {extra}"
|
||||
self.update(text)
|
||||
Reference in new issue
Block a user