Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove link_load_options logic #28

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions components/Form/ChatbotLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -138,7 +137,6 @@ const create = async () => {
link: url.value,
collection_id: collectionUuid,
metadata: { ...metadata, ...metadataDefaults },
options: linkOptions(url.value),
},
});
} catch (err) {
Expand All @@ -147,16 +145,6 @@ const create = async () => {
}
};

const linkOptions = (url: string) => {
let selector: any = linkLoadOptions.find((o: any) => o.url === url)?.selector;
if (selector) {
return { selector };
}
selector = linkLoadOptions.find((o: any) => url.startsWith(o.url))?.selector;

return selector ? { selector } : {};
};

const deleteLink = async () => {
isDeleting.value = true;
try {
Expand All @@ -183,7 +171,6 @@ const reindexLink = async (item: Record<string, any>, collection: string | undef
link: url,
collection_id: collection,
metadata: metadata,
options: linkOptions(url),
document_id: document_id,
},
});
Expand Down
Loading