@@ -9,6 +9,7 @@ import React, {
99
1010import { AgentBranchItem } from './agent-branch-item'
1111import { Button } from './button'
12+ import { CopyIconButton } from './copy-icon-button'
1213import { ImageCard } from './image-card'
1314import { MessageFooter } from './message-footer'
1415import { ValidationErrorPopover } from './validation-error-popover'
@@ -188,7 +189,7 @@ export const MessageBlock: React.FC<MessageBlockProps> = ({
188189 width : '100%' ,
189190 } }
190191 >
191- { /* User message timestamp with error indicator button (non-bash commands) */ }
192+ { /* User message timestamp with copy button and error indicator (non-bash commands) */ }
192193 { isUser && ! bashCwd && (
193194 < box style = { { flexDirection : 'row' , alignItems : 'center' , gap : 1 } } >
194195 < text
@@ -201,6 +202,8 @@ export const MessageBlock: React.FC<MessageBlockProps> = ({
201202 { `[${ timestamp } ]` }
202203 </ text >
203204
205+ < CopyIconButton textToCopy = { content } />
206+
204207 { validationErrors && validationErrors . length > 0 && (
205208 < Button
206209 onClick = { ( ) => setShowValidationPopover ( ! showValidationPopover ) }
@@ -218,7 +221,7 @@ export const MessageBlock: React.FC<MessageBlockProps> = ({
218221 </ box >
219222 ) }
220223
221- { /* Bash command metadata header (timestamp + cwd) - now for user messages with bashCwd */ }
224+ { /* Bash command metadata header (timestamp + copy button + cwd) */ }
222225 { bashCwd && (
223226 < box style = { { flexDirection : 'row' , alignItems : 'center' , gap : 1 } } >
224227 < text
@@ -230,6 +233,7 @@ export const MessageBlock: React.FC<MessageBlockProps> = ({
230233 >
231234 { `[${ timestamp } ]` }
232235 </ text >
236+ < CopyIconButton textToCopy = { content } />
233237 < text
234238 attributes = { TextAttributes . DIM }
235239 style = { {
0 commit comments