mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 10:07:14 +00:00
fix(comment): fix reply UI race condition and normalize session routing on agent reply
This commit is contained in:
@@ -35,7 +35,12 @@ type UploadingFile = {
|
||||
|
||||
interface ChatInputProps {
|
||||
projectId: string
|
||||
onSendMessage: (text: string, attachmentIds: string[], annotations?: Annotation[]) => void
|
||||
onSendMessage: (
|
||||
text: string,
|
||||
attachmentIds: string[],
|
||||
annotations?: Annotation[],
|
||||
replyToId?: string | null,
|
||||
) => void
|
||||
replyingTo?: CommentInfo | null
|
||||
onCancelReply?: () => void
|
||||
users?: UserInfo[]
|
||||
@@ -376,7 +381,7 @@ export const ChatInput = React.forwardRef<HTMLDivElement, ChatInputProps>(
|
||||
// Allow sending if annotations exist, even if text is empty
|
||||
if (!processedText && successfulAttachmentIds.length === 0 && annotations.length === 0) return
|
||||
|
||||
onSendMessage(processedText, successfulAttachmentIds, annotations)
|
||||
onSendMessage(processedText, successfulAttachmentIds, annotations, replyingTo?.id)
|
||||
|
||||
// Reset editor
|
||||
editorRef.current.innerHTML = ''
|
||||
|
||||
Reference in New Issue
Block a user