From ca826d585662f63c676c033bb7b814cb6221ddd9 Mon Sep 17 00:00:00 2001 From: Kartik Gupta Date: Tue, 8 Jul 2025 10:10:29 +0530 Subject: [PATCH 1/5] fix feedbacks --- server/ee | 2 +- server/src/modules/ai/module.ts | 2 ++ server/src/modules/data-queries/module.ts | 2 +- server/src/modules/data-queries/service.ts | 10 +--------- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/server/ee b/server/ee index dcb4173b2d..a2f4d8b321 160000 --- a/server/ee +++ b/server/ee @@ -1 +1 @@ -Subproject commit dcb4173b2db2a6ee3d96b21e0b32f2f0b0f2c4b0 +Subproject commit a2f4d8b32155754ad04a2ab82e5379939d0e41cb diff --git a/server/src/modules/ai/module.ts b/server/src/modules/ai/module.ts index af11dcb518..108ccf6c53 100644 --- a/server/src/modules/ai/module.ts +++ b/server/src/modules/ai/module.ts @@ -12,6 +12,7 @@ import { AppPermissionsModule } from '@modules/app-permissions/module'; import { ImportExportResourcesModule } from '@modules/import-export-resources/module'; import { ArtifactRepository } from './repositories/artifact.repository'; import { SubModule } from '@modules/app/sub-module'; +import { DataQueryRepository } from '@modules/data-queries/repository'; export class AiModule extends SubModule { static async register(configs: { IS_GET_CONTEXT: boolean }): Promise { @@ -47,6 +48,7 @@ export class AiModule extends SubModule { AiResponseVoteRepository, FeatureAbilityFactory, ArtifactRepository, + DataQueryRepository, EventsService, ], diff --git a/server/src/modules/data-queries/module.ts b/server/src/modules/data-queries/module.ts index aad66d3218..e749cd7959 100644 --- a/server/src/modules/data-queries/module.ts +++ b/server/src/modules/data-queries/module.ts @@ -37,7 +37,7 @@ export class DataQueriesModule extends SubModule { AppFeatureAbilityFactory, DataSourceFeatureAbilityFactory, ], - exports: [DataQueriesUtilService, DataQueriesService], + exports: [DataQueriesUtilService], controllers: [DataQueriesController], }; } diff --git a/server/src/modules/data-queries/service.ts b/server/src/modules/data-queries/service.ts index 34df6c8cd4..2ec6ea2e08 100644 --- a/server/src/modules/data-queries/service.ts +++ b/server/src/modules/data-queries/service.ts @@ -3,7 +3,6 @@ import { EntityManager, In } from 'typeorm'; import { User } from 'src/entities/user.entity'; import { DataSource } from 'src/entities/data_source.entity'; import { dbTransactionWrap } from 'src/helpers/database.helper'; -import { DataSourceTypes } from '@modules/data-sources/constants'; import { Response } from 'express'; import { DataQueryRepository } from './repository'; import { decode } from 'js-base64'; @@ -22,14 +21,7 @@ export class DataQueriesService implements IDataQueriesService { protected readonly dataQueryRepository: DataQueryRepository, protected readonly dataQueryUtilService: DataQueriesUtilService, protected readonly dataSourceRepository: DataSourcesRepository - ) { } - - async findOne(dataQueryId: string): Promise { - return await this.dataQueryRepository.findOne({ - where: { id: dataQueryId }, - relations: ['dataSource', 'apps', 'dataSource.apps', 'plugins'], - }); - } + ) {} async getAll(user: User, versionId: string, mode?: string) { const queries = await this.dataQueryRepository.getAll(versionId); From d49bbfd68bf314f49003ec311760584e5cc9cb8b Mon Sep 17 00:00:00 2001 From: Kartik Gupta Date: Tue, 8 Jul 2025 11:06:54 +0530 Subject: [PATCH 2/5] update submodule --- server/ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ee b/server/ee index a2f4d8b321..7047172a8d 160000 --- a/server/ee +++ b/server/ee @@ -1 +1 @@ -Subproject commit a2f4d8b32155754ad04a2ab82e5379939d0e41cb +Subproject commit 7047172a8dd20115522d0a508055e4905a9425b4 From 72ce46488b2f27b81f1ee91d787eeacca2852443 Mon Sep 17 00:00:00 2001 From: Kartik Gupta Date: Tue, 8 Jul 2025 11:09:39 +0530 Subject: [PATCH 3/5] update submodule --- server/ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ee b/server/ee index 7047172a8d..1fa38b9fce 160000 --- a/server/ee +++ b/server/ee @@ -1 +1 @@ -Subproject commit 7047172a8dd20115522d0a508055e4905a9425b4 +Subproject commit 1fa38b9fce1e19ea9048ea53b3167a84dfad86ab From d82ee5d307bade472fe07c9fef01361a2344cb58 Mon Sep 17 00:00:00 2001 From: Kartik Gupta Date: Tue, 8 Jul 2025 12:59:42 +0530 Subject: [PATCH 4/5] cloud changes --- frontend/src/_services/ai.service.js | 9 ------- server/ee | 2 +- .../modules/ai/interfaces/IAgentsService.ts | 12 ---------- .../src/modules/ai/interfaces/IUtilService.ts | 4 ---- .../src/modules/ai/services/agents.service.ts | 24 ------------------- server/src/modules/ai/util.service.ts | 10 +------- .../controllers/components.controller.ts | 2 +- 7 files changed, 3 insertions(+), 60 deletions(-) diff --git a/frontend/src/_services/ai.service.js b/frontend/src/_services/ai.service.js index 94f273d27d..98f7f10698 100644 --- a/frontend/src/_services/ai.service.js +++ b/frontend/src/_services/ai.service.js @@ -4,7 +4,6 @@ import { fetchEventSource } from '@microsoft/fetch-event-source'; export const aiService = { generateApp, - createComponent, createQuery, updateComponent, createEvent, @@ -60,14 +59,6 @@ function generateApp(prompt) { return fetch(`${config.apiUrl}/ai/generateApp`, requestOptions).then(handleResponse); } -function createComponent(prompt) { - const body = { - prompt, - }; - const requestOptions = { method: 'POST', headers: authHeader(), credentials: 'include', body: JSON.stringify(body) }; - return fetch(`${config.apiUrl}/agents/create-components`, requestOptions).then(handleResponse); -} - function createQuery(prompt) { const body = { prompt, diff --git a/server/ee b/server/ee index 1fa38b9fce..be52da988c 160000 --- a/server/ee +++ b/server/ee @@ -1 +1 @@ -Subproject commit 1fa38b9fce1e19ea9048ea53b3167a84dfad86ab +Subproject commit be52da988c1d90c2f9bc1c92642d581d0b6aa238 diff --git a/server/src/modules/ai/interfaces/IAgentsService.ts b/server/src/modules/ai/interfaces/IAgentsService.ts index 924ada16ed..f31947f7a4 100644 --- a/server/src/modules/ai/interfaces/IAgentsService.ts +++ b/server/src/modules/ai/interfaces/IAgentsService.ts @@ -1,16 +1,4 @@ export interface IAgentsService { - createComponent(prompt: string, organizationId: string): Promise; - - createQuery(prompt: string, tableName: string, columns: string, organizationId: string): Promise; - - createEvent(prompt: string, pageId: string[], organizationId: string): Promise; - - Agentic(prompt: string, organizationId: string): Promise; - - PromptEnrichment(prd_data: { content: string; metadata?: any }, organizationId: string): Promise; - - PromptEnrichmentChat(prompt: string, oldContext: any[], organizationId: string): Promise; - CreateTable(organizationId: string, tables: any): Promise; docs(prompt: string, organizationId: string): Promise; diff --git a/server/src/modules/ai/interfaces/IUtilService.ts b/server/src/modules/ai/interfaces/IUtilService.ts index 83dd53d357..cb98cfdb16 100644 --- a/server/src/modules/ai/interfaces/IUtilService.ts +++ b/server/src/modules/ai/interfaces/IUtilService.ts @@ -34,10 +34,6 @@ export interface IAiUtilService { getQueriesfromsteps(steps: any): Promise; - createQuerySteps(prd: string, lld: string, tableName: any, components: any, organizationId: any): Promise; - - createEventSteps(prd: string, Query: any, components: any, organizationId: any): Promise; - convertToSteps(jsonData: any): Promise; getColorScheme(prd: any): any; diff --git a/server/src/modules/ai/services/agents.service.ts b/server/src/modules/ai/services/agents.service.ts index 67fb9dd963..ad6059363b 100644 --- a/server/src/modules/ai/services/agents.service.ts +++ b/server/src/modules/ai/services/agents.service.ts @@ -4,30 +4,6 @@ import { IAgentsService } from '../interfaces/IAgentsService'; @Injectable() export class AgentsService implements IAgentsService { constructor() {} - // Agents methods - async createComponent(prompt: string, organizationId): Promise { - throw new Error('Method not implemented.'); - } - - async createQuery(prompt: string, tableName: string, columns: string, organizationId): Promise { - throw new Error('Method not implemented.'); - } - - async createEvent(prompt: string, pageId: string[], organizationId): Promise { - throw new Error('Method not implemented.'); - } - - async Agentic(prompt: string, organizationId): Promise { - throw new Error('Method not implemented.'); - } - - async PromptEnrichment(prd_data: { content: string; metadata?: any }, organizationId: string): Promise { - throw new Error('Method not implemented.'); - } - - async PromptEnrichmentChat(prompt: string, oldContext: any[], organizationId): Promise { - throw new Error('Method not implemented.'); - } async CreateTable(organizationId: string, tables): Promise { throw new Error('Method not implemented.'); diff --git a/server/src/modules/ai/util.service.ts b/server/src/modules/ai/util.service.ts index e90233d5e2..157fb97396 100644 --- a/server/src/modules/ai/util.service.ts +++ b/server/src/modules/ai/util.service.ts @@ -2,7 +2,7 @@ import { IAiUtilService } from './interfaces/IUtilService'; export class AiUtilService implements IAiUtilService { constructor() {} - + public getAgentAssetPath(filename) { throw new Error('Method not implemented.'); } @@ -35,14 +35,6 @@ export class AiUtilService implements IAiUtilService { throw new Error('Method not implemented.'); } - async createQuerySteps(prd: string, lld: string, tableName, components, organizationId) { - throw new Error('Method not implemented.'); - } - - async createEventSteps(prd: string, Query: any, components: any, organizationId: any): Promise { - throw new Error('Method not implemented.'); - } - async convertToSteps(jsonData: any): Promise { throw new Error('Method not implemented.'); } diff --git a/server/src/modules/versions/controllers/components.controller.ts b/server/src/modules/versions/controllers/components.controller.ts index e91e30e791..22c7c22e91 100644 --- a/server/src/modules/versions/controllers/components.controller.ts +++ b/server/src/modules/versions/controllers/components.controller.ts @@ -24,7 +24,7 @@ import { IComponentsController } from '../interfaces/controllers/IComponentsCont version: '2', }) export class ComponentsController implements IComponentsController { - constructor(protected readonly componentsService: ComponentsService) {} + constructor(protected readonly componentsService: ComponentsService) { } @InitFeature(FEATURE_KEY.CREATE_COMPONENTS) @UseGuards(JwtAuthGuard, ValidAppGuard, FeatureAbilityGuard) From 1c5ff28263ca478c64df95e36fbe18f6a3727380 Mon Sep 17 00:00:00 2001 From: Kartik Gupta Date: Tue, 8 Jul 2025 14:02:07 +0530 Subject: [PATCH 5/5] cloud changes --- server/ee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ee b/server/ee index be52da988c..64700ebb0b 160000 --- a/server/ee +++ b/server/ee @@ -1 +1 @@ -Subproject commit be52da988c1d90c2f9bc1c92642d581d0b6aa238 +Subproject commit 64700ebb0b4e55f0df0992cd6085231898989490