File tree Expand file tree Collapse file tree
content-gen/src/app/frontend/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -336,15 +336,15 @@ export function ChatHistory({
336336 </ Link >
337337 ) }
338338 < Link
339- onClick = { isGenerating ? undefined : onNewConversation }
339+ onClick = { ( isGenerating || currentMessages . length === 0 ) ? undefined : onNewConversation }
340340 style = { {
341341 display : 'flex' ,
342342 alignItems : 'center' ,
343343 gap : '8px' ,
344344 fontSize : '13px' ,
345- color : isGenerating ? tokens . colorNeutralForegroundDisabled : tokens . colorNeutralForeground1 ,
346- cursor : isGenerating ? 'not-allowed' : 'pointer' ,
347- pointerEvents : isGenerating ? 'none' : 'auto' ,
345+ color : ( isGenerating || currentMessages . length === 0 ) ? tokens . colorNeutralForegroundDisabled : tokens . colorNeutralForeground1 ,
346+ cursor : ( isGenerating || currentMessages . length === 0 ) ? 'not-allowed' : 'pointer' ,
347+ pointerEvents : ( isGenerating || currentMessages . length === 0 ) ? 'none' : 'auto' ,
348348 } }
349349 >
350350 < Compose20Regular />
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ export function ChatPanel({
286286 icon = { < Add20Regular /> }
287287 size = "small"
288288 onClick = { onNewConversation }
289- disabled = { isLoading }
289+ disabled = { isLoading || messages . length === 0 }
290290 style = { {
291291 minWidth : '32px' ,
292292 height : '32px' ,
You can’t perform that action at this time.
0 commit comments