File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,20 @@ const DEFAULT_PERMISSION_CONFIG: NonNullable<OpencodeConfig["permission"]> = {
2424
2525// Custom fetch with 25-minute timeout
2626const customFetch = async ( request : Request ) : Promise < Response > => {
27- return fetch ( request , {
28- signal : AbortSignal . timeout ( 1_500_000 ) ,
29- } ) ;
27+ const startTime = Date . now ( ) ;
28+
29+ try {
30+ const response = await fetch ( request , {
31+ signal : AbortSignal . timeout ( 1_500_000 ) ,
32+ } ) ;
33+ const duration = Date . now ( ) - startTime ;
34+ console . error ( `[opencode] Request completed - Duration: ${ duration } ms` ) ;
35+ return response ;
36+ } catch ( error ) {
37+ const duration = Date . now ( ) - startTime ;
38+ console . error ( `[opencode] Request failed - Duration: ${ duration } ms` ) ;
39+ throw error ;
40+ }
3041} ;
3142
3243const opencodePort = await detectPort ( 4096 ) ;
You can’t perform that action at this time.
0 commit comments