copilot-api / src /lib /state.ts
imspsycho's picture
Initial upload from Google Colab
98c9143 verified
Raw
History Blame Contribute Delete
747 Bytes
import { randomUUID } from "node:crypto"
import type { ModelsResponse } from "~/services/copilot/get-models"
export interface State {
githubToken?: string
userName?: string
copilotToken?: string
accountType: string
models?: ModelsResponse
vsCodeVersion?: string
macMachineId?: string
vsCodeSessionId?: string
vsCodeDeviceId: string
manualApprove: boolean
rateLimitWait: boolean
showToken: boolean
// Rate limiting configuration
rateLimitSeconds?: number
lastRequestTimestamp?: number
verbose: boolean
copilotApiUrl?: string
}
export const state: State = {
accountType: "individual",
manualApprove: false,
rateLimitWait: false,
showToken: false,
verbose: false,
vsCodeDeviceId: randomUUID(),
}