First Application POC (#14382)
Quick proof of concept for twenty-apps + twenty-cli, with local development / hot reload Let's discuss it! https://github.com/user-attachments/assets/c6789936-cd5f-4110-a265-863a6ac1af2d
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
|
||||
|
||||
import { ModelId } from 'src/engine/core-modules/ai/constants/ai-models.const';
|
||||
import { ApplicationEntity } from 'src/engine/core-modules/application/application.entity';
|
||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
|
||||
import { AgentChatThreadEntity } from './agent-chat-thread.entity';
|
||||
@@ -56,6 +57,9 @@ export class AgentEntity {
|
||||
@Column({ nullable: false, type: 'uuid' })
|
||||
workspaceId: string;
|
||||
|
||||
@Column({ nullable: true, type: 'uuid' })
|
||||
applicationId: string | null;
|
||||
|
||||
@Column({ default: false })
|
||||
isCustom: boolean;
|
||||
|
||||
@@ -65,6 +69,13 @@ export class AgentEntity {
|
||||
@JoinColumn({ name: 'workspaceId' })
|
||||
workspace: Relation<Workspace>;
|
||||
|
||||
@ManyToOne(() => ApplicationEntity, {
|
||||
onDelete: 'SET NULL',
|
||||
nullable: true,
|
||||
})
|
||||
@JoinColumn({ name: 'applicationId' })
|
||||
application: Relation<ApplicationEntity> | null;
|
||||
|
||||
@OneToMany(() => AgentChatThreadEntity, (chatThread) => chatThread.agent)
|
||||
chatThreads: Relation<AgentChatThreadEntity[]>;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ export const agentEntityRelationProperties = [
|
||||
'chatThreads',
|
||||
'outgoingHandoffs',
|
||||
'incomingHandoffs',
|
||||
'application',
|
||||
] as const;
|
||||
|
||||
export type AgentEntityRelationProperties =
|
||||
|
||||
+1
@@ -17,5 +17,6 @@ export const transformAgentEntityToFlatAgent = (
|
||||
workspaceId: agentEntity.workspaceId,
|
||||
isCustom: agentEntity.isCustom,
|
||||
universalIdentifier: agentEntity.standardId || agentEntity.id,
|
||||
applicationId: agentEntity.applicationId,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user