File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
packages/opencode/src/cli/cmd/tui Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -24,24 +24,21 @@ export const AttachCommand = cmd({
2424 handler : async ( args ) => {
2525 if ( args . dir ) process . chdir ( args . dir )
2626
27- /**
28- * Reverted since the windows-check (github-action) is not passing anymore - needs investigation.
29- */
3027 // If server requires authentication, create a custom fetch that includes the auth header
31- // const authHeader = getAuthorizationHeader()
32- // const customFetch = authHeader
33- // ? ((async (input: RequestInfo | URL, init?: RequestInit): Promise<Response> => {
34- // const request = new Request(input, init)
35- // request.headers.set("Authorization", authHeader)
36- // return fetch(request)
37- // }) as typeof fetch)
38- // : undefined
28+ const authHeader = getAuthorizationHeader ( )
29+ const customFetch = authHeader
30+ ? ( ( async ( input : RequestInfo | URL , init ?: RequestInit ) : Promise < Response > => {
31+ const request = new Request ( input , init )
32+ request . headers . set ( "Authorization" , authHeader )
33+ return fetch ( request )
34+ } ) as typeof fetch )
35+ : undefined
3936
4037 await tui ( {
4138 url : args . url ,
4239 args : { sessionID : args . session } ,
4340 directory : args . dir ? process . cwd ( ) : undefined ,
44- // fetch: customFetch,
41+ fetch : customFetch ,
4542 } )
4643 } ,
4744} )
You can’t perform that action at this time.
0 commit comments