From 09bde468eb962128940a2286390b365249198d1f Mon Sep 17 00:00:00 2001 From: chengyongru Date: Tue, 30 Jun 2026 14:39:41 +0800 Subject: [PATCH] fix(webui): narrow local trigger source label maintainer edit: avoid optional source access after extracting automation source kind for TypeScript build. --- webui/src/components/MessageBubble.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webui/src/components/MessageBubble.tsx b/webui/src/components/MessageBubble.tsx index efcafcefc..7cb9cf97e 100644 --- a/webui/src/components/MessageBubble.tsx +++ b/webui/src/components/MessageBubble.tsx @@ -168,12 +168,13 @@ export function MessageBubble({ const reasoningStreaming = !!(message.role === "assistant" && message.reasoningStreaming); const hasReasoning = reasoning.length > 0 || reasoningStreaming; const automationSourceKind = message.source?.kind; + const automationSourceName = message.source?.label?.trim(); const automationSourceLabel = ( automationSourceKind === "cron" || automationSourceKind === "local_trigger" || automationSourceKind === "trigger" ) - ? (message.source.label?.trim() || t("message.automationSourceFallback")) + ? (automationSourceName || t("message.automationSourceFallback")) : ""; const automationTriggeredLabel = t("message.automationTriggered");