(text: string, maxLen: number)
| 1018 | } |
| 1019 | |
| 1020 | function formatTextCodeBlock(text: string, maxLen: number): string { |
| 1021 | const open = '```text\n'; |
| 1022 | const close = '\n```'; |
| 1023 | const safe = text.replace(/```/g, '``\u200b`').trimEnd(); |
| 1024 | const body = truncate(safe, maxLen - open.length - close.length); |
| 1025 | return `${open}${body}${close}`; |
| 1026 | } |
| 1027 | |
| 1028 | type PermissionDecision = 'allow' | 'deny'; |
| 1029 |
no test coverage detected