Python/agent/application/states/conversation_history.py

23 lines
476 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 ConversationHistoryState(rx.State):
"""
会话历史状态
"""
# 会话历史折叠面板打开状态True表示打开False表示关闭
is_collapse_open: bool = False
@rx.event
def toggle_collapse(self) -> None:
"""
打开/关闭会话历史折叠面板
:return: None
"""
self.is_collapse_open = not self.is_collapse_open