3 Commits
Author SHA1 Message Date
xiaoli-cli-bot 03685ab5e7 fix: WebUI engine switch now updates UI and shows errors 2026-04-29 19:57:17 +08:00
xiaoli-cli-bot 7a72a5c69e fix: Ollama model validation, TUI CSS, WebUI overhaul
1. Ollama: validate model is configured before API call, show helpful error
2. TUI: remove unsupported scroll-behavior CSS property
3. WebUI server: add full tool calling loop (FC + JSON action)
4. WebUI HTML: complete redesign
   - Modern dark theme with better typography
   - Markdown rendering via marked.js
   - Tool call/result visualization with colored cards
   - Dynamic sidebar (engines + tools from server)
   - Better input area with gradient send button
   - Responsive layout
2026-04-29 19:51:42 +08:00
XiaoLi Contributor 614b081364 feat(webui): 重写 Web UI — WebSocket 后端 + 大厂设计感
- 新增 webui_server.py: WebSocket 后端,桥接小狸 AI 引擎
  - WebSocket 实时通信(对话/工具调用/状态同步)
  - HTTP 静态文件服务
  - 引擎热切换、安全模式切换
  - 延迟初始化,不阻塞启动

- 重写 webui.html: 纯静态前端,连接 WebSocket 后端
  - 设计风格: Linear/Vercel 级别的暗色主题
  - 真实 WebSocket 通信(非前端模拟)
  - 对话/工具双视图
  - 实时状态栏(引擎/安全模式)
  - 代码高亮、打字动画、快速操作
  - 响应式布局

用法:
  python webui_server.py              # 启动 (HTTP:8080, WS:8079)
  python webui_server.py --port 3000  # 自定义端口
  python webui_server.py --no-ai      # 纯 UI 模式
2026-04-28 19:06:12 +08:00