Refine Midjourney UX layout (#59)

Co-authored-by: Germey <germey@acedata.cloud>
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
authored and GitHub committed 2024-06-27 16:35:03 +00:00
1 parent 4938f097e0
commit 74cec8e429
50 files changed
+5797 -5833

No files matched your search

+7 -3
View File
@@ -27,9 +27,13 @@ class ChatOperator {
const lines = response.split('\r\n').filter((line: string) => !!line);
const lastLine = lines[lines.length - 1];
if (lastLine) {
const jsonData = JSON.parse(lastLine);
if (options?.stream) {
options?.stream(jsonData as IChatConversationResponse);
try {
const jsonData = JSON.parse(lastLine);
if (options?.stream) {
options?.stream(jsonData as IChatConversationResponse);
}
} catch (e) {
console.error(e);
}
}
}