@@ -67,9 +67,16 @@ interface SocketContextType {
6767 blockId : string ,
6868 subblockId : string ,
6969 value : any ,
70- operationId ?: string
70+ operationId : string | undefined ,
71+ workflowId : string
72+ ) => void
73+ emitVariableUpdate : (
74+ variableId : string ,
75+ field : string ,
76+ value : any ,
77+ operationId : string | undefined ,
78+ workflowId : string
7179 ) => void
72- emitVariableUpdate : ( variableId : string , field : string , value : any , operationId ?: string ) => void
7380
7481 emitCursorUpdate : ( cursor : { x : number ; y : number } | null ) => void
7582 emitSelectionUpdate : ( selection : { type : 'block' | 'edge' | 'none' ; id ?: string } ) => void
@@ -685,13 +692,9 @@ export function SocketProvider({ children, user }: SocketProviderProps) {
685692 blockId : string ,
686693 subblockId : string ,
687694 value : any ,
688- operationId ? : string ,
689- workflowId ? : string
695+ operationId : string | undefined ,
696+ workflowId : string
690697 ) => {
691- if ( ! workflowId ) {
692- logger . error ( 'emitSubblockUpdate called without workflowId' , { blockId, subblockId } )
693- return
694- }
695698 if ( ! socket ) {
696699 logger . warn ( 'Cannot emit subblock update: no socket connection' , { workflowId, blockId } )
697700 return
@@ -709,11 +712,13 @@ export function SocketProvider({ children, user }: SocketProviderProps) {
709712 )
710713
711714 const emitVariableUpdate = useCallback (
712- ( variableId : string , field : string , value : any , operationId ?: string , workflowId ?: string ) => {
713- if ( ! workflowId ) {
714- logger . error ( 'emitVariableUpdate called without workflowId' , { variableId, field } )
715- return
716- }
715+ (
716+ variableId : string ,
717+ field : string ,
718+ value : any ,
719+ operationId : string | undefined ,
720+ workflowId : string
721+ ) => {
717722 if ( ! socket ) {
718723 logger . warn ( 'Cannot emit variable update: no socket connection' , { workflowId, variableId } )
719724 return
0 commit comments