mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
loading
This commit is contained in:
parent
4bd6f4f8ac
commit
a33160f33e
1 changed files with 17 additions and 8 deletions
|
|
@ -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>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue