@@ -348,38 +348,60 @@ const AgentDetailContent: React.FC<AgentDetailContentProps> = ({ name, history }
348348 < div className = "agent-prompts agent-prompts-compact" >
349349 { introBlocks . openingQuestions . length > 0 ? (
350350 introBlocks . openingQuestions . map (
351- ( item : any , index : number ) => (
352- < Card
353- key = { `${ item . title } -${ index } ` }
354- size = "small"
355- className = "agent-intro-panel agent-question-card"
356- >
357- < div className = "agent-question-card-body" >
358- < div className = "agent-intro-icon-wrap is-question" >
359- < QuestionCircleOutlined />
351+ ( item : any , index : number ) => {
352+ const promptText =
353+ typeof item === 'string'
354+ ? item
355+ : item ?. prompt || item ?. title || '' ;
356+ return (
357+ < Card
358+ key = { `${
359+ item . title || index
360+ } -${ index } `}
361+ size = "small"
362+ className = "agent-intro-panel agent-question-card"
363+ >
364+ < div className = "agent-question-card-body" >
365+ < div className = "agent-intro-icon-wrap is-question" >
366+ < QuestionCircleOutlined />
367+ </ div >
368+ < Tooltip title = "点击复制" >
369+ < div
370+ className = "agent-question-copy"
371+ onClick = { ( event ) => {
372+ event . stopPropagation ( ) ;
373+ // 点击提示词文本区域直接复制到剪贴板
374+ if ( promptText ) {
375+ copyToClipboard (
376+ promptText ,
377+ '复制成功'
378+ ) ;
379+ }
380+ } }
381+ >
382+ < Paragraph >
383+ { promptText }
384+ </ Paragraph >
385+ </ div >
386+ </ Tooltip >
387+ < Button
388+ size = "small"
389+ className = "agent-question-quick-use"
390+ icon = {
391+ < span className = "agent-question-quick-use-icon" >
392+ < CodeOutlined />
393+ </ span >
394+ }
395+ onClick = { ( ) =>
396+ openCodexInstall ( item )
397+ }
398+ >
399+ 快捷使用
400+ </ Button >
360401 </ div >
361- < div className = "agent-question-copy" >
362- < Paragraph >
363- { item . prompt }
364- </ Paragraph >
365- </ div >
366- < Button
367- size = "small"
368- className = "agent-question-quick-use"
369- icon = {
370- < span className = "agent-question-quick-use-icon" >
371- < CodeOutlined />
372- </ span >
373- }
374- onClick = { ( ) =>
375- openCodexInstall ( item )
376- }
377- >
378- 快捷使用
379- </ Button >
380- </ div >
381- </ Card >
382- )
402+ </ Card >
403+ ) ;
404+ }
383405 )
384406 ) : (
385407 < Empty
0 commit comments