File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ interface RunServerOptions {
19
19
manual: boolean
20
20
rateLimit: number | undefined
21
21
rateLimitWait: boolean
22
+ githubToken ? : string
22
23
}
23
24
24
25
export async function runServer ( options : RunServerOptions ) : Promise < void > {
@@ -38,7 +39,14 @@ export async function runServer(options: RunServerOptions): Promise<void> {
38
39
39
40
await ensurePaths ( )
40
41
await cacheVSCodeVersion ( )
41
- await setupGitHubToken ( )
42
+
43
+ if ( options . githubToken ) {
44
+ state . githubToken = options . githubToken
45
+ consola . info ( "Using provided GitHub token" )
46
+ } else {
47
+ await setupGitHubToken ( )
48
+ }
49
+
42
50
await setupCopilotToken ( )
43
51
await cacheModels ( )
44
52
@@ -93,6 +101,12 @@ const main = defineCommand({
93
101
description :
94
102
"Wait instead of error when rate limit is hit. Has no effect if rate limit is not set" ,
95
103
} ,
104
+ "github-token" : {
105
+ alias : "g" ,
106
+ type : "string" ,
107
+ description :
108
+ "Provide GitHub token directly instead of using stored token" ,
109
+ } ,
96
110
} ,
97
111
run ( { args } ) {
98
112
const rateLimitRaw = args [ "rate-limit" ]
@@ -109,6 +123,7 @@ const main = defineCommand({
109
123
manual : args . manual ,
110
124
rateLimit,
111
125
rateLimitWait : Boolean ( args . wait ) ,
126
+ githubToken : args [ "github-token" ] ,
112
127
} )
113
128
} ,
114
129
} )
You can’t perform that action at this time.
0 commit comments