Python/智能体/application/state/conversation_history_collap...

24 lines
508 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
"""
对话历史折叠面板状态
"""
import reflex as rx
class ConversationHistoryCollapseState(rx.State):
"""
对话历史折叠面板状态
"""
# 对话历史折叠面板打开状态True表示打开False表示关闭
is_open: bool = True
@rx.event
def toggle(self) -> None:
"""
打开/关闭对话历史折叠面板
:param is_open: 打开状态
:return: None
"""
self.is_open = not self.is_open