(short = true)
| 62 | } |
| 63 | |
| 64 | export function createRequestTracker(short = true): RequestTracker { |
| 65 | const requestId = short ? createShortRequestId() : createRequestId() |
| 66 | const startTime = Date.now() |
| 67 | |
| 68 | return { |
| 69 | requestId, |
| 70 | startTime, |
| 71 | getDuration(): number { |
| 72 | return Date.now() - startTime |
| 73 | }, |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | export async function authenticateCopilotRequestSessionOnly(): Promise<CopilotAuthResult> { |
| 78 | const session = await getSession() |