Add preconfigured Workflow creation agent (#13855)

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Abdul Rahman
2025-08-27 17:50:38 +05:30
committed by GitHub
parent 28de78bfc0
commit 9098df7ddf
50 changed files with 1949 additions and 339 deletions
@@ -0,0 +1,21 @@
import { type AgentEntity } from 'src/engine/metadata-modules/agent/agent.entity';
import { type FlatAgent } from 'src/engine/metadata-modules/flat-agent/types/flat-agent.type';
export const transformAgentEntityToFlatAgent = (
agentEntity: AgentEntity,
): FlatAgent => {
return {
id: agentEntity.id,
standardId: agentEntity.standardId,
name: agentEntity.name,
label: agentEntity.label,
icon: agentEntity.icon,
description: agentEntity.description,
prompt: agentEntity.prompt,
modelId: agentEntity.modelId,
responseFormat: agentEntity.responseFormat,
workspaceId: agentEntity.workspaceId,
isCustom: agentEntity.isCustom,
uniqueIdentifier: agentEntity.standardId || agentEntity.id,
};
};
@@ -0,0 +1,16 @@
import { v4 } from 'uuid';
import { type FlatAgent } from 'src/engine/metadata-modules/flat-agent/types/flat-agent.type';
import { type StandardAgentDefinition } from 'src/engine/workspace-manager/workspace-sync-metadata/standard-agents/types/standard-agent-definition.interface';
export const transformStandardAgentDefinitionToFlatAgent = (
standardAgentDefinition: StandardAgentDefinition,
workspaceId: string,
): FlatAgent => {
return {
...standardAgentDefinition,
id: v4(),
workspaceId,
uniqueIdentifier: standardAgentDefinition.standardId || v4(),
};
};