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:
1 parent
f61e7539d7
commit
bc26231d13
2 files changed
+12
-7
No files matched your search
@@ -3567,6 +3567,7 @@
|
|||||||
"attach": "Attach",
|
"attach": "Attach",
|
||||||
"attachImage": "Attach image",
|
"attachImage": "Attach image",
|
||||||
"attachKnowledge": "Knowledge",
|
"attachKnowledge": "Knowledge",
|
||||||
|
"noKnowledge": "No knowledge bases in Open WebUI",
|
||||||
"attachWebpage": "Webpage",
|
"attachWebpage": "Webpage",
|
||||||
"addUrl": "Add URL",
|
"addUrl": "Add URL",
|
||||||
"removeAttachment": "Remove attachment",
|
"removeAttachment": "Remove attachment",
|
||||||
|
|||||||
@@ -498,11 +498,11 @@ export function Chat({ options, integrationIds, isEditMode }: WidgetComponentPro
|
|||||||
{t("widget.openWebUi.attachImage")}
|
{t("widget.openWebUi.attachImage")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
{knowledge.length > 0 ? (
|
<Stack gap={4}>
|
||||||
<Stack gap={4}>
|
<Text size="xs" fw={600} c="dimmed">
|
||||||
<Text size="xs" fw={600} c="dimmed">
|
{t("widget.openWebUi.attachKnowledge")}
|
||||||
{t("widget.openWebUi.attachKnowledge")}
|
</Text>
|
||||||
</Text>
|
{knowledge.length > 0 ? (
|
||||||
<Checkbox.Group value={knowledgeIds} onChange={setKnowledgeIds}>
|
<Checkbox.Group value={knowledgeIds} onChange={setKnowledgeIds}>
|
||||||
<Stack gap={4}>
|
<Stack gap={4}>
|
||||||
{knowledge.map((item) => (
|
{knowledge.map((item) => (
|
||||||
@@ -510,8 +510,12 @@ export function Chat({ options, integrationIds, isEditMode }: WidgetComponentPro
|
|||||||
))}
|
))}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Checkbox.Group>
|
</Checkbox.Group>
|
||||||
</Stack>
|
) : (
|
||||||
) : null}
|
<Text size="xs" c="dimmed">
|
||||||
|
{t("widget.openWebUi.noKnowledge")}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
|
||||||
<Stack gap={4}>
|
<Stack gap={4}>
|
||||||
<Text size="xs" fw={600} c="dimmed">
|
<Text size="xs" fw={600} c="dimmed">
|
||||||
|
|||||||
Reference in new issue
Block a user