Skip to content

Commit

Permalink
Merge pull request #215 from iceljc/features/refine-chat-window
Browse files Browse the repository at this point in the history
minor change
  • Loading branch information
iceljc authored Sep 17, 2024
2 parents 0131d44 + cc51090 commit 86f0b73
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script>
import KnowledgeUploadResult from './knowledge-upload-result.svelte';
import { onMount, onDestroy, createEventDispatcher } from 'svelte';
import util from "lodash";
import { fly } from 'svelte/transition';
import { Tooltip, Button, Input } from '@sveltestrap/sveltestrap';
import { PUBLIC_SERVICE_URL } from '$env/static/public';
Expand All @@ -13,21 +12,20 @@
import LoadingDots from '$lib/common/LoadingDots.svelte';
import { isExternalUrl } from '$lib/helpers/utils/common';
import { knowledgeBaseDocumentStore, userStore } from '$lib/helpers/store';
import { KnowledgeDocSource } from '$lib/helpers/enums';
import {
getKnowledgeDocuments,
uploadKnowledgeDocuments,
deleteKnowledgeDocument
} from '$lib/services/knowledge-base-service';
import { KnowledgeDocSource } from '$lib/helpers/enums';
const svelteDispatch = createEventDispatcher();
const accept = ".txt";
const acceptDisplayList = "txt";
const fileMaxSize = 10 * 1024 * 1024;
const startPage = 1;
const docPageSize = 1;
const docPageSize = 8;
const options = {
scrollbars: {
Expand Down Expand Up @@ -290,7 +288,8 @@
function unique(files) {
if (!files) return [];
return util.uniqBy(files, (/** @type {any} */ x) => x.file_id);
const map = new Map();
return files.filter(x => !map.has(x.file_id) && map.set(x.file_id, 1));
}
</script>
Expand Down

0 comments on commit 86f0b73

Please sign in to comment.