diff --git a/web/src/api/buster_socket/chats/chatResponses.ts b/web/src/api/buster_socket/chats/chatResponses.ts index 78f32435a..0699ba031 100644 --- a/web/src/api/buster_socket/chats/chatResponses.ts +++ b/web/src/api/buster_socket/chats/chatResponses.ts @@ -1,5 +1,4 @@ import type { RustApiError } from '../../buster_rest/errors'; -import type { BusterChatAsset } from './chatAssetInterfaces'; import type { BusterChat, BusterChatListItem } from './chatInterfaces'; export enum ChatsResponses { @@ -29,12 +28,6 @@ export type Chat_getChat = { onError?: (d: unknown | RustApiError) => void; }; -export type Chat_getChatAsset = { - route: '/chats/get:getChatAsset'; - callback: (d: BusterChatAsset) => void; - onError?: (d: unknown | RustApiError) => void; -}; - /***** CHAT PROGRESS EVENTS START ******/ export type ChatPost_initializeChat = { @@ -55,6 +48,5 @@ export type ChatResponseTypes = | ChatList_getChatsList | Chat_unsubscribed | Chat_getChat - | Chat_getChatAsset | ChatPost_initializeChat | ChatPost_generatingTitle; diff --git a/web/src/context/Chats/ChatProvider.tsx b/web/src/context/Chats/ChatProvider.tsx index 9ef3a7d0d..e90e3a4ff 100644 --- a/web/src/context/Chats/ChatProvider.tsx +++ b/web/src/context/Chats/ChatProvider.tsx @@ -5,7 +5,7 @@ import { useContextSelector } from '@fluentui/react-context-selector'; import { useBusterWebSocket } from '../BusterWebSocket'; -import type { BusterChatAsset, BusterChat, BusterChatMessage } from '@/api/buster_socket/chats'; +import type { BusterChat } from '@/api/buster_socket/chats'; import { useMemoizedFn, useUnmount } from 'ahooks'; import type { FileType } from '@/api/buster_socket/chats'; import { @@ -17,7 +17,6 @@ import { import { IBusterChat } from './interfaces'; import { chatUpgrader } from './helpers'; import { useHotkeys } from 'react-hotkeys-hook'; -import { fi } from '@faker-js/faker'; export const useBusterChat = () => { const busterSocket = useBusterWebSocket(); @@ -39,12 +38,6 @@ export const useBusterChat = () => { return upgradedChat; }); - const _onGetChatAsset = useMemoizedFn((asset: BusterChatAsset) => { - const { id, type } = asset; - console.log('TODO: handle this. Put the asset in their respective chat'); - return asset; - }); - // EMITTERS const unsubscribeFromChat = useMemoizedFn(({ chatId }: { chatId: string }) => { @@ -198,13 +191,3 @@ export const useBusterChatIndividual = ({ chatId: chatIdProp }: { chatId?: strin chat }; }; - -export const useBusterChatAssetIndividual = ({ - chatId, - assetId, - type -}: { - chatId: string; - assetId: string; - type: FileType; -}) => {};