(fileName: string | null | undefined)
| 457 | } |
| 458 | |
| 459 | export function sanitizeFileName(fileName: string | null | undefined): string { |
| 460 | if (!fileName || typeof fileName !== 'string') { |
| 461 | return 'untitled' |
| 462 | } |
| 463 | return fileName.replace(/\s+/g, '-').replace(/[^a-zA-Z0-9.-]/g, '_') |
| 464 | } |
| 465 | |
| 466 | export function isCustomTool(toolId: string): boolean { |
| 467 | return toolId.startsWith(AGENT.CUSTOM_TOOL_PREFIX) |
no test coverage detected