allow copilot to delete things, set start agent

This commit is contained in:
Ramnique Singh 2025-08-21 07:43:21 +05:30
parent d2e590956b
commit aef3771cd5
5 changed files with 156 additions and 22 deletions

View file

@ -1,9 +1,11 @@
import { WorkflowTool, WorkflowAgent, WorkflowPrompt, WorkflowPipeline } from "./types/workflow_types";
import { z } from "zod";
const ZFallbackSchema = z.object({}).passthrough();
export function validateConfigChanges(configType: string, configChanges: Record<string, unknown>, name: string) {
let testObject: any;
let schema: z.ZodType<any>;
let schema: z.ZodType<any> = ZFallbackSchema;
switch (configType) {
case 'tool': {
@ -56,6 +58,10 @@ export function validateConfigChanges(configType: string, configChanges: Record<
schema = WorkflowPipeline;
break;
}
case 'start_agent': {
testObject = {};
break;
}
default:
return { error: `Unknown config type: ${configType}` };
}