修正外部任务摘要状态读取边界

移除从轻量任务摘要读取主任务结果载荷的错误实现。

画布 Agent 继续轮询摘要状态,并通过画布完成回写刷新工程结果。
This commit is contained in:
2026-07-13 15:01:34 +08:00
parent 7f6d5722be
commit 4e0c0c8cd9
11 changed files with 9 additions and 92 deletions
@@ -111,26 +111,6 @@ function ToolCallView({
};
}, [onJobCompleted, toolCall.externalJobId]);
const effectiveJobStatus = jobStatus ?? resolvedJob?.status ?? null;
const generationResult =
resolvedJob?.result && typeof resolvedJob.result === 'object'
? (resolvedJob.result as Record<string, unknown>)
: null;
const resultImageSrc =
typeof generationResult?.imageSrc === 'string'
? generationResult.imageSrc
: null;
const resultVideoSrc =
typeof generationResult?.videoSrc === 'string'
? generationResult.videoSrc
: null;
const resultAudioSrc =
typeof generationResult?.audioSrc === 'string'
? generationResult.audioSrc
: null;
const resultObjectKey =
typeof generationResult?.objectKey === 'string'
? generationResult.objectKey
: null;
const isCancelled = Boolean(toolCall.cancelledAt);
const isExecuting =
effectiveJobStatus === 'queued' || effectiveJobStatus === 'running';
@@ -181,16 +161,6 @@ function ToolCallView({
</div>
))}
</div>
) : resultImageSrc ? (
<div className="mt-2 overflow-hidden rounded-xl border border-slate-200 bg-slate-100">
<ResolvedAssetImage
src={resultImageSrc}
objectKey={resultObjectKey}
refreshKey={toolCall.externalJobId ?? toolCall.toolName}
alt=""
className="h-20 w-full object-cover"
/>
</div>
) : null}
{videos.length ? (
<div className="mt-2 grid grid-cols-1 gap-2">
@@ -214,16 +184,6 @@ function ToolCallView({
</div>
))}
</div>
) : resultVideoSrc ? (
<ResolvedAssetVideo
src={resultVideoSrc}
objectKey={resultObjectKey}
refreshKey={toolCall.externalJobId ?? toolCall.toolName}
controls
playsInline
preload="metadata"
className="mt-2 max-h-56 w-full rounded-xl bg-black object-contain"
/>
) : null}
{audios.length ? (
<div className="mt-2 space-y-2">
@@ -249,15 +209,6 @@ function ToolCallView({
</div>
))}
</div>
) : resultAudioSrc ? (
<ResolvedAssetAudio
src={resultAudioSrc}
objectKey={resultObjectKey}
refreshKey={toolCall.externalJobId ?? toolCall.toolName}
controls
preload="metadata"
className="mt-2 w-full"
/>
) : null}
</div>
);