From b45b07a39fcf7722d400cede170b35c33adae4aa Mon Sep 17 00:00:00 2001 From: Andrew <15331990+ahuang11@users.noreply.github.com> Date: Fri, 22 Dec 2023 12:08:44 -0800 Subject: [PATCH] Loosen callback future type (#6120) * Loosen callback future type * Set as attr --- panel/chat/feed.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/panel/chat/feed.py b/panel/chat/feed.py index 2f048d01e4..ffa45b44cc 100644 --- a/panel/chat/feed.py +++ b/panel/chat/feed.py @@ -205,9 +205,6 @@ class ChatFeed(ListPanel): The placeholder wrapped in a ChatMessage object; primarily to prevent recursion error in _update_placeholder.""") - _callback_future = param.ClassSelector(class_=asyncio.Future, allow_None=True, doc=""" - The current, cancellable async task being executed.""") - _callback_state = param.ObjectSelector(objects=list(CallbackState), doc=""" The current state of the callback.""") @@ -217,6 +214,8 @@ class ChatFeed(ListPanel): _stylesheets: ClassVar[List[str]] = [f"{CDN_DIST}css/chat_feed.css"] def __init__(self, *objects, **params): + self._callback_future = None + if params.get("renderers") and not isinstance(params["renderers"], list): params["renderers"] = [params["renderers"]] if params.get("width") is None and params.get("sizing_mode") is None: