Commit Graph

2 Commits

Author SHA1 Message Date
Haze
7fded9bf8d refactor(chat): remove instruction text from ChatInput component
- Removed the instruction text for sending messages (Enter to send, Shift+Enter for new line) from the ChatInput component to streamline the UI.
2026-02-06 04:59:40 +08:00
Haze
3468d1bdf4 feat(chat): native React chat page with session selector and streaming
Replace the iframe-based Control UI embed with a native React
implementation that communicates directly with the Gateway via
gateway:rpc IPC calls and chat event streaming.

New components:
- ChatToolbar: session selector dropdown, refresh button, thinking toggle
- ChatMessage: message bubbles with markdown (react-markdown + GFM),
  collapsible thinking blocks, tool use cards, image attachments
- ChatInput: textarea with Enter to send, Shift+Enter for new line
- message-utils: extractText/extractThinking/extractImages/extractToolUse
  ported from OpenClaw's message-extract.ts

Rewritten chat store with:
- Session management (sessions.list, switchSession)
- Proper chat.history loading with raw message preservation
- chat.send with idempotencyKey and run tracking
- Streaming via handleChatEvent (delta/final/error/aborted)
- Thinking toggle (show/hide reasoning blocks)
2026-02-06 04:49:01 +08:00