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.
2 parents 8cc24f1 + 5073e5e commit 68bd7feCopy full SHA for 68bd7fe
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