mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-26 19:48:58 +03:00
don't edit a chat message while a reply streams
The edit button stayed active while a reply streamed. `submitConversation` returns early while loading, but the message bubble still closed its editor, so the edit was silently lost. The edit button is hidden while a reply streams, and an editor that's already open keeps its draft with send disabled until the reply ends.
This commit is contained in:
@@ -133,7 +133,7 @@ export function MessageBubble({
|
||||
variant="select"
|
||||
size="icon"
|
||||
className="size-9 rounded-full"
|
||||
disabled={!draftContent.trim()}
|
||||
disabled={!draftContent.trim() || onEditSubmit == null}
|
||||
onClick={handleEditSubmit}
|
||||
aria-label={t("send")}
|
||||
>
|
||||
|
||||
@@ -362,7 +362,7 @@ export default function ChatPage() {
|
||||
role="user"
|
||||
content={msg.content}
|
||||
messageIndex={i}
|
||||
onEditSubmit={handleEditSubmit}
|
||||
onEditSubmit={isLoading ? undefined : handleEditSubmit}
|
||||
isComplete
|
||||
showStats={showStats}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user