File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 color : @term-bright-green ;
1111 font-weight : bold ;
1212 width : 100px ;
13+ flex-shrink : 0 ;
1314 }
1415
1516 .openai-role.openai-role-assistant {
3334 color : @term-bright-red ;
3435 }
3536 }
37+
38+ overflow-y : auto ;
3639}
Original file line number Diff line number Diff line change @@ -196,7 +196,6 @@ class OpenAIRenderer extends React.Component<{ model: OpenAIRendererModel }> {
196196 }
197197 let message = output . message ;
198198 let opts = model . opts ;
199- let maxWidth = opts . maxSize . width ;
200199 let minWidth = opts . maxSize . width ;
201200 if ( minWidth > 1000 ) {
202201 minWidth = 1000 ;
@@ -206,12 +205,9 @@ class OpenAIRenderer extends React.Component<{ model: OpenAIRendererModel }> {
206205 < div className = "openai-role openai-role-assistant" > [assistant]</ div >
207206 < div className = "openai-content-assistant" >
208207 < div
209- className = "scroller"
210208 style = { {
211209 maxHeight : opts . maxSize . height ,
212- minWidth : minWidth ,
213- width : "min-content" ,
214- maxWidth : maxWidth ,
210+ paddingRight : 5
215211 } }
216212 >
217213 < Markdown text = { message } style = { { maxHeight : opts . maxSize . height } } />
@@ -240,7 +236,19 @@ class OpenAIRenderer extends React.Component<{ model: OpenAIRendererModel }> {
240236 let cmd = model . rawCmd ;
241237 let styleVal : Record < string , any > = null ;
242238 if ( model . loading . get ( ) && model . savedHeight >= 0 && model . isDone ) {
243- styleVal = { height : model . savedHeight } ;
239+ styleVal = {
240+ height : model . savedHeight ,
241+ maxHeight : model . opts . maxSize . height
242+ } ;
243+ } else {
244+ let maxWidth = model . opts . maxSize . width
245+ if ( maxWidth > 1000 ) {
246+ maxWidth = 1000
247+ }
248+ styleVal = {
249+ maxWidth : maxWidth ,
250+ maxHeight : model . opts . maxSize . height
251+ } ;
244252 }
245253 let version = model . version . get ( ) ;
246254 let loadError = model . loadError . get ( ) ;
You can’t perform that action at this time.
0 commit comments