(message: string)
| 89 | }; |
| 90 | |
| 91 | export const parseCodeFromMessage = (message: string) => { |
| 92 | const regex = /```(?:mermaid)?\s*([\s\S]*?)```/; |
| 93 | const match = message.match(regex); |
| 94 | |
| 95 | if (match) { |
| 96 | return match[1]; |
| 97 | } else { |
| 98 | return message; |
| 99 | } |
| 100 | }; |
| 101 | |
| 102 | export const serializeCode = (code: string) => { |
| 103 | const state = { |
no outgoing calls
no test coverage detected