diff --git a/components/Form/ChatbotLink.vue b/components/Form/ChatbotLink.vue index 0d5e5b4..43ba6c8 100644 --- a/components/Form/ChatbotLink.vue +++ b/components/Form/ChatbotLink.vue @@ -79,7 +79,6 @@ if (props.item.cmetadata) { const statesStore = useStatesStore(); const collectionUuid = statesStore.collection?.uuid || ''; const metadataDefaults = statesStore.collection?.cmetadata?.metadata_defaults?.links || {}; -const linkLoadOptions = statesStore.collection?.cmetadata?.link_load_options || []; const integration = useIntegration(); const indexingResult = ref<'Indexed' | 'Not Indexed' | 'None'>('None'); @@ -138,7 +137,6 @@ const create = async () => { link: url.value, collection_id: collectionUuid, metadata: { ...metadata, ...metadataDefaults }, - options: linkOptions(url.value), }, }); } catch (err) { @@ -147,32 +145,6 @@ const create = async () => { } }; -const linkOptions = (url: string): Record => { - const uniqueKeys = new Set(); - linkLoadOptions.forEach((option: any) => { - Object.keys(option).forEach((key) => { - if (key !== 'url') { - uniqueKeys.add(key); - } - }); - }); - - const options: Record = {}; - uniqueKeys.forEach((key) => { - options[key] = linkOptionsProperty(url, key); - }); - - return options; -}; - -const linkOptionsProperty = (url: string, property: string) => { - const option = linkLoadOptions.find((o: any) => o.url === url)?.[property]; - if (option) { - return option; - } - return linkLoadOptions.find((o: any) => url.startsWith(o.url))?.[property]; -}; - const deleteLink = async () => { isDeleting.value = true; try { @@ -199,7 +171,6 @@ const reindexLink = async (item: Record, collection: string | undef link: url, collection_id: collection, metadata: metadata, - options: linkOptions(url), document_id: document_id, }, });