diff --git a/src/lib/components/chat/Placeholder.svelte b/src/lib/components/chat/Placeholder.svelte index 5b7bb52ae..6782ea628 100644 --- a/src/lib/components/chat/Placeholder.svelte +++ b/src/lib/components/chat/Placeholder.svelte @@ -75,7 +75,6 @@ await tick(); }; - let mounted = false; let selectedModelIdx = 0; $: if (selectedModels.length > 0) { @@ -84,147 +83,143 @@ $: models = selectedModels.map((id) => $_models.find((m) => m.id === id)); - onMount(() => { - mounted = true; - }); + onMount(() => {}); -{#if mounted} -
- {#if $temporaryChatEnabled} - -
- Temporary Chat -
-
- {/if} - -
+ {#if $temporaryChatEnabled} + -
-
-
-
- {#each models as model, modelIdx} - tag.name.toUpperCase()) - .join(', ')} - placement="top" - > - - - {/each} -
-
+
+ Temporary Chat +
+ + {/if} -
- {#if models[selectedModelIdx]?.name} - {models[selectedModelIdx]?.name} - {:else} - {$i18n.t('Hello, {{name}}', { name: $user.name })} - {/if} -
-
- -
-
- {#if models[selectedModelIdx]?.info?.meta?.description ?? null} +
+
+
+
+
+ {#each models as model, modelIdx} tag.name.toUpperCase()) + .join(', ')} placement="top" > -
{ + selectedModelIdx = modelIdx; + }} > - {@html marked.parse( - sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description) - )} -
+ logo +
- - {#if models[selectedModelIdx]?.info?.meta?.user} -
- By - {#if models[selectedModelIdx]?.info?.meta?.user.community} - {models[selectedModelIdx]?.info?.meta?.user.name - ? models[selectedModelIdx]?.info?.meta?.user.name - : `@${models[selectedModelIdx]?.info?.meta?.user.username}`} - {:else} - {models[selectedModelIdx]?.info?.meta?.user.name} - {/if} -
- {/if} - {/if} + {/each}
-
- { - dispatch('upload', e.detail); - }} - on:submit={(e) => { - dispatch('submit', e.detail); - }} - /> +
+ {#if models[selectedModelIdx]?.name} + {models[selectedModelIdx]?.name} + {:else} + {$i18n.t('Hello, {{name}}', { name: $user.name })} + {/if}
-
-
-
- { - selectSuggestionPrompt(e.detail); + +
+
+ {#if models[selectedModelIdx]?.info?.meta?.description ?? null} + +
+ {@html marked.parse( + sanitizeResponseContent(models[selectedModelIdx]?.info?.meta?.description) + )} +
+
+ + {#if models[selectedModelIdx]?.info?.meta?.user} +
+ By + {#if models[selectedModelIdx]?.info?.meta?.user.community} + {models[selectedModelIdx]?.info?.meta?.user.name + ? models[selectedModelIdx]?.info?.meta?.user.name + : `@${models[selectedModelIdx]?.info?.meta?.user.username}`} + {:else} + {models[selectedModelIdx]?.info?.meta?.user.name} + {/if} +
+ {/if} + {/if} +
+
+ +
+ { + dispatch('upload', e.detail); + }} + on:submit={(e) => { + dispatch('submit', e.detail); }} />
-{/if} +
+
+ { + selectSuggestionPrompt(e.detail); + }} + /> +
+
+