From bc26231d13e99d43878043d355d461c54cddca49 Mon Sep 17 00:00:00 2001 From: Lok3sh-Kumar Date: Sat, 27 Jun 2026 14:15:31 +0530 Subject: [PATCH] fix(open-webui): always show Knowledge section in attach menu The Knowledge picker was hidden entirely when the account had no knowledge bases, making the feature look missing. Always render the section with an empty-state hint so it stays discoverable. --- packages/translation/src/lang/en.json | 1 + packages/widgets/src/open-webui/chat.tsx | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/translation/src/lang/en.json b/packages/translation/src/lang/en.json index 473578cec..a1f011ac8 100644 --- a/packages/translation/src/lang/en.json +++ b/packages/translation/src/lang/en.json @@ -3567,6 +3567,7 @@ "attach": "Attach", "attachImage": "Attach image", "attachKnowledge": "Knowledge", + "noKnowledge": "No knowledge bases in Open WebUI", "attachWebpage": "Webpage", "addUrl": "Add URL", "removeAttachment": "Remove attachment", diff --git a/packages/widgets/src/open-webui/chat.tsx b/packages/widgets/src/open-webui/chat.tsx index af0257656..dad5ddefa 100644 --- a/packages/widgets/src/open-webui/chat.tsx +++ b/packages/widgets/src/open-webui/chat.tsx @@ -498,11 +498,11 @@ export function Chat({ options, integrationIds, isEditMode }: WidgetComponentPro {t("widget.openWebUi.attachImage")} - {knowledge.length > 0 ? ( - - - {t("widget.openWebUi.attachKnowledge")} - + + + {t("widget.openWebUi.attachKnowledge")} + + {knowledge.length > 0 ? ( {knowledge.map((item) => ( @@ -510,8 +510,12 @@ export function Chat({ options, integrationIds, isEditMode }: WidgetComponentPro ))} - - ) : null} + ) : ( + + {t("widget.openWebUi.noKnowledge")} + + )} +