mirror of
https://github.com/open-webui/open-webui
synced 2025-03-24 14:40:51 +00:00
Merge pull request #6324 from RocketRider/patch-2
feat: Allow URL in citations to be different from the displayed name
This commit is contained in:
commit
b759f488b4
@ -54,7 +54,7 @@
|
||||
}
|
||||
|
||||
if (id.startsWith('http://') || id.startsWith('https://')) {
|
||||
source = { name: id };
|
||||
source = { ..source, url: id };
|
||||
}
|
||||
|
||||
const existingSource = acc.find((item) => item.id === id);
|
||||
|
@ -90,8 +90,8 @@
|
||||
class="hover:text-gray-500 hover:dark:text-gray-100 underline flex-grow"
|
||||
href={document?.metadata?.file_id
|
||||
? `/api/v1/files/${document?.metadata?.file_id}/content${document?.metadata?.page !== undefined ? `#page=${document.metadata.page + 1}` : ''}`
|
||||
: document.source.name.includes('http')
|
||||
? document.source.name
|
||||
: document.source?.url?.includes('http')
|
||||
? document.source.url
|
||||
: `#`}
|
||||
target="_blank"
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user