Skip to content

Commit

Permalink
fix: dispatch model updates in IframeRenderer for improved conversati…
Browse files Browse the repository at this point in the history
…on handling
  • Loading branch information
valerydluski committed Jan 21, 2025
1 parent da911ba commit 46ced2d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions apps/chat/src/components/IframeRenderer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Conversation } from '@/src/types/chat';

import { ConversationsActions } from '@/src/store/conversations/conversations.reducers';
import { useAppDispatch } from '@/src/store/hooks';
import { ModelsActions } from '@/src/store/models/models.reducers';

import {
VisualizerConnectorEvents,
Expand Down Expand Up @@ -93,6 +94,16 @@ export const IframeRenderer = forwardRef<HTMLDivElement, IframeRendererProps>(
conversations: [conversation],
}),
);
dispatch(
ConversationsActions.selectConversations({
conversationIds: [conversation.id],
}),
);
dispatch(
ModelsActions.updateRecentModels({
modelId: conversation.model.id,
}),
);
}
}

Expand Down

0 comments on commit 46ced2d

Please sign in to comment.