* Determines if a config path is a file path vs assistant slug
(configPath: string)
| 509 | * Determines if a config path is a file path vs assistant slug |
| 510 | */ |
| 511 | function isFilePath(configPath: string): boolean { |
| 512 | return ( |
| 513 | configPath.startsWith(".") || |
| 514 | configPath.startsWith("/") || |
| 515 | configPath.startsWith("~") || |
| 516 | // Windows absolute paths (C:\, D:\, etc.) |
| 517 | /^[A-Za-z]:[/\\]/.test(configPath) || |
| 518 | // UNC paths (\\server\share) |
| 519 | configPath.startsWith("\\\\") || |
| 520 | // Contains file extension |
| 521 | configPath.includes(".yaml") || |
| 522 | configPath.includes(".yml") || |
| 523 | configPath.includes(".json") |
| 524 | ); |
| 525 | } |
| 526 | |
| 527 | /** |
| 528 | * Converts a config source back to a URI for persistence |
no test coverage detected