This commit is contained in:
Timothy Jaeryang Baek committed 2026-10-25 14:20:56 +09:00
1 parent 5cc0ed71d6
commit 5f95008abd
33 files changed
+359 -363

No files matched your search

@@ -20,7 +20,8 @@
searchKnowledgeBases,
testExternalKnowledgeSource,
updateExternalKnowledgeConnection,
updateExternalKnowledgeSource
updateExternalKnowledgeSource,
updateKnowledgeAccessGrants
} from '$lib/apis/knowledge';
import SettingsSelect from '$lib/components/common/SettingsSelect.svelte';
@@ -173,7 +174,7 @@
tableName: sourceConfig.table_name ?? defaults.tableName,
collectionField: sourceConfig.collection_field ?? defaults.collectionField
};
accessGrants = item.access_grants ?? [];
accessGrants = structuredClone(item.access_grants ?? []);
showSourceModal = true;
};
@@ -352,7 +353,6 @@
description: sourceForm.description,
connection: connectionPayload(),
source: sourcePayload(),
access_grants: accessGrants,
test_query: sourceForm.testQuery,
test_count: 5
}).catch((error) => {
@@ -773,6 +773,22 @@
share={true}
sharePublic={true}
shareUsers={true}
onChange={async () => {
if (editingItem) {
try {
await updateKnowledgeAccessGrants(
localStorage.token,
editingItem.id,
accessGrants
);
editingItem.access_grants = structuredClone(accessGrants);
toast.success($i18n.t('Saved'));
} catch (error) {
accessGrants = structuredClone(editingItem.access_grants ?? []);
toast.error(`${error}`);
}
}
}}
/>
<div class="flex justify-between items-center pt-3 text-sm font-normal">