diff --git a/src/PromptShape.tsx b/src/PromptShape.tsx index e15b674..15dbff5 100644 --- a/src/PromptShape.tsx +++ b/src/PromptShape.tsx @@ -20,7 +20,7 @@ type IPrompt = TLBaseShape< w: number h: number prompt: string - output: string + value: string agentBinding: string | null } > @@ -37,7 +37,7 @@ export class PromptShape extends BaseBoxShapeUtil { w: 300, h: 50, prompt: "", - output: "", + value: "", agentBinding: null, } } @@ -84,12 +84,15 @@ export class PromptShape extends BaseBoxShapeUtil { this.editor.updateShape({ id: shape.id, type: "prompt", - props: { output: partial, agentBinding: done ? null : 'someone' }, + props: { value: partial, agentBinding: done ? null : 'someone' }, }) }) } const handlePrompt = () => { + if (shape.props.agentBinding) { + return + } let processedPrompt = shape.props.prompt; for (const [key, sourceShape] of Object.entries(inputMap)) { const pattern = `{${key}}`; diff --git a/src/SocialShapeUtil.tsx b/src/SocialShapeUtil.tsx index 86b3fd4..447cf9d 100644 --- a/src/SocialShapeUtil.tsx +++ b/src/SocialShapeUtil.tsx @@ -90,7 +90,7 @@ export class SocialShapeUtil extends BaseBoxShapeUtil { return ( e.stopPropagation()}> -