Skip to content

Commit

Permalink
Ensure ChatMessage internals are visible to Panel (#6304)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 4, 2024
1 parent 6579c8b commit 9c8ddba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion panel/chat/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
from tempfile import NamedTemporaryFile
from textwrap import indent
from typing import (
TYPE_CHECKING, Any, ClassVar, Dict, Iterable, List, Union,
TYPE_CHECKING, Any, Callable, ClassVar, Dict, Iterable, List, Optional,
Union,
)
from zoneinfo import ZoneInfo

Expand Down Expand Up @@ -687,6 +688,11 @@ def update(
updates["object"] = value
self.param.update(**updates)

def select(
self, selector: Optional[type | Callable[[Viewable], bool]] = None
) -> List[Viewable]:
return super().select(selector) + self._composite.select(selector)

def serialize(
self,
prefix_with_viewable_label: bool = True,
Expand Down

0 comments on commit 9c8ddba

Please sign in to comment.