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