colse logs

This commit is contained in:
Nate Kelley 2025-03-07 21:46:22 -07:00
parent ff04fba047
commit 70aef8f28e
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
5 changed files with 2 additions and 21 deletions

View File

@ -8,9 +8,6 @@ export default function Page(params: { params: { chatId: string } }) {
const selectedFileId = useChatIndividualContextSelector((x) => x.selectedFileId); const selectedFileId = useChatIndividualContextSelector((x) => x.selectedFileId);
const selectedFileType = useChatIndividualContextSelector((x) => x.selectedFileType); const selectedFileType = useChatIndividualContextSelector((x) => x.selectedFileType);
console.log('selectedFileId', selectedFileId);
console.log('selectedFileType', selectedFileType);
if (selectedFileId && selectedFileType === 'reasoning') { if (selectedFileId && selectedFileType === 'reasoning') {
return <ReasoningController chatId={params.params.chatId} messageId={selectedFileId} />; return <ReasoningController chatId={params.params.chatId} messageId={selectedFileId} />;
} }

View File

@ -32,7 +32,6 @@ export const useBlackBoxMessage = () => {
const addBlackBoxMessage = useMemoizedFn(({ messageId }: { messageId: string }) => { const addBlackBoxMessage = useMemoizedFn(({ messageId }: { messageId: string }) => {
const randomThought = getRandomThought(); const randomThought = getRandomThought();
console.log(messageId, randomThought);
const options = queryKeys.chatsBlackBoxMessages(messageId); const options = queryKeys.chatsBlackBoxMessages(messageId);
queryClient.setQueryData(options.queryKey, randomThought); queryClient.setQueryData(options.queryKey, randomThought);
}); });

View File

@ -38,7 +38,6 @@ export const useChatStreamMessage = () => {
const onUpdateChatMessageTransition = useMemoizedFn( const onUpdateChatMessageTransition = useMemoizedFn(
(chatMessage: Parameters<typeof onUpdateChatMessage>[0]) => { (chatMessage: Parameters<typeof onUpdateChatMessage>[0]) => {
const currentChatMessage = chatRefMessages.current[chatMessage.id]; const currentChatMessage = chatRefMessages.current[chatMessage.id];
console.log('currentChatMessage', currentChatMessage, 'updatingTo', chatMessage);
const iChatMessage: IBusterChatMessage = create(currentChatMessage, (draft) => { const iChatMessage: IBusterChatMessage = create(currentChatMessage, (draft) => {
Object.assign(draft || {}, chatMessage); Object.assign(draft || {}, chatMessage);
if (chatMessage.id) draft.id = chatMessage.id; if (chatMessage.id) draft.id = chatMessage.id;

View File

@ -161,7 +161,7 @@ export const SameIdDifferentTypes: Story = {
version_id: 'v1', version_id: 'v1',
status: 'completed', status: 'completed',
file: { file: {
text: 'console.log("Dynamic content");\n', text: 'console.swag("Dynamic content");\n',
modified: [[1, 1]] modified: [[1, 1]]
} }
} }

View File

@ -13,26 +13,12 @@ const getReasoningMessage = (x: BusterChatMessage | undefined, reasoningMessageI
export const ReasoningMessage_Files: React.FC<ReasoningMessageProps> = React.memo( export const ReasoningMessage_Files: React.FC<ReasoningMessageProps> = React.memo(
({ isCompletedStream, chatId, reasoningMessageId, messageId }) => { ({ isCompletedStream, chatId, reasoningMessageId, messageId }) => {
const status = useMessageIndividual(
messageId,
(x) => getReasoningMessage(x, reasoningMessageId)?.status
);
const file_ids = useMessageIndividual( const file_ids = useMessageIndividual(
messageId, messageId,
(x) => getReasoningMessage(x, reasoningMessageId)?.file_ids (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; if (!file_ids || file_ids.length === 0) return null;
console.log(status);
return ( return (
<div className="flex flex-col gap-3"> <div className="flex flex-col gap-3">