From 70aef8f28e365b34ea361f2889ebe60d7634b970 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Fri, 7 Mar 2025 21:46:22 -0700 Subject: [PATCH] colse logs --- .../(chat_experience)/chats/[chatId]/page.tsx | 3 --- .../Chats/NewChatProvider/useBlackBoxMessage.ts | 1 - .../NewChatProvider/useChatStreamMessage.ts | 1 - .../ReasoningMessageSelector.stories.tsx | 2 +- .../ReasoningMessage_Files.tsx | 16 +--------------- 5 files changed, 2 insertions(+), 21 deletions(-) diff --git a/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/page.tsx b/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/page.tsx index e1b6b0c54..ad58e85ac 100644 --- a/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/page.tsx +++ b/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/page.tsx @@ -8,9 +8,6 @@ export default function Page(params: { params: { chatId: string } }) { const selectedFileId = useChatIndividualContextSelector((x) => x.selectedFileId); const selectedFileType = useChatIndividualContextSelector((x) => x.selectedFileType); - console.log('selectedFileId', selectedFileId); - console.log('selectedFileType', selectedFileType); - if (selectedFileId && selectedFileType === 'reasoning') { return ; } diff --git a/web/src/context/Chats/NewChatProvider/useBlackBoxMessage.ts b/web/src/context/Chats/NewChatProvider/useBlackBoxMessage.ts index 099c22575..b7e8ced02 100644 --- a/web/src/context/Chats/NewChatProvider/useBlackBoxMessage.ts +++ b/web/src/context/Chats/NewChatProvider/useBlackBoxMessage.ts @@ -32,7 +32,6 @@ export const useBlackBoxMessage = () => { const addBlackBoxMessage = useMemoizedFn(({ messageId }: { messageId: string }) => { const randomThought = getRandomThought(); - console.log(messageId, randomThought); const options = queryKeys.chatsBlackBoxMessages(messageId); queryClient.setQueryData(options.queryKey, randomThought); }); diff --git a/web/src/context/Chats/NewChatProvider/useChatStreamMessage.ts b/web/src/context/Chats/NewChatProvider/useChatStreamMessage.ts index 8a8f464db..e4b8687e4 100644 --- a/web/src/context/Chats/NewChatProvider/useChatStreamMessage.ts +++ b/web/src/context/Chats/NewChatProvider/useChatStreamMessage.ts @@ -38,7 +38,6 @@ export const useChatStreamMessage = () => { const onUpdateChatMessageTransition = useMemoizedFn( (chatMessage: Parameters[0]) => { const currentChatMessage = chatRefMessages.current[chatMessage.id]; - console.log('currentChatMessage', currentChatMessage, 'updatingTo', chatMessage); const iChatMessage: IBusterChatMessage = create(currentChatMessage, (draft) => { Object.assign(draft || {}, chatMessage); if (chatMessage.id) draft.id = chatMessage.id; diff --git a/web/src/controllers/ReasoningController/ReasoningMessages/ReasoningMessageSelector.stories.tsx b/web/src/controllers/ReasoningController/ReasoningMessages/ReasoningMessageSelector.stories.tsx index 5f279db02..1b558dabe 100644 --- a/web/src/controllers/ReasoningController/ReasoningMessages/ReasoningMessageSelector.stories.tsx +++ b/web/src/controllers/ReasoningController/ReasoningMessages/ReasoningMessageSelector.stories.tsx @@ -161,7 +161,7 @@ export const SameIdDifferentTypes: Story = { version_id: 'v1', status: 'completed', file: { - text: 'console.log("Dynamic content");\n', + text: 'console.swag("Dynamic content");\n', modified: [[1, 1]] } } diff --git a/web/src/controllers/ReasoningController/ReasoningMessages/ReasoningMessage_Files/ReasoningMessage_Files.tsx b/web/src/controllers/ReasoningController/ReasoningMessages/ReasoningMessage_Files/ReasoningMessage_Files.tsx index 488c8b5d1..11f91c520 100644 --- a/web/src/controllers/ReasoningController/ReasoningMessages/ReasoningMessage_Files/ReasoningMessage_Files.tsx +++ b/web/src/controllers/ReasoningController/ReasoningMessages/ReasoningMessage_Files/ReasoningMessage_Files.tsx @@ -13,26 +13,12 @@ const getReasoningMessage = (x: BusterChatMessage | undefined, reasoningMessageI export const ReasoningMessage_Files: React.FC = React.memo( ({ isCompletedStream, chatId, reasoningMessageId, messageId }) => { - const status = useMessageIndividual( - messageId, - (x) => getReasoningMessage(x, reasoningMessageId)?.status - ); const file_ids = useMessageIndividual( messageId, (x) => getReasoningMessage(x, reasoningMessageId)?.file_ids ); - const title = useMessageIndividual( - messageId, - (x) => getReasoningMessage(x, reasoningMessageId)?.title - ); - const secondary_title = useMessageIndividual( - messageId, - (x) => getReasoningMessage(x, reasoningMessageId)?.secondary_title - ); - if (!title) return null; - - console.log(status); + if (!file_ids || file_ids.length === 0) return null; return (