(userAgent: string | null | undefined)
| 1 | const userAgentPrefix = 'Kilo-Code/'; |
| 2 | export function getKiloCodeVersionNumber(userAgent: string | null | undefined): number | undefined { |
| 3 | if (!userAgent || !userAgent.startsWith(userAgentPrefix)) return undefined; |
| 4 | return getXKiloCodeVersionNumber(userAgent.slice(userAgentPrefix.length)); |
| 5 | } |
| 6 | |
| 7 | // The legacy ("Roo-based") Kilo Code extension fetches notifications with axios from |
| 8 | // the Node extension host, which sends `User-Agent: axios/<version>`. The current |
no test coverage detected