2
0

(whatsapp) Improve / fix markdown serializer

Forked remark-slate code to create Typebot's own serializer

Closes #1056
This commit is contained in:
Baptiste Arnaud
2024-01-08 08:40:25 +01:00
parent 7d6c964a0f
commit 244a29423b
11 changed files with 629 additions and 88 deletions

View File

@ -92,7 +92,6 @@
"dialogueVariableId": "vabkycu0qqff5d6ar2ama16pf"
}
],
"credentialsId": "clpjnjrbt00051aliw6610w1z",
"responseMapping": [
{
"item": "Message content",
@ -101,6 +100,16 @@
]
}
},
{
"id": "myldn1l1nfdwwm8qvza71rwv",
"type": "text",
"content": {
"richText": [
{ "type": "p", "children": [{ "text": "{{Assistant Message}}" }] }
]
},
"groupId": "a6ymhjwtkqwp8t127plz8qmk"
},
{
"id": "yblc864bzipaqfja7b2o3oo0",
"type": "Set variable",
@ -108,17 +117,8 @@
"variableId": "vabkycu0qqff5d6ar2ama16pf",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{
"id": "myldn1l1nfdwwm8qvza71rwv",
"outgoingEdgeId": "y8ml9ljnsydol9b42fd9zdve",
"type": "text",
"content": {
"richText": [
{ "type": "p", "children": [{ "text": "{{Assistant Message}}" }] }
]
}
},
"outgoingEdgeId": "at8takz56suqmaul5teazymb"
}
]
},
@ -155,20 +155,23 @@
"from": { "blockId": "gphm5wy1md9cunwkdtbzg6nq" },
"to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }
},
{
"id": "y8ml9ljnsydol9b42fd9zdve",
"from": { "blockId": "myldn1l1nfdwwm8qvza71rwv" },
"to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }
},
{
"id": "fpj0xacppqd1s5slyljzhzc9",
"from": { "blockId": "m4jadtknjb3za3gvxj1xdn1k" },
"to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" }
},
{
"id": "pn7omb9mx5xxc4mzq028fcmq",
"from": { "eventId": "ewnfbo0exlu7ihfu2lu2lusm" },
"to": { "groupId": "t3tv4dm3khwmiotjle5jb65g" },
"id": "pn7omb9mx5xxc4mzq028fcmq"
"to": { "groupId": "t3tv4dm3khwmiotjle5jb65g" }
},
{
"from": {
"blockId": "yblc864bzipaqfja7b2o3oo0",
"groupId": "a6ymhjwtkqwp8t127plz8qmk"
},
"to": { "groupId": "qfrz5nwm63g12dajsjxothb5" },
"id": "at8takz56suqmaul5teazymb"
}
],
"variables": [

View File

@ -74,7 +74,6 @@
"dialogueVariableId": "vu9adij5penetej2xz89htfe6"
}
],
"credentialsId": "clpjnjrbt00051aliw6610w1z",
"responseMapping": [
{
"item": "Message content",
@ -83,15 +82,6 @@
]
}
},
{
"id": "kftq9x1wnrcefzc268ydmqkn",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{
"id": "myldn1l1nfdwwm8qvza71rwv",
"type": "text",
@ -99,6 +89,16 @@
"richText": [
{ "type": "p", "children": [{ "text": "{{Assistant Message}}" }] }
]
},
"groupId": "dmg57mgick51p8l5pnyqtyf9"
},
{
"id": "kftq9x1wnrcefzc268ydmqkn",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{
@ -139,7 +139,6 @@
"dialogueVariableId": "vu9adij5penetej2xz89htfe6"
}
],
"credentialsId": "clpjnjrbt00051aliw6610w1z",
"responseMapping": [
{
"item": "Message content",
@ -148,15 +147,6 @@
]
}
},
{
"id": "dyfigmu4095x8p99qe461zbh",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{
"id": "sei88rrjcmpgm3vhxjvkofyt",
"type": "text",
@ -164,6 +154,16 @@
"richText": [
{ "type": "p", "children": [{ "text": "{{Assistant Message}}" }] }
]
},
"groupId": "fj5z2nx488htv0843kq6qeyk"
},
{
"id": "dyfigmu4095x8p99qe461zbh",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{
@ -204,7 +204,6 @@
"dialogueVariableId": "vu9adij5penetej2xz89htfe6"
}
],
"credentialsId": "clpjnjrbt00051aliw6610w1z",
"responseMapping": [
{
"item": "Message content",
@ -213,15 +212,6 @@
]
}
},
{
"id": "usolgxcte60rin18ccygzbdu",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{
"id": "h96lile0evtqa0jx24gmfo25",
"type": "text",
@ -229,6 +219,16 @@
"richText": [
{ "type": "p", "children": [{ "text": "{{Assistant Message}}" }] }
]
},
"groupId": "csbysu8dr08zxr4i6hzvzjdf"
},
{
"id": "usolgxcte60rin18ccygzbdu",
"type": "Set variable",
"options": {
"variableId": "vu9adij5penetej2xz89htfe6",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{
@ -678,9 +678,9 @@
"to": { "groupId": "dmg57mgick51p8l5pnyqtyf9" }
},
{
"id": "k5bj58emklqfqv3hemko4u23",
"from": { "eventId": "w99qhdr20tw02sfrfwkfc1tg" },
"to": { "groupId": "bofjp88arodr4k0btv2esyqy" },
"id": "k5bj58emklqfqv3hemko4u23"
"to": { "groupId": "bofjp88arodr4k0btv2esyqy" }
}
],
"variables": [