File tree Expand file tree Collapse file tree 5 files changed +22
-15
lines changed
Expand file tree Collapse file tree 5 files changed +22
-15
lines changed Original file line number Diff line number Diff line change 1+ assets /external /
12** /* .db
23** /* .ipynb
34** /* .pyc
@@ -17,4 +18,4 @@ bun.lockb
1718dist /*
1819frontend.zip
1920poetry.lock
20- venv /
21+ venv /
Original file line number Diff line number Diff line change 11"""The main Chat app."""
22
33import reflex as rx
4+ import reflex_chakra as rc
5+
46from chat .components import chat , navbar
57
68
79def index () -> rx .Component :
810 """The main app."""
9- return rx . chakra .vstack (
11+ return rc .vstack (
1012 navbar (),
1113 chat .chat (),
1214 chat .action_bar (),
Original file line number Diff line number Diff line change 11import reflex as rx
2+ import reflex_chakra as rc
23
34from chat .components import loading_icon
45from chat .state import QA , State
@@ -60,8 +61,8 @@ def action_bar() -> rx.Component:
6061 """The action bar to send a new message."""
6162 return rx .center (
6263 rx .vstack (
63- rx . chakra .form (
64- rx . chakra .form_control (
64+ rc .form (
65+ rc .form_control (
6566 rx .hstack (
6667 rx .input (
6768 rx .input .slot (
Original file line number Diff line number Diff line change 11import reflex as rx
2+ import reflex_chakra as rc
3+
24from chat .state import State
35
46
57def modal () -> rx .Component :
68 """A modal to create a new chat."""
7- return rx . chakra .modal (
8- rx . chakra .modal_overlay (
9- rx . chakra .modal_content (
10- rx . chakra .modal_header (
11- rx . chakra .hstack (
12- rx . chakra .text ("Create new chat" ),
13- rx . chakra .icon (
9+ return rc .modal (
10+ rc .modal_overlay (
11+ rc .modal_content (
12+ rc .modal_header (
13+ rc .hstack (
14+ rc .text ("Create new chat" ),
15+ rc .icon (
1416 tag = "close" ,
1517 font_size = "sm" ,
1618 on_click = State .toggle_modal ,
@@ -22,17 +24,17 @@ def modal() -> rx.Component:
2224 justify_content = "space-between" ,
2325 )
2426 ),
25- rx . chakra .modal_body (
26- rx . chakra .input (
27+ rc .modal_body (
28+ rc .input (
2729 placeholder = "Type something..." ,
2830 on_blur = State .set_new_chat_name ,
2931 bg = "#222" ,
3032 border_color = "#fff3" ,
3133 _placeholder = {"color" : "#fffa" },
3234 ),
3335 ),
34- rx . chakra .modal_footer (
35- rx . chakra .button (
36+ rc .modal_footer (
37+ rc .button (
3638 "Create" ,
3739 bg = "#5535d4" ,
3840 box_shadow = "md" ,
Original file line number Diff line number Diff line change 11reflex >= 0.4.7
22openai >= 1.14.0
3+ reflex-chakra >= 0.6.0
You can’t perform that action at this time.
0 commit comments