Skip to content

Commit 802c83e

Browse files
feat: add support to the new action in the test lib-helper
1 parent fb6530a commit 802c83e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/lib-helpers/test/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
isHeightChangeMessage,
66
isModalChangeMessage,
77
isPluginLoadedMessage,
8+
isPluginPromptAIMessage,
89
isValueChangeMessage,
910
} from '@storyblok/field-plugin'
1011

@@ -102,6 +103,13 @@ const getContainer = (sendToFieldPlugin: (data: unknown) => void) => {
102103
callbackId: data.callbackId,
103104
story,
104105
})
106+
} else if (isPluginPromptAIMessage(data)) {
107+
sendToFieldPlugin({
108+
action: 'prompt-ai',
109+
uid,
110+
callbackId: data.callbackId,
111+
output: 'output fake for the prompt: ' + data.payload.text,
112+
})
105113
} else {
106114
console.warn(
107115
`Container received unknown message from plugin: ${JSON.stringify(

0 commit comments

Comments
 (0)