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:
parent
da5eec8fc7
commit
ca3e8de432
2 changed files with 6 additions and 0 deletions
|
|
@ -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: {},
|
||||
|
|
|
|||
|
|
@ -161,4 +161,6 @@ export type FlowStoreType = {
|
|||
buildId?: string,
|
||||
) => void;
|
||||
getNodePosition: (nodeId: string) => { x: number; y: number };
|
||||
setLockChat: (lock: boolean) => void;
|
||||
lockChat: boolean;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue