+
Knowledge Source Documents
@@ -66,9 +66,9 @@
placeholder="Search by File" />
-
+
- {{ data.ingestionInfo.metadata.KsDoctype }}
+ {{ mapDocType(data.ingestionInfo.metadata.KsDoctype) }}
{
}
}
+const mapDocType = (type) => {
+ const mapping = {
+ 'functional': 'Functional',
+ 'code_instruction': 'Code Instruction',
+ 'specification': 'Specification',
+ 'other': 'Other'
+ };
+ return mapping[type] || type;
+};
+
// Function to format date string
function formatDate(dateString) {
// Parse the date string using moment
diff --git a/src/views/pages/ksDocuments/KsNewDocumentForm.vue b/src/views/pages/ksDocuments/KsNewDocumentForm.vue
index f97f798..4dcd0df 100644
--- a/src/views/pages/ksDocuments/KsNewDocumentForm.vue
+++ b/src/views/pages/ksDocuments/KsNewDocumentForm.vue
@@ -102,7 +102,7 @@
+ class="w-full" :disabled="userPrefStore.user.role !== 'ADMIN'"/>
{{ errors.defaultChunkSize }}
@@ -111,7 +111,8 @@
-
+
{{ errors.minChunkSize }}
@@ -121,7 +122,7 @@
+ class="w-full" :disabled="userPrefStore.user.role !== 'ADMIN'"/>
{{ errors.minChunkSizeToEmbed
}}
@@ -132,7 +133,7 @@
+ class="w-full" :disabled="userPrefStore.user.role !== 'ADMIN'"/>
{{ errors.maxNumberOfChunks
}}
@@ -192,6 +193,7 @@ import { useRouter } from 'vue-router';
import { KsDocumentStore } from '../../../stores/KsDocumentStore';
import { LoadingStore } from '../../../stores/LoadingStore';
import { UserPrefStore } from '../../../stores/UserPrefStore';
+import { onMounted } from 'vue';
const toast = useToast();
const router = useRouter();
@@ -300,7 +302,9 @@ const onFileSelect = (event) => {
});
};
-watch(() => userPrefStore.getSelApp, updateDocuments, { immediate: true });
+onMounted(() => {
+ updateDocuments();
+});
function updateDocuments() {
ksDocumentStore.fetchKsDocument().then(() => {
diff --git a/src/views/pages/similaritySearch/KsSimilaritySearch.vue b/src/views/pages/similaritySearch/KsSimilaritySearch.vue
index 965f3a6..9789284 100644
--- a/src/views/pages/similaritySearch/KsSimilaritySearch.vue
+++ b/src/views/pages/similaritySearch/KsSimilaritySearch.vue
@@ -14,7 +14,8 @@
-