From 3260373e7b8dcf8c4616d327ac931041545aa326 Mon Sep 17 00:00:00 2001 From: devteamaegis Date: Fri, 29 May 2026 13:11:58 -0400 Subject: [PATCH 1/2] fix(step): use 'is not None' guard in @step decorator output capture --- backend/chainlit/step.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/chainlit/step.py b/backend/chainlit/step.py index 1604bac8af..ee951e39f8 100644 --- a/backend/chainlit/step.py +++ b/backend/chainlit/step.py @@ -123,7 +123,7 @@ async def async_wrapper(*args, **kwargs): logger.exception(e) result = await func(*args, **kwargs) try: - if result and not step.output: + if result is not None and not step.output: step.output = result except Exception as e: step.is_error = True @@ -154,7 +154,7 @@ def sync_wrapper(*args, **kwargs): logger.exception(e) result = func(*args, **kwargs) try: - if result and not step.output: + if result is not None and not step.output: step.output = result except Exception as e: step.is_error = True From 98d81cb0754d0564c19e9ecff043aa90b715028b Mon Sep 17 00:00:00 2001 From: devteamaegis Date: Fri, 29 May 2026 13:12:05 -0400 Subject: [PATCH 2/2] fix(message): rename classmethod parameter 'self' to 'cls' in MessageBase.from_dict --- backend/chainlit/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/chainlit/message.py b/backend/chainlit/message.py index 0700f630a7..0b6171a767 100644 --- a/backend/chainlit/message.py +++ b/backend/chainlit/message.py @@ -59,7 +59,7 @@ def __post_init__(self) -> None: self.id = str(uuid.uuid4()) @classmethod - def from_dict(self, _dict: StepDict): + def from_dict(cls, _dict: StepDict): type = _dict.get("type", "assistant_message") return Message( id=_dict["id"],