fix: small bug

stopped collapse from happen when no provider selected
This commit is contained in:
Dustin Loring 2024-12-07 16:27:37 -05:00
parent 66fe6a2efc
commit b6f6f187fd

View File

@ -476,6 +476,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
<SendButton <SendButton
show={input.length > 0 || isStreaming || uploadedFiles.length > 0} show={input.length > 0 || isStreaming || uploadedFiles.length > 0}
isStreaming={isStreaming} isStreaming={isStreaming}
disabled={enabledProviders.length === 0}
onClick={(event) => { onClick={(event) => {
if (isStreaming) { if (isStreaming) {
handleStop?.(); handleStop?.();
@ -535,6 +536,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
!isModelSettingsCollapsed, !isModelSettingsCollapsed,
})} })}
onClick={() => setIsModelSettingsCollapsed(!isModelSettingsCollapsed)} onClick={() => setIsModelSettingsCollapsed(!isModelSettingsCollapsed)}
disabled={enabledProviders.length === 0}
> >
<div className={`i-ph:caret-${isModelSettingsCollapsed ? 'right' : 'down'} text-lg`} /> <div className={`i-ph:caret-${isModelSettingsCollapsed ? 'right' : 'down'} text-lg`} />
{isModelSettingsCollapsed ? <span className="text-xs">{model}</span> : <span />} {isModelSettingsCollapsed ? <span className="text-xs">{model}</span> : <span />}