Support for popover container #131
-
|
I tried to use this chat in html shadow container and it worked. Almost. The problem is with popover because by default it's injecting to body tag. I would a customization option for this cause popover portal is very deep in logic and can't simply edit only this element . https://github.com/run-llama/chat-ui/blob/main/packages/chat-ui/src/ui/popover.tsx#L27 I need to have here something like If there is any workoud around please advise |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
At the moment, you can't modify the popover component directly. For this to happen we would need to release chat-ui exclusively to be installed by As a workaround, you can modify the custom canvas example shows how to modify chat components, see: chat-ui/apps/web/app/demo/canvas/custom/page.tsx Lines 189 to 192 in e94c22a You can do something like: <ChatCanvas.Actions>
<CustomChatCanvasHistory /> -- custom history component with your popover
<ChatCanvas.Actions.Close />
</ChatCanvas.Actions> |
Beta Was this translation helpful? Give feedback.
At the moment, you can't modify the popover component directly. For this to happen we would need to release chat-ui exclusively to be installed by
npx shadcnand remove the support of installing it manually.As a workaround, you can modify the
ChatCanvas.Actionscomponent which is using the popover (seehttps://github.com/run-llama/chat-ui/blob/main/packages/chat-ui/src/chat/canvas/actions.tsx#L56)
custom canvas example shows how to modify chat components, see:
chat-ui/apps/web/app/demo/canvas/custom/page.tsx
Lines 189 to 192 in e94c22a
You can do somethi…