-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
89 lines (79 loc) · 1.71 KB
/
types.d.ts
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
export interface CopilotRequest {
headers: CopilotRequestHeaders
payload: CopilotRequestPayload
}
export interface CopilotRequestHeaders {
"x-github-token": string
"github-public-key-identifier": string
"github-public-key-signature": string
}
export interface CopilotRequestPayload {
copilot_thread_id: string
messages: Message[]
stop: any
top_p: number
temperature: number
max_tokens: number
presence_penalty: number
frequency_penalty: number
copilot_skills: any[]
agent: string
}
export interface OpenAICompatibilityPayload {
messages: {
role: string
name?: string
content: string
}[]
}
export interface Message {
role: string
content: string
copilot_references: CopilotReference[]
copilot_confirmations?: CopilotConfirmation[]
name?: string
}
export interface CopilotReference {
type: string
data: CopilotReferenceData
id: string
is_implicit: boolean
metadata: CopilotReferenceMetadata
}
export interface CopilotReferenceData {
type: string
id: number
name?: string
ownerLogin?: string
ownerType?: string
readmePath?: string
description?: string
commitOID?: string
ref?: string
refInfo?: CopilotReferenceDataRefInfo
visibility?: string
languages?: CopilotReferenceDataLanguage[]
login?: string
avatarURL?: string
url?: string
}
export interface CopilotReferenceDataRefInfo {
name: string
type: string
}
export interface CopilotReferenceDataLanguage {
name: string
percent: number
}
export interface CopilotReferenceMetadata {
display_name: string
display_icon: string
display_url: string
}
export interface CopilotConfirmation {
state: "dismissed" | "accepted"
confirmation: {
id: string
[key: string]: unknown
}
}