Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cleanup
  • Loading branch information
waleedlatif1 committed Nov 28, 2025
commit c886f31b4d69ca5c8343cf4e1e1234a13cb1ecff
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ try {
const { data: customTools = [] } = useCustomTools(workspaceId)

useEffect(() => {
if (open && initialValues) {
if (!open) return

if (initialValues) {
try {
setJsonSchema(
typeof initialValues.schema === 'string'
Expand All @@ -285,10 +287,10 @@ try {
logger.error('Error initializing form with initial values:', { error })
setSchemaError('Failed to load tool data. Please try again.')
}
} else if (open) {
} else {
resetForm()
}
}, [open, initialValues])
}, [open])

const resetForm = () => {
setJsonSchema('')
Expand Down