diff --git a/frontend/src/lib/components/AgentResultDisplay.svelte b/frontend/src/lib/components/AgentResultDisplay.svelte
index 237f85854a..dab8865f16 100644
--- a/frontend/src/lib/components/AgentResultDisplay.svelte
+++ b/frontend/src/lib/components/AgentResultDisplay.svelte
@@ -1,5 +1,4 @@
-
-
+
+ {#if view === 'transcript'}
+
+ {:else if textOutput !== undefined}
+ {#if textOutput === ''}
+
The agent returned no answer
+ {:else}
+
+
+ {/if}
+ {:else}
+ {@render structuredOutput(result.output)}
+ {/if}
+
+
-
{#if summary.toolCalls > 0}
{summary.toolCalls}
@@ -51,20 +65,4 @@
{formatTokenCount(summary.cachedTokens)} cached
{/if}
-
- {#if view === 'transcript'}
-
- {:else if textOutput !== undefined}
- {#if textOutput === ''}
-
The agent returned no answer
- {:else}
-
-
- {/if}
- {:else}
- {@render structuredOutput(result.output)}
- {/if}
diff --git a/frontend/src/lib/components/AgentTranscript.svelte b/frontend/src/lib/components/AgentTranscript.svelte
index 8c1b8ba02b..cc9ac194c8 100644
--- a/frontend/src/lib/components/AgentTranscript.svelte
+++ b/frontend/src/lib/components/AgentTranscript.svelte
@@ -19,8 +19,15 @@
let { messages, workspaceId }: Props = $props()
- let entries = $derived(buildTranscript(messages))
+ const all = $derived(buildTranscript(messages))
+ // The prompt is the run's configuration, not its opening line: it is the same
+ // on every run of the step, and reading the conversation from it buries what
+ // the user actually asked. Kept reachable, at the end.
+ const entries = $derived(all.filter((entry) => entry.kind !== 'system'))
+ const systemPrompt = $derived(all.find((entry) => entry.kind === 'system'))
+ // Out of the entry index space, since the prompt is rendered outside the list.
+ const SYSTEM_PROMPT_KEY = -1
let expanded = new SvelteSet
()
// A tool's own job holds what the envelope does not: its logs, how long it
// took, and whether it succeeded. Fetched when a row is opened rather than
@@ -89,16 +96,6 @@
{/if}
- {:else if entry.kind === 'system'}
-