fix(openai): rendered native response images
- Normalized completed image_generation_call results into assistant image blocks. - Persisted image bytes through the session blob store and rendered them in live, replay, ACP, proxy, telemetry, and HTML paths. - Added response normalization, persistence, and TUI rendering regressions. Fixes #4768
This commit is contained in:
@@ -57,10 +57,11 @@ function getMessageText(message: AgentMessage): string {
|
||||
if (!("content" in message)) return "";
|
||||
if (typeof message.content === "string") return message.content;
|
||||
if (!Array.isArray(message.content)) return "";
|
||||
return message.content
|
||||
.filter(isTextContentBlock)
|
||||
.map(content => content.text)
|
||||
.join("\n");
|
||||
const text: string[] = [];
|
||||
for (const content of message.content) {
|
||||
if (isTextContentBlock(content)) text.push(content.text);
|
||||
}
|
||||
return text.join("\n");
|
||||
}
|
||||
|
||||
function createAssistantResponse(text: string) {
|
||||
|
||||
Reference in New Issue
Block a user