Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
6668d795
Unverified
Commit
6668d795
authored
Jul 17, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Jul 17, 2024
Browse files
Merge pull request #3944 from open-webui/dev
refac
parents
ef8fbaae
775a3dc3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
src/lib/components/chat/Chat.svelte
src/lib/components/chat/Chat.svelte
+2
-0
src/lib/components/chat/Messages/ResponseMessage.svelte
src/lib/components/chat/Messages/ResponseMessage.svelte
+5
-0
src/lib/components/chat/Messages/UserMessage.svelte
src/lib/components/chat/Messages/UserMessage.svelte
+2
-6
No files found.
src/lib/components/chat/Chat.svelte
View file @
6668d795
...
...
@@ -264,6 +264,8 @@
messages: {},
currentId: null
};
chatFiles = [];
params = {};
if ($page.url.searchParams.get('models')) {
...
...
src/lib/components/chat/Messages/ResponseMessage.svelte
View file @
6668d795
...
...
@@ -566,6 +566,11 @@
const metadata = citation.metadata?.[index];
const id = metadata?.source ?? 'N/A';
let source = citation?.source;
if (metadata?.name) {
source = { ...source, name: metadata.name };
}
// Check if ID looks like a URL
if (id.startsWith('http://') || id.startsWith('https://')) {
source = { name: id };
...
...
src/lib/components/chat/Messages/UserMessage.svelte
View file @
6668d795
...
...
@@ -99,12 +99,8 @@
<div class={$settings?.chatBubble ?? true ? 'self-end' : ''}>
{#if file.type === 'image'}
<img src={file.url} alt="input" class=" max-h-96 rounded-lg" draggable="false" />
{:else if file.type === 'file'}
<FileItem url={`${file?.url}/content`} name={file.name} type={$i18n.t('File')} />
{:else if file.type === 'doc'}
<FileItem url={`${file?.url}`} name={file.name} type={$i18n.t('Document')} />
{:else if file.type === 'collection'}
<FileItem name={file?.title ?? `#${file.name}`} type={$i18n.t('Collection')} />
{:else}
<FileItem url={file.url} name={file.name} type={file.type} />
{/if}
</div>
{/each}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment