merged PR #5417: fix(openai): render native response images
# Conflicts: # packages/coding-agent/src/modes/components/chat-transcript-builder.ts # packages/coding-agent/test/agent-session-skill-keywords.test.ts
This commit is contained in:
@@ -58,10 +58,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