diff options
| author | Adam <[email protected]> | 2025-10-31 10:08:24 -0500 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-10-31 10:08:24 -0500 |
| commit | a8bf1ad40f9aa48c8207d92ce3fee794f9d38279 (patch) | |
| tree | b5ff27faa0610af0e74b48b20ce84ab1615ba9da /packages/desktop/src/context | |
| parent | 0ac943de909fb5a685a608d7894248cdd3a9e129 (diff) | |
| download | opencode-a8bf1ad40f9aa48c8207d92ce3fee794f9d38279.tar.gz opencode-a8bf1ad40f9aa48c8207d92ce3fee794f9d38279.zip | |
wip: desktop work
Diffstat (limited to 'packages/desktop/src/context')
| -rw-r--r-- | packages/desktop/src/context/sync.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/desktop/src/context/sync.tsx b/packages/desktop/src/context/sync.tsx index ce2fa1ea4..c60206b0b 100644 --- a/packages/desktop/src/context/sync.tsx +++ b/packages/desktop/src/context/sync.tsx @@ -124,7 +124,7 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({ const absolute = (path: string) => (store.path.directory + "/" + path).replace("//", "/") const sanitizePart = (part: Part) => { if (part.type === "tool") { - if (part.state.status === "completed") { + if (part.state.status === "completed" || part.state.status === "error") { for (const key in part.state.metadata) { if (typeof part.state.metadata[key] === "string") { part.state.metadata[key] = sanitize(part.state.metadata[key] as string) @@ -135,6 +135,9 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({ part.state.input[key] = sanitize(part.state.input[key] as string) } } + if ("error" in part.state) { + part.state.error = sanitize(part.state.error as string) + } } } return part |
