chore: 移除所有 emoji 及对标文案
- 删除全部文件中的 emoji 字符(29 个文件) - 移除 tui.py 中「对标 Claude Code」表述 - 保持代码缩进和格式不变
This commit is contained in:
1 parent
40ab129ba2
commit
29df2a4ac1
29 files changed
+365
-365
No files matched your search
@@ -853,8 +853,8 @@ multi 操作支持一次修改多处:
|
||||
# 无参数:循环切换
|
||||
safety.cycle_mode()
|
||||
mode_name = safety.get_mode_name()
|
||||
icons = {"无限制": "🔴", "普通": "🟢", "人工确认": "🟡"}
|
||||
icon = icons.get(mode_name, "⚪")
|
||||
icons = {"无限制": "", "普通": "", "人工确认": ""}
|
||||
icon = icons.get(mode_name, "")
|
||||
print(f"{icon} 安全模式: {mode_name}")
|
||||
continue
|
||||
|
||||
@@ -880,7 +880,7 @@ multi 操作支持一次修改多处:
|
||||
response_lines = processed_response.split('\n')
|
||||
for i, line in enumerate(response_lines):
|
||||
if i == 0:
|
||||
line = "✦ " + line
|
||||
line = " " + line
|
||||
if i == len(response_lines) - 1:
|
||||
print(f"{line} {user_id_display}")
|
||||
else:
|
||||
|
||||
@@ -56,7 +56,7 @@ class DisplayMixin:
|
||||
else:
|
||||
for i, line in enumerate(response_lines):
|
||||
if i == 0:
|
||||
prefix = f"{Fore.YELLOW}✦{Style.RESET_ALL} " if is_continue else "✦ "
|
||||
prefix = f"{Fore.YELLOW}{Style.RESET_ALL} " if is_continue else " "
|
||||
line = prefix + line
|
||||
if i == len(response_lines) - 1:
|
||||
print(f"{line} {user_id_display}")
|
||||
@@ -207,7 +207,7 @@ class DisplayMixin:
|
||||
|
||||
print(''.join(line))
|
||||
|
||||
print(f"{Fore.GREEN}✓ 已使用色块显示 ({new_width}x{new_height} 像素){Style.RESET_ALL}\n")
|
||||
print(f"{Fore.GREEN} 已使用色块显示 ({new_width}x{new_height} 像素){Style.RESET_ALL}\n")
|
||||
return True
|
||||
|
||||
except ImportError:
|
||||
@@ -223,7 +223,7 @@ class DisplayMixin:
|
||||
subprocess.run(['open', image_path])
|
||||
else:
|
||||
subprocess.run(['xdg-open', image_path])
|
||||
print(f"{Fore.GREEN}✓ 已在系统默认图片查看器中打开{Style.RESET_ALL}\n")
|
||||
print(f"{Fore.GREEN} 已在系统默认图片查看器中打开{Style.RESET_ALL}\n")
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
|
||||
@@ -98,7 +98,7 @@ class ToolMixin:
|
||||
safety = get_safety()
|
||||
allowed, msg = safety.check(tool_name, str(args))
|
||||
if not allowed:
|
||||
return {"result": f"🚫 已取消: {msg}"}
|
||||
return {"result": f" 已取消: {msg}"}
|
||||
|
||||
if UNIFIED_TOOL_MANAGER_AVAILABLE and hasattr(self.liugin_manager, 'execute'):
|
||||
if arguments and isinstance(arguments, dict):
|
||||
|
||||
+1
-1
@@ -263,7 +263,7 @@ class SafetyLayer:
|
||||
|
||||
print()
|
||||
print(f" {Fore.RED}{'═' * 50}{Style.RESET_ALL}")
|
||||
print(f" {Fore.RED}⚠️ 安全检查{Style.RESET_ALL}")
|
||||
print(f" {Fore.RED} 安全检查{Style.RESET_ALL}")
|
||||
print(f" {Fore.RED}{'═' * 50}{Style.RESET_ALL}")
|
||||
print(f" {Fore.CYAN}工具:{Style.RESET_ALL} {tool_name}")
|
||||
print(f" {Fore.CYAN}指令:{Style.RESET_ALL} {display_args}")
|
||||
|
||||
+24
-24
@@ -129,7 +129,7 @@ if TEXTUAL_AVAILABLE:
|
||||
class XiaoliTUI(App):
|
||||
"""小狸 TUI v2 - GitHub 暗色主题"""
|
||||
CSS = _TUI_CSS
|
||||
TITLE = "🐱 小狸 Pro-CLI"
|
||||
TITLE = " 小狸 Pro-CLI"
|
||||
SUB_TITLE = "智能编程助手"
|
||||
|
||||
BINDINGS = [
|
||||
@@ -163,13 +163,13 @@ if TEXTUAL_AVAILABLE:
|
||||
id="input-hint"
|
||||
)
|
||||
with Vertical(id="sidebar"):
|
||||
yield Static("⚙️ 引擎", classes="sidebar-header")
|
||||
yield Static(" 引擎", classes="sidebar-header")
|
||||
yield Vertical(id="engine-list", classes="sidebar-section")
|
||||
yield Rule(line_style="heavy")
|
||||
yield Static("🔧 工具", classes="sidebar-header")
|
||||
yield Static(" 工具", classes="sidebar-header")
|
||||
yield Vertical(id="tool-list", classes="sidebar-section")
|
||||
yield Rule(line_style="heavy")
|
||||
yield Static("📊 状态", classes="sidebar-header")
|
||||
yield Static(" 状态", classes="sidebar-header")
|
||||
yield Vertical(id="status-info", classes="sidebar-section")
|
||||
yield Static(" 就绪 | Ctrl+C 退出", id="status-bar")
|
||||
|
||||
@@ -184,14 +184,14 @@ if TEXTUAL_AVAILABLE:
|
||||
("", "msg-dim"),
|
||||
(" ╔══════════════════════════════════════════════╗", "msg-welcome"),
|
||||
(" ║ ║", "msg-welcome"),
|
||||
(" ║ 🐱 小狸 Pro-CLI v5.1 ║", "msg-welcome"),
|
||||
(" ║ 智能编程助手 · 对标 Claude Code ║", "msg-welcome"),
|
||||
(" ║ 小狸 Pro-CLI v5.1 ║", "msg-welcome"),
|
||||
(" ║ 智能编程助手 ║", "msg-welcome"),
|
||||
(" ║ ║", "msg-welcome"),
|
||||
(" ╚══════════════════════════════════════════════╝", "msg-welcome"),
|
||||
("", "msg-dim"),
|
||||
(" 💡 代码编辑 · 代码搜索 · Git 集成 · 多引擎", "msg-system"),
|
||||
(" 📝 输入 /help 查看命令 | /model 切换引擎", "msg-system"),
|
||||
(f" 🔧 当前引擎: {self.bridge.current_engine()} | 工具: {len(self.bridge.tools())} 个", "msg-system"),
|
||||
(" 代码编辑 · 代码搜索 · Git 集成 · 多引擎", "msg-system"),
|
||||
(" 输入 /help 查看命令 | /model 切换引擎", "msg-system"),
|
||||
(f" 当前引擎: {self.bridge.current_engine()} | 工具: {len(self.bridge.tools())} 个", "msg-system"),
|
||||
("", "msg-dim"),
|
||||
]
|
||||
for text, cls in lines:
|
||||
@@ -233,13 +233,13 @@ if TEXTUAL_AVAILABLE:
|
||||
self._append(Static(text, classes=cls))
|
||||
|
||||
def _user_msg(self, text):
|
||||
self._add(f" 👤 {text}", "msg-user")
|
||||
self._add(f" {text}", "msg-user")
|
||||
|
||||
def _ai_msg(self, text):
|
||||
if "```" in text:
|
||||
self._render_with_code(text)
|
||||
else:
|
||||
self._add(f" ✦ {text}", "msg-ai")
|
||||
self._add(f" {text}", "msg-ai")
|
||||
|
||||
def _render_with_code(self, text):
|
||||
parts = re.split(r'```(\w*)\n(.*?)```', text, flags=re.DOTALL)
|
||||
@@ -248,7 +248,7 @@ if TEXTUAL_AVAILABLE:
|
||||
if i % 3 == 0:
|
||||
if parts[i].strip():
|
||||
for line in parts[i].strip().split('\n'):
|
||||
self._add(f" ✦ {line}", "msg-ai")
|
||||
self._add(f" {line}", "msg-ai")
|
||||
elif i % 3 == 2:
|
||||
code = parts[i]
|
||||
lang = parts[i-1] if i > 1 else ""
|
||||
@@ -263,19 +263,19 @@ if TEXTUAL_AVAILABLE:
|
||||
i += 1
|
||||
|
||||
def _tool_ok(self, name, args):
|
||||
self._add(f" ✅ {name}: {args[:60]}", "msg-tool-ok")
|
||||
self._add(f" {name}: {args[:60]}", "msg-tool-ok")
|
||||
|
||||
def _tool_err(self, name, args):
|
||||
self._add(f" ❌ {name}: {args[:60]}", "msg-tool-err")
|
||||
self._add(f" {name}: {args[:60]}", "msg-tool-err")
|
||||
|
||||
def _thinking(self):
|
||||
self._add(" 💭 思考中...", "msg-thinking")
|
||||
self._add(" 思考中...", "msg-thinking")
|
||||
|
||||
def _system(self, text):
|
||||
self._add(f" ℹ️ {text}", "msg-system")
|
||||
self._add(f" ℹ {text}", "msg-system")
|
||||
|
||||
def _error(self, text):
|
||||
self._add(f" ⚠️ {text}", "msg-error")
|
||||
self._add(f" {text}", "msg-error")
|
||||
|
||||
@on(Input.Submitted, "#user-input")
|
||||
def on_input(self, event):
|
||||
@@ -291,7 +291,7 @@ if TEXTUAL_AVAILABLE:
|
||||
self._user_msg(text)
|
||||
self._thinking()
|
||||
self.is_generating = True
|
||||
self._update_status("🔄 思考中...")
|
||||
self._update_status(" 思考中...")
|
||||
self.run_worker(self._generate(text), exclusive=True)
|
||||
|
||||
def _handle_command(self, cmd):
|
||||
@@ -309,7 +309,7 @@ if TEXTUAL_AVAILABLE:
|
||||
'cls': lambda: self.action_clear(),
|
||||
'model': lambda: self._switch_model(args),
|
||||
'engine': lambda: self._switch_model(args),
|
||||
'about': lambda: self._system("🐱 小狸 Pro-CLI v5.1 - 智能编程助手"),
|
||||
'about': lambda: self._system(" 小狸 Pro-CLI v5.1 - 智能编程助手"),
|
||||
'status': lambda: self._show_status(),
|
||||
'tools': lambda: self._show_tools(),
|
||||
'engines': lambda: self._show_engines(),
|
||||
@@ -331,7 +331,7 @@ if TEXTUAL_AVAILABLE:
|
||||
self._error(f"未知命令: /{name},输入 /help 查看帮助")
|
||||
|
||||
def _show_help(self):
|
||||
help_text = """ 📖 命令:
|
||||
help_text = """ 命令:
|
||||
/help 帮助信息
|
||||
/quit 退出
|
||||
/cli 切换命令行模式
|
||||
@@ -341,7 +341,7 @@ if TEXTUAL_AVAILABLE:
|
||||
/status 系统状态
|
||||
/clear 清屏
|
||||
|
||||
⌨️ 快捷键:
|
||||
⌨ 快捷键:
|
||||
Ctrl+C 退出 Ctrl+L 清屏
|
||||
Ctrl+N 新对话 F1 侧栏
|
||||
Escape 取消生成"""
|
||||
@@ -425,11 +425,11 @@ if TEXTUAL_AVAILABLE:
|
||||
pass
|
||||
|
||||
def _write_raw(self, msg):
|
||||
if '✅' in msg or 'OK 工具' in msg:
|
||||
if '' in msg or 'OK 工具' in msg:
|
||||
self._add(f" {msg}", "msg-tool-ok")
|
||||
elif '❌' in msg or 'X 工具' in msg or '错误' in msg:
|
||||
elif '' in msg or 'X 工具' in msg or '错误' in msg:
|
||||
self._add(f" {msg}", "msg-tool-err")
|
||||
elif '✦' in msg:
|
||||
elif '' in msg:
|
||||
self._add(f" {msg}", "msg-ai")
|
||||
elif '工具' in msg and ('调用' in msg or '执行' in msg):
|
||||
self._add(f" {msg}", "msg-tool-ok")
|
||||
|
||||
Reference in new issue
Block a user