@@ -21,6 +21,7 @@ import { UserId } from '../../decorators/user-id.decorator.js';
2121import { InTransactionEnum } from '../../enums/in-transaction.enum.js' ;
2222import { ConnectionEditGuard } from '../../guards/connection-edit.guard.js' ;
2323import { TableAiRequestGuard } from '../../guards/table-ai-request.guard.js' ;
24+ import { isTest } from '../../helpers/app/is-test.js' ;
2425import { ValidationHelper } from '../../helpers/validators/validation-helper.js' ;
2526import { SentryInterceptor } from '../../interceptors/sentry.interceptor.js' ;
2627import { IAISettingsAndWidgetsCreation , IRequestInfoFromTableV2 } from './ai-use-cases.interface.js' ;
@@ -51,7 +52,7 @@ export class UserAIRequestsControllerV2 {
5152 @ApiBody ( { type : RequestInfoFromTableBodyDTO } )
5253 @ApiQuery ( { name : 'tableName' , required : true , type : String } )
5354 @ApiQuery ( { name : 'threadId' , required : false , type : String } )
54- @Timeout ( process . env . NODE_ENV !== 'test' ? TimeoutDefaults . AI : TimeoutDefaults . AI_TEST )
55+ @Timeout ( ! isTest ( ) ? TimeoutDefaults . AI : TimeoutDefaults . AI_TEST )
5556 @Post ( '/ai/v4/request/:connectionId' )
5657 public async requestInfoFromTableWithAIWithHistory (
5758 @SlugUuid ( 'connectionId' ) connectionId : string ,
@@ -90,7 +91,7 @@ export class UserAIRequestsControllerV2 {
9091 description : 'AI settings and widgets creation job has been queued.' ,
9192 } )
9293 @UseGuards ( ConnectionEditGuard )
93- @Timeout ( process . env . NODE_ENV !== 'test' ? TimeoutDefaults . AI : TimeoutDefaults . AI_TEST )
94+ @Timeout ( ! isTest ( ) ? TimeoutDefaults . AI : TimeoutDefaults . AI_TEST )
9495 @Get ( '/ai/v2/setup/:connectionId' )
9596 public async requestAISettingsAndWidgetsCreation (
9697 @SlugUuid ( 'connectionId' ) connectionId : string ,
0 commit comments