fix: 修复TUI界面多个问题,添加记忆模块模式选择功能

- 修复ToolResult对象的get方法错误
- 修复TUI版本号显示错误(v5.4.1 -> v6.0)
- 修复Shift+Enter换行功能
- 修复AI回复颜色显示问题
- 添加记忆模块模式选择功能(陪伴模式/工作模式)
- 清理项目文件,准备上传到Gitee
This commit is contained in:
shuiyu1123 committed 2026-06-26 22:26:13 +08:00
1 parent 329854866b
commit b5f638cffc
6 files changed
+153 -76

No files matched your search

+7 -2
View File
@@ -105,6 +105,9 @@ class ToolMixin:
result = self.liugin_manager.execute(tool_name, args, **arguments)
else:
result = self.liugin_manager.execute(tool_name, args)
# 将 ToolResult 对象转换为字典格式,兼容旧接口
if hasattr(result, 'to_dict'):
return result.to_dict()
return result
# 回退:直接调用 handler(旧逻辑)
@@ -212,8 +215,10 @@ class ToolMixin:
else:
tool_args_display = tool_args
# TUI 模式下不做延迟和 ESC 检测
if not self.tui_output_callback:
# TUI 模式下显示工具执行状态
if self.tui_output_callback:
self._output(f" 正在执行工具: {tool_name} {tool_args_display}")
else:
try:
import msvcrt
canceled = False