Skip to content

Commit 82079e6

Browse files
authored
Merge pull request open-webui#3952 from open-webui/dev
fix
2 parents c74e7df + 1e7a364 commit 82079e6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/lib/components/chat/Controls/Controls.svelte

+5-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<div>
3434
<div class="mb-1.5 font-medium">{$i18n.t('Files')}</div>
3535

36-
<div>
37-
{#each chatFiles as file}
36+
<div class="flex flex-col gap-1">
37+
{#each chatFiles as file, fileIdx}
3838
<FileItem
3939
className="w-full"
4040
url={`${file?.url}`}
@@ -43,7 +43,9 @@
4343
dismissible={true}
4444
on:dismiss={() => {
4545
// Remove the file from the chatFiles array
46-
chatFiles = chatFiles.filter((f) => f.id !== file.id);
46+
47+
chatFiles.splice(fileIdx, 1);
48+
chatFiles = chatFiles;
4749
}}
4850
/>
4951
{/each}

0 commit comments

Comments
 (0)