From 931e03bd9e00433ba0cbad88c986b4f7e49e7143 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 16 Nov 2024 02:37:37 -0800 Subject: [PATCH] refac --- .../components/workspace/Models/ModelEditor.svelte | 11 +++-------- .../components/workspace/Prompts/PromptEditor.svelte | 11 +++++++++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/lib/components/workspace/Models/ModelEditor.svelte b/src/lib/components/workspace/Models/ModelEditor.svelte index 0af526afd..3872c6f88 100644 --- a/src/lib/components/workspace/Models/ModelEditor.svelte +++ b/src/lib/components/workspace/Models/ModelEditor.svelte @@ -353,13 +353,13 @@ model profile {:else} model profile {/if} @@ -498,12 +498,7 @@
- { - accessControl = _accessControl; - }} - /> +
diff --git a/src/lib/components/workspace/Prompts/PromptEditor.svelte b/src/lib/components/workspace/Prompts/PromptEditor.svelte index fa215d236..042a25939 100644 --- a/src/lib/components/workspace/Prompts/PromptEditor.svelte +++ b/src/lib/components/workspace/Prompts/PromptEditor.svelte @@ -18,6 +18,8 @@ let command = ''; let content = ''; + let accessControl = null; + $: if (!edit) { command = title !== '' ? `${title.replace(/\s+/g, '-').toLowerCase()}` : ''; } @@ -29,7 +31,8 @@ await onSubmit({ title, command, - content + content, + access_control: accessControl }); } else { toast.error( @@ -55,6 +58,8 @@ command = prompt.command.at(0) === '/' ? prompt.command.slice(1) : prompt.command; content = prompt.content; + + accessControl = prompt?.access_control ?? null; } }); @@ -137,7 +142,9 @@
- +
+ +