release: v3.6.0-release 发行版
- 默认 TUI 模式,--cli 切换命令行 - TUI 不可用时自动降级到 CLI - 新增 CHANGELOG.md - 更新版本号和 about.txt 本次更新由 mimo 自动化执行,与开发者无关。
This commit is contained in:
1 parent
a437a2f1dd
commit
bfedee5616
5 files changed
+56
-5
No files matched your search
+1
-1
@@ -1,3 +1,3 @@
|
||||
"""小狸 Pro-CLI - 智能编程助手"""
|
||||
__version__ = "3.6.0"
|
||||
__version__ = "3.6.0-release"
|
||||
__author__ = "shuiyu1123"
|
||||
@@ -26,6 +26,16 @@ def main():
|
||||
# 启动动画
|
||||
_show_art()
|
||||
|
||||
# 检查 Textual 可用性
|
||||
if not args.cli:
|
||||
try:
|
||||
from textual.app import App
|
||||
except ImportError:
|
||||
if not args.cli:
|
||||
print("⚠️ Textual 未安装,自动切换到命令行模式")
|
||||
print(" 安装 TUI: pip install textual")
|
||||
args.cli = True
|
||||
|
||||
from xiaoli.app import App
|
||||
app = App()
|
||||
|
||||
|
||||
+11
-1
@@ -303,12 +303,22 @@ class App:
|
||||
print()
|
||||
|
||||
def _run_tui(self):
|
||||
"""启动 TUI 模式,不可用时降级到 CLI"""
|
||||
try:
|
||||
from textual.app import App
|
||||
from ai_cli import TUIMainApp
|
||||
self.display.info("正在启动 TUI 模式...")
|
||||
app = TUIMainApp(self)
|
||||
app.run()
|
||||
except ImportError:
|
||||
self.display.warn("Textual 未安装,TUI 不可用")
|
||||
self.display.info("安装命令: pip install textual")
|
||||
self.display.info("已切换到命令行模式")
|
||||
self.run()
|
||||
except Exception as e:
|
||||
self.err(f"TUI 不可用: {e}")
|
||||
self.err(f"TUI 启动失败: {e}")
|
||||
self.display.info("已切换到命令行模式")
|
||||
self.run()
|
||||
|
||||
def _remote_cmd(self, args: str):
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user