feat(ui): add React chat interface with assistant-ui#1873
Closed
zerone0x wants to merge 1 commit intoopenclaw:mainfrom
Closed
feat(ui): add React chat interface with assistant-ui#1873zerone0x wants to merge 1 commit intoopenclaw:mainfrom
zerone0x wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Adds a new React-based chat interface using the assistant-ui library as an alternative to the existing Lit implementation. The new interface: - Uses ExternalStoreRuntime to integrate with existing GatewayBrowserClient - Converts NormalizedMessage format to ThreadMessageLike for assistant-ui - Preserves streaming with abort functionality - Maintains existing styling with CSS variables - Coexists with Lit implementation via useReactChat setting toggle The React chat mounts only in the chat tab, allowing gradual migration while preserving all existing functionality. Closes openclaw#1858 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
d6aa68d to
7518192
Compare
Member
|
Closing due to merge conflicts that have been unresolved for several days. Please rebase on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ExternalStoreRuntimeto integrate with existingGatewayBrowserClientNormalizedMessageformat toThreadMessageLikefor assistant-uiuseReactChatsetting toggleImplementation Details
New files in
ui/src/ui/react-chat/:message-adapter.ts- Converts internal message format to assistant-ui's ThreadMessageLikegateway-runtime.tsx- Bridges GatewayBrowserClient with ExternalStoreRuntimeChatApp.tsx- Main React chat component using assistant-ui primitivesindex.tsx- Mount/unmount functions for Lit integrationstyles.css- Styles matching existing Clawdbot UI using CSS variablesModified files:
ui/package.json- Added React 19, react-dom, @assistant-ui/react depsui/vite.config.ts- Added @vitejs/plugin-reactui/src/ui/storage.ts- AddeduseReactChatsettingui/src/ui/app-render.ts- Conditional rendering based on settingui/src/main.ts- Import React chat stylesTest Plan
pnpm buildpassespnpm lintpasses (0 errors)pnpm testpasses (4781 tests)useReactChat: truesettingCloses #1858
🤖 Generated with Claude Code