🐛 (viewer) Fix client side action when in separate group
This commit is contained in:
@ -23,7 +23,11 @@ import { computePaymentInputRuntimeOptions } from '@/features/blocks/inputs/paym
|
||||
import { injectVariableValuesInButtonsInputBlock } from '@/features/blocks/inputs/buttons/api/utils/injectVariableValuesInButtonsInputBlock'
|
||||
|
||||
export const executeGroup =
|
||||
(state: SessionState, currentReply?: ChatReply) =>
|
||||
(
|
||||
state: SessionState,
|
||||
currentReply?: ChatReply,
|
||||
currentLastBubbleId?: string
|
||||
) =>
|
||||
async (
|
||||
group: Group
|
||||
): Promise<ChatReply & { newSessionState: SessionState }> => {
|
||||
@ -32,7 +36,7 @@ export const executeGroup =
|
||||
currentReply?.clientSideActions
|
||||
let logs: ChatReply['logs'] = currentReply?.logs
|
||||
let nextEdgeId = null
|
||||
let lastBubbleBlockId: string | undefined
|
||||
let lastBubbleBlockId: string | undefined = currentLastBubbleId
|
||||
|
||||
let newSessionState = state
|
||||
|
||||
@ -97,11 +101,15 @@ export const executeGroup =
|
||||
return { messages, newSessionState, clientSideActions, logs }
|
||||
}
|
||||
|
||||
return executeGroup(newSessionState, {
|
||||
messages,
|
||||
clientSideActions,
|
||||
logs,
|
||||
})(nextGroup.group)
|
||||
return executeGroup(
|
||||
newSessionState,
|
||||
{
|
||||
messages,
|
||||
clientSideActions,
|
||||
logs,
|
||||
},
|
||||
lastBubbleBlockId
|
||||
)(nextGroup.group)
|
||||
}
|
||||
|
||||
const computeRuntimeOptions =
|
||||
|
Reference in New Issue
Block a user