diff --git a/client/src/hooks/Chat/useChatFunctions.ts b/client/src/hooks/Chat/useChatFunctions.ts index 075dedbdfd..2229640beb 100644 --- a/client/src/hooks/Chat/useChatFunctions.ts +++ b/client/src/hooks/Chat/useChatFunctions.ts @@ -647,7 +647,7 @@ export default function useChatFunctions({ model: convo?.model, error: false, iconURL, - clientQueueParentMessageId: regenerateShaped ? messageId : intermediateId, + clientQueueParentMessageId: regenerateShaped ? (messageId ?? undefined) : intermediateId, /** * Seed the assistant placeholder with the turn's manually-invoked * skill names so `ContentParts` can render interim `SkillCall` cards