mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-04 08:28:36 +00:00
fix(webui): narrow local trigger source label
maintainer edit: avoid optional source access after extracting automation source kind for TypeScript build.
This commit is contained in:
parent
2ebf5c4972
commit
09bde468eb
@ -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");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user