From 0961b0c2c269a3e37617e3dc6340e665a463bb20 Mon Sep 17 00:00:00 2001
From: Jicheng Lu <103353@smsassist.com>
Date: Fri, 2 Aug 2024 17:25:54 -0500
Subject: [PATCH 1/2] refine append prompt
---
src/routes/chat/[agentId]/[conversationId]/chat-box.svelte | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte
index 5a02f5b..ae01277 100644
--- a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte
+++ b/src/routes/chat/[agentId]/[conversationId]/chat-box.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() {
From df17cbd1cb76f9ef71b816b24d9b975a99676aa7 Mon Sep 17 00:00:00 2001
From: Jicheng Lu <103353@smsassist.com>
Date: Fri, 2 Aug 2024 17:37:55 -0500
Subject: [PATCH 2/2] rename file
---
...MessageImageGallery.svelte => MessageFileGallery.svelte} | 0
src/routes/chat/[agentId]/[conversationId]/chat-box.svelte | 6 +++---
.../page/conversation/[conversationId]/conv-dialogs.svelte | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
rename src/lib/common/{MessageImageGallery.svelte => MessageFileGallery.svelte} (100%)
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 ae01277..5697170 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';
@@ -1083,7 +1083,7 @@