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.
This commit is contained in:
Lok3sh-Kumar committed 2026-06-27 14:15:31 +05:30
1 parent f61e7539d7
commit bc26231d13
2 files changed
+12 -7

No files matched your search

+1
View File
@@ -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",
+11 -7
View File
@@ -498,11 +498,11 @@ export function Chat({ options, integrationIds, isEditMode }: WidgetComponentPro
{t("widget.openWebUi.attachImage")}
</Button>
{knowledge.length > 0 ? (
<Stack gap={4}>
<Text size="xs" fw={600} c="dimmed">
{t("widget.openWebUi.attachKnowledge")}
</Text>
<Stack gap={4}>
<Text size="xs" fw={600} c="dimmed">
{t("widget.openWebUi.attachKnowledge")}
</Text>
{knowledge.length > 0 ? (
<Checkbox.Group value={knowledgeIds} onChange={setKnowledgeIds}>
<Stack gap={4}>
{knowledge.map((item) => (
@@ -510,8 +510,12 @@ export function Chat({ options, integrationIds, isEditMode }: WidgetComponentPro
))}
</Stack>
</Checkbox.Group>
</Stack>
) : null}
) : (
<Text size="xs" c="dimmed">
{t("widget.openWebUi.noKnowledge")}
</Text>
)}
</Stack>
<Stack gap={4}>
<Text size="xs" fw={600} c="dimmed">