+
+-- | Swaps out the expected UUIDs to match the current process ID
+swapUUIDs :: Int -> [Event] -> [Event]
+swapUUIDs _ [] = []
+swapUUIDs pid (FromServer t (RspInitialize rsp):xs) = FromServer t (RspInitialize swapped):swapUUIDs pid xs
+ where swapped = case newCommands of
+ Just cmds -> result . _Just . capabilities . executeCommandProvider . _Just . commands .~ cmds $ rsp
+ Nothing -> rsp
+ oldCommands = rsp ^? result . _Just . capabilities . executeCommandProvider . _Just . commands
+ newCommands = fmap (fmap swap) oldCommands
+ swap cmd
+ | isUuid cmd = T.append uuid $ T.dropWhile (/= ':') cmd
+ | otherwise = cmd
+ uuid = toText $ fst $ random $ mkStdGen pid
+ isUuid = isJust . fromText . T.takeWhile (/= ':')
+swapUUIDs pid (x:xs) = x:swapUUIDs pid xs
\ No newline at end of file