diff --git a/src/routes/(app)/workspace/models/create/+page.svelte b/src/routes/(app)/workspace/models/create/+page.svelte
index 0247bfbb4..d80648fb5 100644
--- a/src/routes/(app)/workspace/models/create/+page.svelte
+++ b/src/routes/(app)/workspace/models/create/+page.svelte
@@ -386,64 +386,93 @@
-
-
{$i18n.t('Prompt suggestions')}
+
+
+
{$i18n.t('Prompt suggestions')}
-
-
-
- {#each info.meta.suggestion_prompts as prompt, promptIdx}
-
-
+ {#if info.meta.suggestion_prompts === null}
+ {$i18n.t('Default')}
+ {:else}
+ {$i18n.t('Custom')}
+ {/if}
+
+
-
- {/each}
+
+
+
+ {/if}
+
+ {#if info.meta.suggestion_prompts}
+
+ {#if info.meta.suggestion_prompts.length > 0}
+ {#each info.meta.suggestion_prompts as prompt, promptIdx}
+
+
+
+
{
+ info.meta.suggestion_prompts.splice(promptIdx, 1);
+ info.meta.suggestion_prompts = info.meta.suggestion_prompts;
+ }}
+ >
+
+
+
+
+
+ {/each}
+ {:else}
+
No suggestion prompts
+ {/if}
+
+ {/if}
diff --git a/src/routes/(app)/workspace/models/edit/+page.svelte b/src/routes/(app)/workspace/models/edit/+page.svelte
index 18efe5a08..c8fa2ecb2 100644
--- a/src/routes/(app)/workspace/models/edit/+page.svelte
+++ b/src/routes/(app)/workspace/models/edit/+page.svelte
@@ -44,8 +44,7 @@
meta: {
profile_image_url: '/favicon.png',
description: '',
- content: '',
- suggestion_prompts: []
+ suggestion_prompts: null
},
params: {
system: ''
@@ -366,64 +365,93 @@
-
-
{$i18n.t('Prompt suggestions')}
+
+
+
{$i18n.t('Prompt suggestions')}
-
{
- if (
- info.meta.suggestion_prompts.length === 0 ||
- info.meta.suggestion_prompts.at(-1).content !== ''
- ) {
- info.meta.suggestion_prompts = [...info.meta.suggestion_prompts, { content: '' }];
- }
- }}
- >
- {
+ if (info.meta.suggestion_prompts === null) {
+ info.meta.suggestion_prompts = [{ content: '' }];
+ } else {
+ info.meta.suggestion_prompts = null;
+ }
+ }}
>
-
-
-
-
-
- {#each info.meta.suggestion_prompts as prompt, promptIdx}
-
-
+ {#if info.meta.suggestion_prompts === null}
+ {$i18n.t('Default')}
+ {:else}
+ {$i18n.t('Custom')}
+ {/if}
+
+
-
{
- info.meta.suggestion_prompts.splice(promptIdx, 1);
- info.meta.suggestion_prompts = info.meta.suggestion_prompts;
- }}
+ {#if info.meta.suggestion_prompts !== null}
+ {
+ if (
+ info.meta.suggestion_prompts.length === 0 ||
+ info.meta.suggestion_prompts.at(-1).content !== ''
+ ) {
+ info.meta.suggestion_prompts = [...info.meta.suggestion_prompts, { content: '' }];
+ }
+ }}
+ >
+
-
-
-
-
-
- {/each}
+
+
+
+ {/if}
+
+ {#if info.meta.suggestion_prompts}
+
+ {#if info.meta.suggestion_prompts.length > 0}
+ {#each info.meta.suggestion_prompts as prompt, promptIdx}
+
+
+
+
{
+ info.meta.suggestion_prompts.splice(promptIdx, 1);
+ info.meta.suggestion_prompts = info.meta.suggestion_prompts;
+ }}
+ >
+
+
+
+
+
+ {/each}
+ {:else}
+
No suggestion prompts
+ {/if}
+
+ {/if}