diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index efd068430..0ed409a2b 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1634,6 +1634,25 @@ + { + const model = $models.find((m) => m.id === e); + if (model) { + return [...a, model]; + } + return a; + }, [])} + bind:show={showControls} + bind:chatFiles + bind:params + bind:files + {submitPrompt} + {stopResponse} + modelId={selectedModelIds?.at(0) ?? null} + chatId={$chatId} + {eventTarget} +/> + -{#if $showCallOverlay} - -{/if} - {#if !chatIdProp || (loaded && chatIdProp)} - { - show = false; - }} - {models} - bind:chatFiles - bind:params - /> + {#if $showCallOverlay} + + {:else} + { + show = false; + }} + {models} + bind:chatFiles + bind:params + /> + {/if} {/if} +{:else if $showCallOverlay} + + + + + {:else} diff --git a/src/lib/components/chat/Controls/Controls.svelte b/src/lib/components/chat/Controls/Controls.svelte index 31b58ab90..35184f385 100644 --- a/src/lib/components/chat/Controls/Controls.svelte +++ b/src/lib/components/chat/Controls/Controls.svelte @@ -1,4 +1,4 @@ - diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index f0d51aa9a..7e8f83193 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -1,6 +1,7 @@ {#if $showCallOverlay} - - - - {#if camera} - { - if (assistantSpeaking) { - stopAllAudio(); - } - }} + + {#if camera} + { + if (assistantSpeaking) { + stopAllAudio(); + } + }} + > + {#if emoji} + - {#if emoji} - - {emoji} - - {:else if loading || assistantSpeaking} - - {:else} - - {/if} - - - {/if} - - - {#if !camera} - { - if (assistantSpeaking) { - stopAllAudio(); + {emoji} + + {:else if loading || assistantSpeaking} + + {:else} + + {/if} + + + {/if} + + + {#if !camera} + { + if (assistantSpeaking) { + stopAllAudio(); + } + }} + > + {#if emoji} + + {emoji} + + {:else if loading || assistantSpeaking} + - {#if emoji} - - {emoji} - - {:else if loading || assistantSpeaking} - - {:else} - - {/if} - {:else} - - - - - - { - stopCamera(); - }} - > - - - - - - + class=" {rmsLevel * 100 > 4 + ? ' size-52' + : rmsLevel * 100 > 2 + ? 'size-48' + : rmsLevel * 100 > 1 + ? 'size-[11.5rem]' + : 'size-44'} transition-all rounded-full {(model?.info?.meta + ?.profile_image_url ?? '/static/favicon.png') !== '/static/favicon.png' + ? ' bg-cover bg-center bg-no-repeat' + : 'bg-black dark:bg-white'} " + style={(model?.info?.meta?.profile_image_url ?? '/static/favicon.png') !== + '/static/favicon.png' + ? `background-image: url('${model?.info?.meta?.profile_image_url}');` + : ''} + /> {/if} - + + {:else} + + - - - {#if camera} - { - console.log(e.detail); - selectedVideoInputDeviceId = e.detail; - await stopVideoStream(); - await startVideoStream(); - }} - > - - - - - - - {:else} - - { - await navigator.mediaDevices.getUserMedia({ video: true }); - startCamera(); - }} - > - - - - - - - {/if} - + - + { - if (assistantSpeaking) { - stopAllAudio(); - } + stopCamera(); }} > - - {#if loading} - {$i18n.t('Thinking...')} - {:else if assistantSpeaking} - {$i18n.t('Tap to interrupt')} - {:else} - {$i18n.t('Listening...')} - {/if} - + + + + + {/if} + - - { - showCallOverlay.set(false); - }} - type="button" - > + + + {#if camera} + { + console.log(e.detail); + selectedVideoInputDeviceId = e.detail; + await stopVideoStream(); + await startVideoStream(); + }} + > + + + {:else} + + { + await navigator.mediaDevices.getUserMedia({ video: true }); + startCamera(); + }} + > + + + + + + + {/if} + + + + { + if (assistantSpeaking) { + stopAllAudio(); + } + }} + > + + {#if loading} + {$i18n.t('Thinking...')} + {:else if assistantSpeaking} + {$i18n.t('Tap to interrupt')} + {:else} + {$i18n.t('Listening...')} + {/if} - + + + + + { + showCallOverlay.set(false); + }} + type="button" + > + + + +