File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export type AgentName =
1616 | "goose"
1717 | "pi" ;
1818
19- type EnvCheck = string | ( ( env : Record < string , string | undefined > ) => boolean ) ;
19+ type EnvCheck = string | ( ( ) => boolean ) ;
2020
2121type InternalAgent = [ agentName : AgentName , envChecks : EnvCheck [ ] ] ;
2222
@@ -48,7 +48,7 @@ const agents: InternalAgent[] = [
4848] ;
4949
5050function envMatcher ( envKey : string , regex : RegExp ) {
51- return ( env : Record < string , string | undefined > ) => {
51+ return ( ) => {
5252 const value = env [ envKey ] ;
5353 return value ? regex . test ( value ) : false ;
5454 } ;
@@ -78,7 +78,7 @@ export function detectAgent(): AgentInfo {
7878 }
7979 for ( const [ name , checks ] of agents ) {
8080 for ( const check of checks ) {
81- if ( typeof check === "string" ? env [ check ] : check ( env ) ) {
81+ if ( typeof check === "string" ? env [ check ] : check ( ) ) {
8282 return { name } ;
8383 }
8484 }
You can’t perform that action at this time.
0 commit comments