You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx
+20-2Lines changed: 20 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -460,10 +460,28 @@ function extractFileContent(raw: string): string {
460
460
constidx=raw.indexOf(marker)
461
461
if(idx===-1)return''
462
462
letrest=raw.slice(idx+marker.length).trimStart()
463
-
if(rest.startsWith('"'))rest=rest.slice(1)
464
-
returnrest
463
+
if(!rest.startsWith('"'))returnrest
464
+
465
+
// Walk the JSON string value to find the unescaped closing quote.
466
+
// While streaming, the closing quote may not have arrived yet — in that
467
+
// case we treat everything received so far as the content (no trim).
0 commit comments