Skip to content

Commit f025a76

Browse files
tahierhussainclaude
andcommitted
fix: use meaningful React key for object messages
Extract display text from object messages for the key instead of getting "[object Object]" from string coercion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 06e58fe commit f025a76

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

frontend/src/ide/chat-ai/PromptInfo.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,10 @@ ${detailedError ? `\nDetailed Error:\n${detailedError}` : ""}
376376
itemClass += " warning";
377377
}
378378

379+
const msgKey = typeof msg === "object" && msg !== null ? msg.display : msg;
380+
379381
return (
380-
<div key={`${msg}-${index}`} className={itemClass}>
382+
<div key={`${msgKey}-${index}`} className={itemClass}>
381383
{parsed.icon && (
382384
<div className={`stage-icon ${parsed.stage}`}>
383385
{isInProgress ? <LoadingOutlined /> : parsed.icon}

0 commit comments

Comments
 (0)