Refine Midjourney UX layout (#59)
Co-authored-by: Germey <germey@acedata.cloud> Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
50 files changed
+5797
-5833
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user