Skip to content

Commit 87dd06d

Browse files
author
Jicheng Lu
committed
minor change
1 parent 8a6ff6c commit 87dd06d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/routes/chat/[agentId]/[conversationId]/chat-box.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
const maxTextLength = 64000;
9393
const duration = 2000;
9494
const MESSAGE_STORAGE_KEY = 'message_draft_';
95+
const IMAGE_DATA_PREFIX = 'data:image';
9596
9697
/** @type {import('$agentTypes').AgentModel} */
9798
export let agent;
@@ -1658,7 +1659,7 @@
16581659
{#if !!message.post_action_disclaimer}
16591660
<RcDisclaimer content={message.post_action_disclaimer} />
16601661
{/if}
1661-
{#if !!message.is_chat_message || !!message.has_message_files || message?.data?.startsWith("data:image")}
1662+
{#if !!message.is_chat_message || !!message.has_message_files || message?.data?.startsWith(IMAGE_DATA_PREFIX)}
16621663
<MessageFileGallery
16631664
message={message}
16641665
appendImage
@@ -1757,7 +1758,7 @@
17571758
</div>
17581759
</div>
17591760
{/if}
1760-
{#if !!message.is_chat_message || !!message.has_message_files || message?.data?.startsWith("data:image")}
1761+
{#if !!message.is_chat_message || !!message.has_message_files || message?.data?.startsWith(IMAGE_DATA_PREFIX)}
17611762
<MessageFileGallery
17621763
message={message}
17631764
appendImage

0 commit comments

Comments
 (0)