(content: string)
| 283 | * Removes markdown code block syntax if present, including any language tag |
| 284 | */ |
| 285 | export const cleanMarkdownCodeBlock = (content: string): string => { |
| 286 | const cleanResponse = content.match(/^```(?:[a-zA-Z]+)?\n([\s\S]*)\n```$/) |
| 287 | ? content.replace(/^```(?:[a-zA-Z]+)?\n/, '').replace(/\n```$/, '') |
| 288 | : content |
| 289 | return cleanResponse |
| 290 | } |
| 291 | |
| 292 | export function isValidFilePath(path: string) { |
| 293 | if (!path) return false |
no outgoing calls
no test coverage detected