diff --git a/src/lib/common/MessageImageGallery.svelte b/src/lib/common/MessageFileGallery.svelte similarity index 100% rename from src/lib/common/MessageImageGallery.svelte rename to src/lib/common/MessageFileGallery.svelte diff --git a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte index 5a02f5b3..5697170b 100644 --- a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte +++ b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte @@ -42,7 +42,7 @@ import RichContent from './rich-content/rich-content.svelte'; import RcMessage from "./rich-content/rc-message.svelte"; import RcDisclaimer from './rich-content/rc-disclaimer.svelte'; - import MessageImageGallery from '$lib/common/MessageImageGallery.svelte'; + import MessageFileGallery from '$lib/common/MessageFileGallery.svelte'; import ChatImageUploader from './chat-util/chat-image-uploader.svelte'; import ChatImageGallery from './chat-util/chat-image-gallery.svelte'; import PersistLog from './persist-log/persist-log.svelte'; @@ -444,7 +444,7 @@ // @ts-ignore postback: { ...postback, - payload: `${postback?.payload || msgText || ''} ${filePayload}` + payload: `${postback?.payload || msgText || ''}\r\n${filePayload}` } }; } @@ -470,7 +470,7 @@ // @ts-ignore postback: { ...postback, - payload: `${postback?.payload || msgText || ''} ${filePayload}` + payload: `${postback?.payload || msgText || ''}\r\n${filePayload}` } }; } @@ -623,7 +623,7 @@ if (audioCount > 0) { fileStrs.push(`${audioCount} audio ${audioCount > 1 ? 'files' : 'file'}`); } - return prefix + fileStrs.join(' and '); + return prefix + fileStrs.join(' and ') + '.'; } function endChat() { @@ -1083,7 +1083,7 @@ {/if} {#if !!message.is_chat_message || !!message.has_message_files} - getConversationFiles(params.conversationId, message.message_id, FileSourceType.User)} /> @@ -1113,7 +1113,7 @@ {#if !!message.is_chat_message || !!message.has_message_files} - getConversationFiles(params.conversationId, message.message_id, FileSourceType.Bot)} /> diff --git a/src/routes/page/conversation/[conversationId]/conv-dialogs.svelte b/src/routes/page/conversation/[conversationId]/conv-dialogs.svelte index b1308d45..614303a6 100644 --- a/src/routes/page/conversation/[conversationId]/conv-dialogs.svelte +++ b/src/routes/page/conversation/[conversationId]/conv-dialogs.svelte @@ -7,7 +7,7 @@ import { _ } from 'svelte-i18n' import { USER_SENDERS } from '$lib/helpers/constants'; import Markdown from '$lib/common/Markdown.svelte'; - import MessageImageGallery from '$lib/common/MessageImageGallery.svelte'; + import MessageFileGallery from '$lib/common/MessageFileGallery.svelte'; import { FileSourceType } from '$lib/helpers/enums'; /** @type {import('$types').ChatResponseModel[]} */ @@ -70,7 +70,7 @@

{#if !!dialog.has_message_files} - getConversationFiles(conversation.id, dialog.message_id, showInRight(dialog) ? FileSourceType.User : FileSourceType.Bot)} />