Skip to content

Commit

Permalink
fix: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
BuonDavide committed Aug 21, 2024
1 parent 709c0f0 commit 92227fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 4 additions & 5 deletions components/Element/ChatbotFiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

<script lang="ts" setup>
interface singleFile {
attributes: Object;
cmetadata: Object;
custom_id: string;
created: string;
attributes: Object;
cmetadata: Object;
custom_id: string;
created: string;
}
const isLoading = ref(true);
Expand All @@ -50,7 +50,6 @@ const loadFiles = async () => {
isLoading.value = true;
const endpoint = `/api/${integration}/index/${collection?.uuid}/documents_metadata?filter[type]=files&sort=-created`;
if (integration === 'brevia') {
console.log("Brevia integration");
const items = await $fetch<singleFile[]>(endpoint);
files.value = items;
indexedItems = items;
Expand Down
7 changes: 3 additions & 4 deletions components/Element/ChatbotQuestions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/>
</div>
<div v-if="searchTerm(searchInput)" class="absolute right-4 -bottom-1 text-sm font-bold italic text-sky-600">
{{ questions?.filter(showThis)?.length }} {{ $t('ELEMENTS_FOUND')}}
{{ questions?.filter(showThis)?.length }} {{ $t('ELEMENTS_FOUND') }}
</div>
</div>
</div>
Expand All @@ -52,12 +52,12 @@ const MIN_SEARCH_LENGTH = 3;
const addMode = ref(false);
const isLoading = ref(true);
const statesStore = useStatesStore();
const collection = <{uuid: string; name: string; cmetadata: Object}>statesStore.collection;
const collection = <{ uuid: string; name: string; cmetadata: Object }>statesStore.collection;
const features = useIntegrationFeatures();
const isDemo = features.demoVersion && statesStore.userHasRole('demo');
const isQuestionAddAllowed = ref(false);
const searchInput = ref('');
const questions = ref<{id: number}[]>([]);
const questions = ref<{ id: number }[]>([]);
const integration = useIntegration();
const endpointBase = `/api/${integration}/index/${collection?.uuid}`;
Expand All @@ -73,7 +73,6 @@ const loadQuestions = async () => {
await loadQuestions();
isQuestionAddAllowed.value = checkAddAllowed(questions);
const searchTerm = (input: string) => {
if (input.trim().length > MIN_SEARCH_LENGTH) return input;
return '';
Expand Down

0 comments on commit 92227fc

Please sign in to comment.