From ea75ded53b39769d9d4ef26e1dc6d27787c5cc44 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Fri, 11 Sep 2026 12:03:49 +0200 Subject: [PATCH] feat: show the partial transcript a max-iterations failure carries Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/lib/components/DisplayResult.svelte | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/DisplayResult.svelte b/frontend/src/lib/components/DisplayResult.svelte index 038f2ed726..385d7f14b5 100644 --- a/frontend/src/lib/components/DisplayResult.svelte +++ b/frontend/src/lib/components/DisplayResult.svelte @@ -58,7 +58,8 @@ import type { MarkupTrust } from './apps/markupTrust' import AgentResultDisplay from './AgentResultDisplay.svelte' import AgentStreamDisplay from './AgentStreamDisplay.svelte' - import { isAgentStream, parseAgentResult } from './aiAgentResult' + import AgentTranscript from './AgentTranscript.svelte' + import { isAgentStream, parseAgentErrorMessages, parseAgentResult } from './aiAgentResult' const TABLE_MAX_SIZE = 5000000 const DISPLAY_MAX_SIZE = 100000 @@ -165,6 +166,8 @@ let s3FileDisplayRawMode = $state(false) /** Which half of an agent result is showing; JSON is `forceJson`, as for any kind. */ let agentView: 'answer' | 'transcript' = $state('answer') + /** The partial conversation a max-iterations failure carries, if this is one. */ + let agentErrorMessages = $derived(parseAgentErrorMessages(result)) // Build the image/PDF source URL for an S3 object. When `appPath` is set // (deployed app view) the read is authorized on-behalf of the app author via @@ -1019,6 +1022,16 @@ {/if} {@render children?.()} + {#if agentErrorMessages} + +
+ Transcript + +
+ {/if} {#if !isTest && language === 'bun'}