fix: use widthClasses in ChatScreenForm
This commit is contained in:
parent
5a721b5678
commit
16fcb29197
|
|
@ -1,6 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { afterNavigate } from '$app/navigation';
|
import { afterNavigate } from '$app/navigation';
|
||||||
import { ChatFormHelperText, ChatForm } from '$lib/components/app';
|
import { ChatFormHelperText, ChatForm } from '$lib/components/app';
|
||||||
|
import { chatWidthClasses } from '$lib/stores/chat.svelte';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|
@ -48,6 +49,7 @@
|
||||||
onSystemPromptAdd?.({ message, files: uploadedFiles });
|
onSystemPromptAdd?.({ message, files: uploadedFiles });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let widthClasses = $derived(chatWidthClasses());
|
||||||
let hasLoadingAttachments = $derived(uploadedFiles.some((f) => f.isLoading));
|
let hasLoadingAttachments = $derived(uploadedFiles.some((f) => f.isLoading));
|
||||||
|
|
||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
|
|
@ -102,7 +104,7 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="relative mx-auto max-w-[48rem]">
|
<div class="relative mx-auto {widthClasses.class}" style={widthClasses.style}>
|
||||||
<ChatForm
|
<ChatForm
|
||||||
bind:this={chatFormRef}
|
bind:this={chatFormRef}
|
||||||
bind:value={message}
|
bind:value={message}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue