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:
Félix Malfait
2025-09-10 15:12:38 +02:00
committed by GitHub
parent 9a05daa624
commit 30a2164980
79 changed files with 5515 additions and 365 deletions
@@ -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 =
@@ -17,5 +17,6 @@ export const transformAgentEntityToFlatAgent = (
workspaceId: agentEntity.workspaceId,
isCustom: agentEntity.isCustom,
universalIdentifier: agentEntity.standardId || agentEntity.id,
applicationId: agentEntity.applicationId,
};
};