@@ -109,6 +109,9 @@ export class PromptEditDialog {
109109 background-color: var(--color-background);
110110 max-width: 90vw;
111111 max-height: 90vh;
112+ display: flex;
113+ flex-direction: column;
114+ overflow: hidden;
112115 }
113116
114117 .prompt-edit-content {
@@ -118,6 +121,16 @@ export class PromptEditDialog {
118121 height: 100%;
119122 min-width: 600px;
120123 min-height: 500px;
124+ overflow: hidden;
125+ }
126+
127+ .prompt-edit-body {
128+ flex: 1 1 auto;
129+ height: 0;
130+ overflow: hidden;
131+ display: flex;
132+ flex-direction: column;
133+ position: relative;
121134 }
122135
123136 .prompt-edit-header {
@@ -127,6 +140,9 @@ export class PromptEditDialog {
127140 padding: 16px 20px;
128141 border-bottom: 1px solid var(--color-details-hairline);
129142 flex-shrink: 0;
143+ background-color: var(--color-background);
144+ position: relative;
145+ z-index: 10;
130146 }
131147
132148 .prompt-edit-title {
@@ -160,19 +176,30 @@ export class PromptEditDialog {
160176 .prompt-edit-section {
161177 padding: 16px 20px;
162178 border-bottom: 1px solid var(--color-details-hairline);
179+ flex-shrink: 0;
180+ }
181+
182+ .prompt-edit-section-main {
183+ flex: 1;
184+ min-height: 0;
185+ display: flex;
186+ flex-direction: column;
187+ overflow: hidden;
163188 }
164189
165190 .prompt-edit-label {
166191 font-size: 14px;
167192 font-weight: 500;
168193 margin-bottom: 6px;
169194 color: var(--color-text-primary);
195+ flex-shrink: 0;
170196 }
171197
172198 .prompt-edit-hint {
173199 font-size: 12px;
174200 color: var(--color-text-secondary);
175201 margin-bottom: 8px;
202+ flex-shrink: 0;
176203 }
177204
178205 .prompt-edit-agent-value {
@@ -209,9 +236,10 @@ export class PromptEditDialog {
209236 font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
210237 font-size: 13px;
211238 line-height: 1.4;
212- resize: vertical ;
239+ resize: none ;
213240 box-sizing: border-box;
214- min-height: 300px;
241+ flex: 1;
242+ min-height: 0;
215243 }
216244
217245 .prompt-edit-textarea:focus {
@@ -250,6 +278,9 @@ export class PromptEditDialog {
250278 padding: 16px 20px;
251279 border-top: 1px solid var(--color-details-hairline);
252280 flex-shrink: 0;
281+ background-color: var(--color-background);
282+ position: relative;
283+ z-index: 10;
253284 }
254285
255286 .prompt-edit-button {
@@ -333,10 +364,15 @@ export class PromptEditDialog {
333364
334365 headerDiv . appendChild ( closeButton ) ;
335366
367+ // Body container
368+ const bodyDiv = document . createElement ( 'div' ) ;
369+ bodyDiv . className = 'prompt-edit-body' ;
370+ contentDiv . appendChild ( bodyDiv ) ;
371+
336372 // Agent type display
337373 const agentSection = document . createElement ( 'div' ) ;
338374 agentSection . className = 'prompt-edit-section' ;
339- contentDiv . appendChild ( agentSection ) ;
375+ bodyDiv . appendChild ( agentSection ) ;
340376
341377 const agentLabel = document . createElement ( 'div' ) ;
342378 agentLabel . className = 'prompt-edit-label' ;
@@ -358,8 +394,8 @@ export class PromptEditDialog {
358394
359395 // Prompt editing section
360396 const promptSection = document . createElement ( 'div' ) ;
361- promptSection . className = 'prompt-edit-section' ;
362- contentDiv . appendChild ( promptSection ) ;
397+ promptSection . className = 'prompt-edit-section prompt-edit-section-main ' ;
398+ bodyDiv . appendChild ( promptSection ) ;
363399
364400 const promptLabel = document . createElement ( 'div' ) ;
365401 promptLabel . className = 'prompt-edit-label' ;
@@ -374,8 +410,9 @@ export class PromptEditDialog {
374410 const promptTextarea = document . createElement ( 'textarea' ) ;
375411 promptTextarea . className = 'prompt-edit-textarea' ;
376412 promptTextarea . value = options . currentPrompt ;
377- promptTextarea . rows = DIALOG_CONSTANTS . TEXTAREA_ROWS ;
378- promptTextarea . cols = DIALOG_CONSTANTS . TEXTAREA_COLS ;
413+ // Let CSS handle sizing
414+ // promptTextarea.rows = DIALOG_CONSTANTS.TEXTAREA_ROWS;
415+ // promptTextarea.cols = DIALOG_CONSTANTS.TEXTAREA_COLS;
379416 promptTextarea . setAttribute ( 'aria-label' , i18nString ( UIStrings . promptLabel ) ) ;
380417 promptTextarea . setAttribute ( 'aria-describedby' , 'prompt-hint' ) ;
381418 promptHint . id = 'prompt-hint' ;
@@ -386,7 +423,7 @@ export class PromptEditDialog {
386423 statusMessage . className = 'prompt-edit-status-message' ;
387424 statusMessage . setAttribute ( 'role' , 'status' ) ;
388425 statusMessage . setAttribute ( 'aria-live' , 'polite' ) ;
389- contentDiv . appendChild ( statusMessage ) ;
426+ bodyDiv . appendChild ( statusMessage ) ;
390427
391428 let statusTimeout : number | null = null ;
392429 const showStatus = ( message : string , type : 'success' | 'error' ) : void => {
0 commit comments