@@ -189,6 +189,7 @@ export function ChatHistory({
189189 isActive = { conversation . id === currentConversationId }
190190 onSelect = { ( ) => onSelectConversation ( conversation . id ) }
191191 showMenu = { index === 0 }
192+ disabled = { isGenerating }
192193 />
193194 ) ) }
194195 </ >
@@ -210,10 +211,12 @@ export function ChatHistory({
210211 } } >
211212 { hasMore && (
212213 < Link
213- onClick = { ( ) => setShowAll ( ! showAll ) }
214+ onClick = { isGenerating ? undefined : ( ) => setShowAll ( ! showAll ) }
214215 style = { {
215216 fontSize : '13px' ,
216- color : tokens . colorBrandForeground1 ,
217+ color : isGenerating ? tokens . colorNeutralForegroundDisabled : tokens . colorBrandForeground1 ,
218+ cursor : isGenerating ? 'not-allowed' : 'pointer' ,
219+ pointerEvents : isGenerating ? 'none' : 'auto' ,
217220 } }
218221 >
219222 { showAll ? 'Show less' : 'See all' }
@@ -245,24 +248,26 @@ interface ConversationItemProps {
245248 isActive : boolean ;
246249 onSelect : ( ) => void ;
247250 showMenu ?: boolean ;
251+ disabled ?: boolean ;
248252}
249253
250254function ConversationItem ( {
251255 conversation,
252256 isActive,
253257 onSelect,
254258 showMenu = false ,
259+ disabled = false ,
255260} : ConversationItemProps ) {
256261 const [ isHovered , setIsHovered ] = useState ( false ) ;
257262
258263 return (
259264 < div
260- onClick = { onSelect }
265+ onClick = { disabled ? undefined : onSelect }
261266 onMouseEnter = { ( ) => setIsHovered ( true ) }
262267 onMouseLeave = { ( ) => setIsHovered ( false ) }
263268 style = { {
264269 padding : '8px' ,
265- cursor : 'pointer' ,
270+ cursor : disabled ? 'not-allowed' : 'pointer' ,
266271 display : 'flex' ,
267272 alignItems : 'center' ,
268273 justifyContent : 'space-between' ,
@@ -277,6 +282,8 @@ function ConversationItem({
277282 marginLeft : '-8px' ,
278283 marginRight : '-8px' ,
279284 transition : 'background-color 0.15s, border-color 0.15s' ,
285+ opacity : disabled ? 0.5 : 1 ,
286+ pointerEvents : disabled ? 'none' : 'auto' ,
280287 } }
281288 >
282289 < Text
0 commit comments