/** Parses the `key=value;...` field map from the leading colon-delimited segment of a Copilot token (e.g. `tid=abc;exp=123;rt=1:HMAC...`). */
export function parseCopilotTokenFields(token: string | undefined): ReadonlyMap<string, string> {
if (!token) {
return result;
}
const colonIdx = token.indexOf(':');
for (const field of header.split(';')) {
const eqIdx = field.indexOf('=');
if (eqIdx <= 0) {