This commit is contained in:
Timothy Jaeryang Baek
2026-03-23 23:39:52 -05:00
parent 3a4b862e81
commit 139e764b2f
45 changed files with 6251 additions and 5730 deletions
+6 -3
View File
@@ -256,7 +256,9 @@
});
models = models;
// Sync with server
await Promise.all(modelsToShow.map((model) => updateModelById(localStorage.token, model.id, model)));
await Promise.all(
modelsToShow.map((model) => updateModelById(localStorage.token, model.id, model))
);
toast.success($i18n.t('All models are now visible'));
};
@@ -268,7 +270,9 @@
});
models = models;
// Sync with server
await Promise.all(modelsToHide.map((model) => updateModelById(localStorage.token, model.id, model)));
await Promise.all(
modelsToHide.map((model) => updateModelById(localStorage.token, model.id, model))
);
toast.success($i18n.t('All models are now hidden'));
};
@@ -468,7 +472,6 @@
</button>
</div>
{/if}
</div>
</div>
@@ -5,7 +5,6 @@
import { searchNotes } from '$lib/apis/notes';
import { searchKnowledgeBases, searchKnowledgeFiles } from '$lib/apis/knowledge';
import { decodeString } from '$lib/utils';
import Dropdown from '$lib/components/common/Dropdown.svelte';
@@ -163,7 +163,9 @@
const hasPublicWriteGrant = (grants: AccessGrant[]): boolean =>
grants.some(
(grant) =>
grant.principal_type === 'user' && grant.principal_id === '*' && grant.permission === 'write'
grant.principal_type === 'user' &&
grant.principal_id === '*' &&
grant.permission === 'write'
);
const currentGrants = (): AccessGrant[] =>
@@ -203,11 +205,7 @@
const setPublic = (isPublic: boolean) => {
// Remove all user:* grants
const filtered = currentGrants().filter(
(grant) =>
!(
grant.principal_type === 'user' &&
grant.principal_id === '*'
)
(grant) => !(grant.principal_type === 'user' && grant.principal_id === '*')
);
if (isPublic) {
filtered.push({
@@ -27,7 +27,9 @@
onChange={() => onChange(value)}
>
<svelte:fragment slot="trigger" let:selectedLabel>
<span class="inline-flex h-input px-0.5 w-full outline-hidden bg-transparent truncate placeholder-gray-400 focus:outline-hidden">
<span
class="inline-flex h-input px-0.5 w-full outline-hidden bg-transparent truncate placeholder-gray-400 focus:outline-hidden"
>
{selectedLabel}
</span>
<ChevronDown className=" size-3.5" strokeWidth="2.5" />