This commit is contained in:
Mathew Pareles 2025-03-15 04:19:58 -07:00
parent 4bd6f4f8ac
commit a33160f33e

View file

@ -268,6 +268,7 @@ interface VoidChatAreaProps {
showModelDropdown?: boolean; showModelDropdown?: boolean;
showSelections?: boolean; showSelections?: boolean;
showProspectiveSelections?: boolean; showProspectiveSelections?: boolean;
loadingIcon?: React.ReactNode;
selections?: StagingSelectionItem[] selections?: StagingSelectionItem[]
setSelections?: (s: StagingSelectionItem[]) => void setSelections?: (s: StagingSelectionItem[]) => void
@ -297,6 +298,7 @@ export const VoidChatArea: React.FC<VoidChatAreaProps> = ({
selections, selections,
setSelections, setSelections,
featureName, featureName,
loadingIcon,
}) => { }) => {
return ( return (
<div <div
@ -359,14 +361,21 @@ export const VoidChatArea: React.FC<VoidChatAreaProps> = ({
</div> </div>
)} )}
{isStreaming ? (
<ButtonStop onClick={onAbort} /> <div className="flex items-center gap-2">
) : (
<ButtonSubmit {isStreaming && loadingIcon}
onClick={onSubmit}
disabled={isDisabled} {isStreaming ? (
/> <ButtonStop onClick={onAbort} />
)} ) : (
<ButtonSubmit
onClick={onSubmit}
disabled={isDisabled}
/>
)}
</div>
</div> </div>
</div> </div>
); );