cloud changes

This commit is contained in:
Kartik Gupta 2025-07-08 12:59:42 +05:30
parent 72ce46488b
commit d82ee5d307
7 changed files with 3 additions and 60 deletions

View file

@ -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,

@ -1 +1 @@
Subproject commit 1fa38b9fce1e19ea9048ea53b3167a84dfad86ab
Subproject commit be52da988c1d90c2f9bc1c92642d581d0b6aa238

View file

@ -1,16 +1,4 @@
export interface IAgentsService {
createComponent(prompt: string, organizationId: string): Promise<any>;
createQuery(prompt: string, tableName: string, columns: string, organizationId: string): Promise<any>;
createEvent(prompt: string, pageId: string[], organizationId: string): Promise<any>;
Agentic(prompt: string, organizationId: string): Promise<any>;
PromptEnrichment(prd_data: { content: string; metadata?: any }, organizationId: string): Promise<any>;
PromptEnrichmentChat(prompt: string, oldContext: any[], organizationId: string): Promise<any>;
CreateTable(organizationId: string, tables: any): Promise<any>;
docs(prompt: string, organizationId: string): Promise<any>;

View file

@ -34,10 +34,6 @@ export interface IAiUtilService {
getQueriesfromsteps(steps: any): Promise<any>;
createQuerySteps(prd: string, lld: string, tableName: any, components: any, organizationId: any): Promise<any>;
createEventSteps(prd: string, Query: any, components: any, organizationId: any): Promise<any>;
convertToSteps(jsonData: any): Promise<any>;
getColorScheme(prd: any): any;

View file

@ -4,30 +4,6 @@ import { IAgentsService } from '../interfaces/IAgentsService';
@Injectable()
export class AgentsService implements IAgentsService {
constructor() {}
// Agents methods
async createComponent(prompt: string, organizationId): Promise<any> {
throw new Error('Method not implemented.');
}
async createQuery(prompt: string, tableName: string, columns: string, organizationId): Promise<any> {
throw new Error('Method not implemented.');
}
async createEvent(prompt: string, pageId: string[], organizationId): Promise<any> {
throw new Error('Method not implemented.');
}
async Agentic(prompt: string, organizationId): Promise<any> {
throw new Error('Method not implemented.');
}
async PromptEnrichment(prd_data: { content: string; metadata?: any }, organizationId: string): Promise<any> {
throw new Error('Method not implemented.');
}
async PromptEnrichmentChat(prompt: string, oldContext: any[], organizationId): Promise<any> {
throw new Error('Method not implemented.');
}
async CreateTable(organizationId: string, tables): Promise<any> {
throw new Error('Method not implemented.');

View file

@ -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<any> {
throw new Error('Method not implemented.');
}
async convertToSteps(jsonData: any): Promise<any> {
throw new Error('Method not implemented.');
}

View file

@ -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)