REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.20 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/Agent/hooks/useWhenFinishedToolProps.js
Text
Base64
import { recordAgentActivity } from '@agent/api'; import { useWorkflowStore } from '@agent/state/workflows'; import { useCallback, useMemo } from '@wordpress/element'; export const useWhenFinishedToolProps = () => { const { whenFinishedToolProps, setWhenFinishedToolProps, getWorkflow } = useWorkflowStore(); const onConfirm = useCallback( (props = {}) => { if (!whenFinishedToolProps) return; const workflow = getWorkflow(); recordAgentActivity({ sessionId: workflow?.sessionId, action: 'workflow_tool_event', value: { trigger: 'confirm', workflow: workflow?.id }, }); window.dispatchEvent( new CustomEvent('extendify-agent:workflow-confirm', { detail: { ...props, whenFinishedToolProps }, }), ); }, [whenFinishedToolProps, getWorkflow], ); const onCancel = useCallback(() => { if (!whenFinishedToolProps) return; const workflow = getWorkflow(); recordAgentActivity({ sessionId: workflow?.sessionId, action: 'workflow_tool_event', value: { trigger: 'cancel', workflow: workflow?.id }, }); window.dispatchEvent( new CustomEvent('extendify-agent:workflow-cancel', { detail: { whenFinishedToolProps }, }), ); }, [whenFinishedToolProps, getWorkflow]); const onRetry = useCallback(() => { if (!whenFinishedToolProps) return; setWhenFinishedToolProps(null); const workflow = getWorkflow(); recordAgentActivity({ sessionId: workflow?.sessionId, action: 'workflow_tool_event', value: { trigger: 'retry', workflow: workflow?.id }, }); window.dispatchEvent( new CustomEvent('extendify-agent:workflow-retry', { detail: { whenFinishedToolProps }, }), ); }, [whenFinishedToolProps, setWhenFinishedToolProps, getWorkflow]); const onLoad = useCallback(() => { if (!whenFinishedToolProps) return; const c = Array.from( document.querySelectorAll( '#extendify-agent-chat-scroll-area div:last-child', ), )?.at(-1); c?.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); }, [whenFinishedToolProps]); return useMemo(() => { if (!whenFinishedToolProps) return null; return { ...whenFinishedToolProps, onConfirm, onCancel, onRetry, onLoad }; }, [whenFinishedToolProps, onConfirm, onCancel, onRetry, onLoad]); };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 12
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
useDraggable.js
3.77 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useFontVariationOverride.js
3.92 KB
lrw-r--r--
2026-03-19 23:35:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useIframeScale.js
1.11 KB
lrw-r--r--
2026-04-16 23:02:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useLockPost.js
607 B
lrw-r--r--
2026-03-24 18:55:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
usePortal.js
478 B
lrw-r--r--
2026-03-19 23:35:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useResizable.js
3.17 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useSiteVibesOverride.js
2.39 KB
lrw-r--r--
2026-03-19 23:35:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useSiteVibesVariations.js
1.82 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useThemeFontsVariations.js
1.17 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useThemeVariations.js
1.14 KB
lrw-r--r--
2025-09-09 19:55:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useVariationOverride.js
3.14 KB
lrw-r--r--
2026-03-19 23:35:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useWhenFinishedToolProps.js
2.20 KB
lrw-r--r--
2026-03-05 22:57:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).