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 @@ -279,15 +279,15 @@ export function ChatHistory({
279279 </ Link >
280280 ) }
281281 < Link
282- onClick = { isGenerating ? undefined : onNewConversation }
282+ onClick = { ( isGenerating || currentMessages . length === 0 ) ? undefined : onNewConversation }
283283 style = { {
284284 display : 'flex' ,
285285 alignItems : 'center' ,
286286 gap : '8px' ,
287287 fontSize : '13px' ,
288- color : isGenerating ? tokens . colorNeutralForegroundDisabled : tokens . colorNeutralForeground1 ,
289- cursor : isGenerating ? 'not-allowed' : 'pointer' ,
290- pointerEvents : isGenerating ? 'none' : 'auto' ,
288+ color : ( isGenerating || currentMessages . length === 0 ) ? tokens . colorNeutralForegroundDisabled : tokens . colorNeutralForeground1 ,
289+ cursor : ( isGenerating || currentMessages . length === 0 ) ? 'not-allowed' : 'pointer' ,
290+ pointerEvents : ( isGenerating || currentMessages . length === 0 ) ? 'none' : 'auto' ,
291291 } }
292292 >
293293 < 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