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
@@ -538,10 +538,28 @@ function extractFileContent(raw: string): string {
538
538
constidx=raw.indexOf(marker)
539
539
if(idx===-1)return''
540
540
letrest=raw.slice(idx+marker.length).trimStart()
541
-
if(rest.startsWith('"'))rest=rest.slice(1)
542
-
returnrest
541
+
if(!rest.startsWith('"'))returnrest
542
+
543
+
// Walk the JSON string value to find the unescaped closing quote.
544
+
// While streaming, the closing quote may not have arrived yet — in that
545
+
// case we treat everything received so far as the content (no trim).
0 commit comments