@@ -131,6 +131,8 @@ import { EnhancedModelPickerActionItem } from './modelPickerActionItem2.js';
131131const $ = dom . $ ;
132132
133133const INPUT_EDITOR_MAX_HEIGHT = 250 ;
134+ const INPUT_EDITOR_LINE_HEIGHT = 20 ;
135+ const INPUT_EDITOR_PADDING = { compact : { top : 2 , bottom : 2 } , default : { top : 12 , bottom : 12 } } ;
134136const CachedLanguageModelsKey = 'chat.cachedLanguageModels.v2' ;
135137
136138export interface IChatInputStyles {
@@ -562,7 +564,8 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
562564 this . dnd = this . _register ( this . instantiationService . createInstance ( ChatDragAndDrop , ( ) => this . _widget , this . _attachmentModel , styles ) ) ;
563565
564566 this . inputEditorMaxHeight = this . options . renderStyle === 'compact' ? INPUT_EDITOR_MAX_HEIGHT / 3 : INPUT_EDITOR_MAX_HEIGHT ;
565- this . inputEditorMinHeight = this . options . inputEditorMinLines ? this . options . inputEditorMinLines * 20 + ( this . options . renderStyle === 'compact' ? 4 : 16 ) : undefined ; // lineHeight is 20, padding is top+bottom
567+ const padding = this . options . renderStyle === 'compact' ? INPUT_EDITOR_PADDING . compact : INPUT_EDITOR_PADDING . default ;
568+ this . inputEditorMinHeight = this . options . inputEditorMinLines ? this . options . inputEditorMinLines * INPUT_EDITOR_LINE_HEIGHT + padding . top + padding . bottom : undefined ;
566569
567570 this . inputEditorHasText = ChatContextKeys . inputHasText . bindTo ( contextKeyService ) ;
568571 this . chatCursorAtTop = ChatContextKeys . inputCursorAtTop . bindTo ( contextKeyService ) ;
@@ -2053,8 +2056,8 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
20532056 options . ariaLabel = this . _getAriaLabel ( ) ;
20542057 options . fontFamily = DEFAULT_FONT_FAMILY ;
20552058 options . fontSize = 13 ;
2056- options . lineHeight = 20 ;
2057- options . padding = this . options . renderStyle === 'compact' ? { top : 2 , bottom : 2 } : { top : 8 , bottom : 8 } ;
2059+ options . lineHeight = INPUT_EDITOR_LINE_HEIGHT ;
2060+ options . padding = this . options . renderStyle === 'compact' ? INPUT_EDITOR_PADDING . compact : INPUT_EDITOR_PADDING . default ;
20582061 options . cursorWidth = 1 ;
20592062 options . wrappingStrategy = 'advanced' ;
20602063 options . bracketPairColorization = { enabled : false } ;
0 commit comments