not the pattern I want but have to think about it more

This commit is contained in:
talksik
2022-05-30 12:56:01 -05:00
parent 74dc84826f
commit 276c40330c
2 changed files with 22 additions and 0 deletions
@@ -28,6 +28,7 @@ import useAuth from '../providers/AuthProvider';
import { useImmer } from 'use-immer';
import { useSearchConversations } from '../util/clientSearch';
import { useSnackbar } from 'notistack';
import useStreamHandler from '../hooks/useStreamHandler';
interface ITerminalContext {
conversationMap: ConversationMap;
@@ -192,6 +193,9 @@ export function TerminalProvider({ children }: { children?: React.ReactNode }) {
// return undefined;
}, [selectedConversationId, conversationMap, enqueueSnackbar]);
// handles stream and device stuff
useStreamHandler(selectedConversation);
// handle create or open existing conversation
// not 100% consistent to the second, but still works...don't need atomicity
const handleQuickDial = useCallback(