Skip to content

Commit a4ef64a

Browse files
committed
fix(agent-tars): share serialize error with html artifacts
1 parent e18f4df commit a4ef64a

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

apps/agent-tars/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"@agent-infra/mcp-server-browser": "workspace:*"
4545
},
4646
"devDependencies": {
47+
"serialize-javascript": "6.0.2",
4748
"@modelcontextprotocol/sdk": "^1.7.0",
4849
"@electron-toolkit/preload": "^3.0.1",
4950
"@electron-toolkit/utils": "^4.0.0",

apps/agent-tars/src/main/ipcRoutes/action.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import fs, { readFile } from 'fs-extra';
1010
import { shell } from 'electron';
1111
import fetch from 'node-fetch';
1212
import FormData from 'form-data';
13+
import serialize from 'serialize-javascript';
1314
import {
1415
normalizeMessages,
1516
parseArtifacts,
@@ -145,7 +146,7 @@ export const actionRoute = t.router({
145146
.replace(
146147
' <!-- DATA -->',
147148
'<script>window.__OMEGA_REPORT_DATA__ = ' +
148-
JSON.stringify({
149+
serialize({
149150
messages,
150151
artifacts,
151152
}) +

pnpm-lock.yaml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)