Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/server/src/orchestration/Layers/OrchestrationEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ function commandToAggregateRef(command: OrchestrationCommand): {
aggregateKind: "project",
aggregateId: command.projectId,
};
case "thread.branch-from-checkpoint":
return {
aggregateKind: "thread",
aggregateId: command.newThreadId,
};
default:
return {
aggregateKind: "thread",
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,6 @@ export const makeServerLayer = Layer.unwrap(
// satisfied at runtime by PersistenceLayerLive. This is a known TS inference limitation with Effect layers.
export const runServer = Layer.launch(makeServerLayer) as unknown as Effect.Effect<
never,
any,
never,
ServerConfig
>;
10 changes: 4 additions & 6 deletions apps/server/src/workflow/Services/WorkflowService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,10 @@ const makeWorkflowService = Effect.gen(function* () {
}).pipe(Effect.orDie);

const deleteTemplate: WorkflowServiceShape["delete"] = (input) =>
Effect.gen(function* () {
yield* sql`
DELETE FROM workflow_templates
WHERE id = ${input.templateId} AND is_built_in = 0
`;
}).pipe(Effect.orDie);
sql`
DELETE FROM workflow_templates
WHERE id = ${input.templateId} AND is_built_in = 0
`.pipe(Effect.orDie);

const execute: WorkflowServiceShape["execute"] = (input) =>
Effect.gen(function* () {
Expand Down