diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 58d0a5445..81416e77f 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1978,6 +1978,11 @@ {mergeResponses} {chatActionHandler} bottomPadding={files.length > 0} + on:submit={(e) => { + if (e.detail) { + submitPrompt(e.detail); + } + }} /> diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index ef2810686..a75046277 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -1,7 +1,8 @@ + +
+ +
+ +{#if floatingButtons} + +{/if} diff --git a/src/lib/components/chat/Messages/Message.svelte b/src/lib/components/chat/Messages/Message.svelte index 5042b3474..742658390 100644 --- a/src/lib/components/chat/Messages/Message.svelte +++ b/src/lib/components/chat/Messages/Message.svelte @@ -76,6 +76,9 @@ {rateMessage} {continueResponse} {regenerateResponse} + on:submit={async (e) => { + dispatch('submit', e.detail); + }} on:action={async (e) => { dispatch('action', e.detail); }} @@ -106,6 +109,9 @@ {continueResponse} {regenerateResponse} {mergeResponses} + on:submit={async (e) => { + dispatch('submit', e.detail); + }} on:action={async (e) => { dispatch('action', e.detail); }} diff --git a/src/lib/components/chat/Messages/MultiResponseMessages.svelte b/src/lib/components/chat/Messages/MultiResponseMessages.svelte index 291b2f1ae..48da89d86 100644 --- a/src/lib/components/chat/Messages/MultiResponseMessages.svelte +++ b/src/lib/components/chat/Messages/MultiResponseMessages.svelte @@ -215,6 +215,9 @@ groupedMessageIdsIdx[modelIdx] = groupedMessageIds[modelIdx].messageIds.length - 1; }} + on:submit={async (e) => { + dispatch('submit', e.detail); + }} on:action={async (e) => { dispatch('action', e.detail); }} diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 7bd6563fe..b7138ad73 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -38,6 +38,7 @@ import type { Writable } from 'svelte/store'; import type { i18n as i18nType } from 'i18next'; + import ContentRenderer from './ContentRenderer.svelte'; interface MessageType { id: string; @@ -468,13 +469,23 @@ {:else} -
+
{#if message.content === '' && !message.error} {:else if message.content && message.error !== true} - + { + dispatch( + 'submit', + `Can you explain this section to me in more detail?\n\n${e.detail}` + ); + }} + /> {/if} {#if message.error} diff --git a/src/lib/components/icons/LightBlub.svelte b/src/lib/components/icons/LightBlub.svelte new file mode 100644 index 000000000..0778e6dad --- /dev/null +++ b/src/lib/components/icons/LightBlub.svelte @@ -0,0 +1,19 @@ + + + + +