Skip to content

Commit ceb1d2a

Browse files
committed
add event handler to avoid pyright issue
1 parent b84a634 commit ceb1d2a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

chat/state.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ def create_chat(self, form_data: dict[str, Any]):
4242
self._chats[new_chat_name] = []
4343
self.is_modal_open = False
4444

45+
@rx.event
46+
def set_is_modal_open(self, is_open: bool):
47+
"""Set the new chat modal open state.
48+
49+
Args:
50+
is_open: Whether the modal is open.
51+
"""
52+
self.is_modal_open = is_open
53+
4554
@rx.var
4655
def selected_chat(self) -> list[QA]:
4756
"""Get the list of questions and answers for the current chat.

0 commit comments

Comments
 (0)