@@ -443,74 +443,47 @@ export default function AgentConfigurationSection({
443443 ) ;
444444
445445 const renderDutyContent = ( ) => (
446- < div className = "relative p-4" >
447- < button onClick = { ( ) => onExpandCard ?.( 2 ) }
448- className = "absolute top-2 right-4 z-10 p-1.5 rounded-full bg-white/90 hover:bg-white text-gray-500 hover:text-gray-700 transition-all duration-200 shadow-sm hover:shadow-md"
449- style = { { border : "none" } }
450- title = { t ( 'systemPrompt.button.expand' ) }
451- >
452- < ExpandAltOutlined className = "text-xs" />
453- </ button >
454- < div className = "pr-4" >
455- < SimplePromptEditor
456- value = { localDutyContent }
457- onChange = { ( value : string ) => {
458- setLocalDutyContent ( value ) ;
459- // Immediate update to parent component
460- if ( onDutyContentChange ) {
461- onDutyContentChange ( value ) ;
462- }
463- } }
464- />
465- </ div >
446+ < div className = "p-1" >
447+ < SimplePromptEditor
448+ value = { localDutyContent }
449+ onChange = { ( value : string ) => {
450+ setLocalDutyContent ( value ) ;
451+ // Immediate update to parent component
452+ if ( onDutyContentChange ) {
453+ onDutyContentChange ( value ) ;
454+ }
455+ } }
456+ />
466457 </ div >
467458 ) ;
468459
469460 const renderConstraintContent = ( ) => (
470- < div className = "relative p-4" >
471- < button onClick = { ( ) => onExpandCard ?.( 3 ) }
472- className = "absolute top-2 right-4 z-10 p-1.5 rounded-full bg-white/90 hover:bg-white text-gray-500 hover:text-gray-700 transition-all duration-200 shadow-sm hover:shadow-md"
473- style = { { border : "none" } }
474- title = { t ( 'systemPrompt.button.expand' ) }
475- >
476- < ExpandAltOutlined className = "text-xs" />
477- </ button >
478- < div className = "pr-4" >
479- < SimplePromptEditor
480- value = { localConstraintContent }
481- onChange = { ( value : string ) => {
482- setLocalConstraintContent ( value ) ;
483- // Immediate update to parent component
484- if ( onConstraintContentChange ) {
485- onConstraintContentChange ( value ) ;
486- }
487- } }
488- />
489- </ div >
461+ < div className = "p-1" >
462+ < SimplePromptEditor
463+ value = { localConstraintContent }
464+ onChange = { ( value : string ) => {
465+ setLocalConstraintContent ( value ) ;
466+ // Immediate update to parent component
467+ if ( onConstraintContentChange ) {
468+ onConstraintContentChange ( value ) ;
469+ }
470+ } }
471+ />
490472 </ div >
491473 ) ;
492474
493475 const renderFewShotsContent = ( ) => (
494- < div className = "relative p-4" >
495- < button onClick = { ( ) => onExpandCard ?.( 4 ) }
496- className = "absolute top-2 right-4 z-10 p-1.5 rounded-full bg-white/90 hover:bg-white text-gray-500 hover:text-gray-700 transition-all duration-200 shadow-sm hover:shadow-md"
497- style = { { border : "none" } }
498- title = { t ( 'systemPrompt.button.expand' ) }
499- >
500- < ExpandAltOutlined className = "text-xs" />
501- </ button >
502- < div className = "pr-4" >
503- < SimplePromptEditor
504- value = { localFewShotsContent }
505- onChange = { ( value : string ) => {
506- setLocalFewShotsContent ( value ) ;
507- // Immediate update to parent component
508- if ( onFewShotsContentChange ) {
509- onFewShotsContentChange ( value ) ;
510- }
511- } }
512- />
513- </ div >
476+ < div className = "p-1" >
477+ < SimplePromptEditor
478+ value = { localFewShotsContent }
479+ onChange = { ( value : string ) => {
480+ setLocalFewShotsContent ( value ) ;
481+ // Immediate update to parent component
482+ if ( onFewShotsContentChange ) {
483+ onFewShotsContentChange ( value ) ;
484+ }
485+ } }
486+ />
514487 </ div >
515488 ) ;
516489
@@ -589,7 +562,23 @@ export default function AgentConfigurationSection({
589562 </ div >
590563
591564 { /* Content area - flexible height */ }
592- < div className = "flex-1 bg-white border border-gray-200 rounded-lg shadow-sm overflow-hidden w-full max-w-4xl mx-auto min-h-0" >
565+ < div className = "flex-1 bg-white border border-gray-200 rounded-lg shadow-sm overflow-hidden w-full max-w-4xl mx-auto min-h-0 relative" >
566+ { /* Floating expand buttons - positioned outside scrollable content */ }
567+ { ( activeSegment === 'duty' || activeSegment === 'constraint' || activeSegment === 'few-shots' ) && (
568+ < button
569+ onClick = { ( ) => {
570+ if ( activeSegment === 'duty' ) onExpandCard ?.( 2 ) ;
571+ else if ( activeSegment === 'constraint' ) onExpandCard ?.( 3 ) ;
572+ else if ( activeSegment === 'few-shots' ) onExpandCard ?.( 4 ) ;
573+ } }
574+ className = "absolute top-2 right-4 z-20 p-1.5 rounded-full bg-white/90 hover:bg-white text-gray-500 hover:text-gray-700 transition-all duration-200 shadow-sm hover:shadow-md"
575+ style = { { border : "none" } }
576+ title = { t ( 'systemPrompt.button.expand' ) }
577+ >
578+ < ExpandAltOutlined className = "text-xs" />
579+ </ button >
580+ ) }
581+
593582 < style jsx global > { `
594583 /* Custom scrollbar styles for better UX */
595584 .milkdown-editor-container .milkdown {
@@ -736,7 +725,7 @@ export default function AgentConfigurationSection({
736725 }
737726 ` } </ style >
738727
739- < div className = "content-scroll h-full overflow-y-auto agent-config-content" >
728+ < div className = "content-scroll h-full w-full overflow-y-auto agent-config-content" >
740729 { /* Agent Info */ }
741730 { activeSegment === 'agent-info' && (
742731 < div >
0 commit comments