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",
|
||||
"attachImage": "Attach image",
|
||||
"attachKnowledge": "Knowledge",
|
||||
"noKnowledge": "No knowledge bases in Open WebUI",
|
||||
"attachWebpage": "Webpage",
|
||||
"addUrl": "Add URL",
|
||||
"removeAttachment": "Remove attachment",
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in new issue
Block a user