Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(agents): stop showing program errors on failed workspace activity (#9910)

Eric Hayes4f179000c8b1
diff --git a/apps/web/src/features/block-agent/component/parts/CodeExecutionToolCall.tsx b/apps/web/src/features/block-agent/component/parts/CodeExecutionToolCall.tsx
index c81509eb5b..27c7b5da4f 100644
--- a/apps/web/src/features/block-agent/component/parts/CodeExecutionToolCall.tsx
+++ b/apps/web/src/features/block-agent/component/parts/CodeExecutionToolCall.tsx
@@ -20,7 +20,9 @@ export function CodeExecutionToolCall(props: {
}) {
const calls = () => props.record?.calls ?? [];
const activity = () => props.record?.activity ?? [];
- const errorVisible = () =>
+ // The error text is written for the agent, which reads it and retries; the
+ // person watching only sees that the program ended badly.
+ const ended = () =>
Boolean(
props.error &&
(props.record?.status !== 'running' ||
@@ -34,7 +36,7 @@ export function CodeExecutionToolCall(props: {
return (
<div class="min-w-0" data-code-execution={props.record?.executionId}>
- <Show when={activity().length === 0 || errorVisible()}>
+ <Show when={activity().length === 0 || ended()}>
<ToolCard
title="Workspace activity"
status={props.common.status}
@@ -47,12 +49,7 @@ export function CodeExecutionToolCall(props: {
? 'Working in your workspace…'
: undefined)
}
- hasContent={errorVisible()}
- >
- <Show when={errorVisible()}>
- <p class="mt-2 text-ink-muted">{props.error}</p>
- </Show>
- </ToolCard>
+ />
</Show>
<Show when={activity().length > 0}>
<LiveToolGroup