File tree Expand file tree Collapse file tree 3 files changed +2063
-1853
lines changed
Expand file tree Collapse file tree 3 files changed +2063
-1853
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
22import { usePolyfire } from "polyfire-js/hooks" ;
33import Chat , { useChatContext } from "@polyfire-ai/chat-ui" ;
4- import { ChatOptions } from "polyfire-js/chats" ;
54
6- const ChatUI = ( ) => {
5+ const App : React . FC = ( ) => {
76 const { auth } = usePolyfire ( ) ;
87 const { utils, chat } = useChatContext ( ) ;
98
@@ -36,16 +35,4 @@ const ChatUI = () => {
3635 ) ;
3736} ;
3837
39- const options : ChatOptions = {
40- systemPrompt : "Repond moi en Russe" ,
41- } ;
42-
43- const App : React . FC = ( ) => {
44- return (
45- < Chat . Root baseChatColor = "#4682B4" options = { options } >
46- < ChatUI />
47- </ Chat . Root >
48- ) ;
49- } ;
50-
5138export default App ;
Original file line number Diff line number Diff line change 11import React from "react" ;
22import ReactDOM from "react-dom/client" ;
33import App from "./App" ;
4+ import Chat from "@polyfire-ai/chat-ui" ;
5+
46import reportWebVitals from "./reportWebVitals" ;
57import { PolyfireProvider } from "polyfire-js/hooks" ;
68
@@ -14,7 +16,9 @@ const root = ReactDOM.createRoot(
1416
1517root . render (
1618 < PolyfireProvider project = { process . env . REACT_APP_POLYFIRE_PROJECT as string } >
17- < App />
19+ < Chat . Root baseChatColor = "#4682B4" >
20+ < App />
21+ </ Chat . Root >
1822 </ PolyfireProvider >
1923) ;
2024
You can’t perform that action at this time.
0 commit comments