mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-26 08:56:22 +02:00
allow copilot to delete things, set start agent
This commit is contained in:
parent
d2e590956b
commit
aef3771cd5
5 changed files with 156 additions and 22 deletions
|
|
@ -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}` };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue