Commit Graph

10 Commits

Author SHA1 Message Date
401cc129b5 feat(chat): 为图片附件添加类型标识以支持多类型附件
在图片消息的接口类型中显式添加 `type: 'image'` 属性,为后续支持多种附件类型(如视频、文件等)做好类型基础。
2026-05-08 03:16:48 +08:00
5087d77f23 fix(chat): 修复重连后对话状态丢失导致消息发送失败的问题
在 WebSocket 重连场景下,服务端可能丢失 `conversationId` 状态,导致后续消息发送被拒绝。通过在客户端消息中携带 `conversationId`,并在服务端添加 fallback 恢复逻辑,确保重连后仍能正常发送消息。

同时优化了 `pendingMessage` 类型定义,支持存储待发送的图片附件,修复了延迟发送场景下图片丢失的问题。
2026-05-08 03:15:21 +08:00
7440ade66d feat(assets): 优化资产预览性能并添加资源管理器连接状态提示
- 使用缩略图替代原图展示,通过 sharp 库生成缓存缩略图
- 优化资产分组逻辑,避免不必要的重计算
- 添加 WebSocket 连接状态提示到输入框
- 使用 `useCallback` 和 `useRef` 优化组件渲染性能
- 添加 AbortController 支持请求取消,防止内存泄漏
- 添加 `disconnected` 事件处理,自动重置会话状态
2026-05-08 02:47:23 +08:00
a92379e20e feat(ui): 替换原生select为shadcn/ui组件并支持图片消息发送
- 将 AccountBasicTab 和 ConfigForm 中的原生 select 替换为 shadcn/ui Select 组件
- ChatInput 支持拖放上传图片附件
- 添加 attachment button 并整合图片附件到消息发送
- 优化 Select 组件样式,增加过渡动画和悬停效果
- 调整 ConfigForm tab 切换样式为按钮风格
- AssetGallery 使用 useAccounts hook 获取账户列表
- 重新构建前端静态资源
2026-05-08 02:29:07 +08:00
0fb33b9f57 feat(web): 重构组件样式并添加确认对话框组件
- 优化组件视觉风格: 使用渐变色、阴影和圆角增强现代感
- 添加 ConfirmDialog 组件和 useConfirm hook 用于确认操作
- 改进聊天界面: 添加滚动到底部按钮、斜杠命令自动弹出
- 统一组件间距和颜色方案,提升 UI 一致性
2026-05-08 00:41:09 +08:00
5104bbc18a feat(web): modernize chat UI, fix account navigation
- Chat: avatars, cleaner bubbles, improved spacing, typing dots
- Input: rounded design, auto-expand textarea, arrow button, slash commands
- Account list: fix navigation with useParams reactivity
- Bot/User role labels in messages

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 04:14:16 +08:00
e850613972 feat(web): add markdown syntax highlighting, slash commands, stop button, quote/reply
- PromptEditor with Prism.js syntax highlighting
- Slash commands (/run, /status, /images, /list, /help) in chat input
- Stop button to cancel ongoing generation
- Quote/reply and regenerate/continue actions in chat
- MiddlePanel with conversation timestamps and preview
- Pipeline progress in chat view
- Fix all remaining dark theme classes

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 04:09:00 +08:00
348cc0c5b9 refactor(web): router-based navigation, light theme, form config
- Replace Zustand activeView with React Router (NavLink + Routes)
- White/light modern theme with indigo accents
- Sidebar with Chinese labels under icons
- ConfigForm with individual form fields (no JSON textareas)
- Account switching with context injection into chat
- Fix duplicate conversation creation with useRef guard
- Asset gallery: smaller 6-column grid with date labels
- All components updated to light color scheme

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 03:48:14 +08:00
001dbde9f4 feat(web): integrate Claude LLM streaming with markdown rendering
- Add Anthropic SDK with DeepSeek-compatible API config
- Streaming tool-use loop in WebSocket chat handler
- GitHub-style markdown rendering with markdown-it
- Tool status indicators and thinking states in chat UI
- Fix Tailwind content path and CSS border utility

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 03:22:15 +08:00
6e3f5d9415 feat(web): add chat UI with WebSocket streaming and conversation persistence
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 02:41:01 +08:00