From 9da3f7f291e07177d417c7697ccd8d2907727ee4 Mon Sep 17 00:00:00 2001 From: Rohit Date: Tue, 20 May 2025 17:44:49 +0530 Subject: [PATCH] feat: add current action id funcs --- src/context/globalInfo.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/context/globalInfo.tsx b/src/context/globalInfo.tsx index 58ee9672..55f96b06 100644 --- a/src/context/globalInfo.tsx +++ b/src/context/globalInfo.tsx @@ -80,6 +80,12 @@ interface GlobalInfo { }) => void; shouldResetInterpretationLog: boolean; resetInterpretationLog: () => void; + currentTextActionId: string; + setCurrentTextActionId: (actionId: string) => void; + currentListActionId: string; + setCurrentListActionId: (actionId: string) => void; + currentScreenshotActionId: string; + setCurrentScreenshotActionId: (actionId: string) => void; }; class GlobalInfoStore implements Partial { @@ -106,6 +112,9 @@ class GlobalInfoStore implements Partial { hasScrapeSchemaAction: false, }; shouldResetInterpretationLog = false; + currentTextActionId = ''; + currentListActionId = ''; + currentScreenshotActionId = ''; }; const globalInfoStore = new GlobalInfoStore(); @@ -129,6 +138,9 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { const [recordingUrl, setRecordingUrl] = useState(globalInfoStore.recordingUrl); const [currentWorkflowActionsState, setCurrentWorkflowActionsState] = useState(globalInfoStore.currentWorkflowActionsState); const [shouldResetInterpretationLog, setShouldResetInterpretationLog] = useState(globalInfoStore.shouldResetInterpretationLog); + const [currentTextActionId, setCurrentTextActionId] = useState(''); + const [currentListActionId, setCurrentListActionId] = useState(''); + const [currentScreenshotActionId, setCurrentScreenshotActionId] = useState(''); const notify = (severity: 'error' | 'warning' | 'info' | 'success', message: string) => { setNotification({ severity, message, isOpen: true }); @@ -187,6 +199,12 @@ export const GlobalInfoProvider = ({ children }: { children: JSX.Element }) => { setCurrentWorkflowActionsState, shouldResetInterpretationLog, resetInterpretationLog, + currentTextActionId, + setCurrentTextActionId, + currentListActionId, + setCurrentListActionId, + currentScreenshotActionId, + setCurrentScreenshotActionId, }} > {children}