feat: Add lockChat functionality to FlowStore

This commit adds the lockChat functionality to the FlowStore in order to control the chat lock state. The  method is implemented to update the  state variable. This feature enhances the user experience by allowing the chat to be locked or unlocked as needed.
This commit is contained in:
anovazzi1 2024-06-19 11:02:04 -03:00 committed by Gabriel Luiz Freitas Almeida
commit ca3e8de432
2 changed files with 6 additions and 0 deletions

View file

@ -43,6 +43,10 @@ import useFlowsManagerStore from "./flowsManagerStore";
// this is our useStore hook that we can use in our components to get parts of the store and call actions
const useFlowStore = create<FlowStoreType>((set, get) => ({
onFlowPage: false,
lockChat: false,
setLockChat: (lockChat) => {
set({ lockChat });
},
setOnFlowPage: (FlowPage) => set({ onFlowPage: FlowPage }),
flowState: undefined,
flowBuildStatus: {},

View file

@ -161,4 +161,6 @@ export type FlowStoreType = {
buildId?: string,
) => void;
getNodePosition: (nodeId: string) => { x: number; y: number };
setLockChat: (lock: boolean) => void;
lockChat: boolean;
};