We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a3ce09 commit 5073e5eCopy full SHA for 5073e5e
src/frontend/src/helpers/helpers.ts
@@ -28,6 +28,11 @@ export const parseCitationFromMessage = (message: ChatMessage) => {
28
29
export const cleanJSON = (jsonString: string) => {
30
try {
31
+ // Check if the string contains JSON-like patterns before processing
32
+ if (!jsonString.includes('{') || !jsonString.includes('}')) {
33
+ return ''
34
+ }
35
+
36
let lines: string[]
37
let cleanString = ''
38
lines = jsonString.split('\n')
0 commit comments