input comment should not cancel comment mode

This commit is contained in:
hjlarry 2025-09-23 14:48:31 +08:00
parent 47aba1c9f9
commit 48cd7e6481
1 changed files with 2 additions and 5 deletions

View File

@ -113,19 +113,16 @@ export const useWorkflowComment = () => {
await loadComments()
setPendingComment(null)
setControlMode(ControlMode.Pointer)
}
catch (error) {
console.error('Failed to create comment:', error)
setPendingComment(null)
setControlMode(ControlMode.Pointer)
}
}, [appId, pendingComment, setControlMode, setPendingComment, loadComments, reactflow])
}, [appId, pendingComment, setPendingComment, loadComments, reactflow])
const handleCommentCancel = useCallback(() => {
setPendingComment(null)
setControlMode(ControlMode.Pointer)
}, [setControlMode, setPendingComment])
}, [setPendingComment])
const handleCommentIconClick = useCallback(async (comment: WorkflowCommentList) => {
setPendingComment(null)