forked from ericc-ch/copilot-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstate.ts
More file actions
31 lines (25 loc) · 701 Bytes
/
state.ts
File metadata and controls
31 lines (25 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import type { ModelsResponse } from "~/services/copilot/get-models"
import type { LingmaRpcClient } from "~/services/lingma/json-rpc"
export type Provider = "copilot" | "lingma"
export interface State {
provider: Provider
githubToken?: string
copilotToken?: string
lingmaClient?: LingmaRpcClient
accountType: string
models?: ModelsResponse
vsCodeVersion?: string
manualApprove: boolean
rateLimitWait: boolean
showToken: boolean
// Rate limiting configuration
rateLimitSeconds?: number
lastRequestTimestamp?: number
}
export const state: State = {
provider: "copilot",
accountType: "individual",
manualApprove: false,
rateLimitWait: false,
showToken: false,
}