Python/agent/application/states/conversation_historycollaps...

23 lines
450 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_expanded: bool = False
@rx.event
def toggle_expanded(self) -> None:
"""
切换展开状态
:return: None
"""
self.is_expanded = not self.is_expanded