From b7c024c8c5b85f91828d6cd20ffc3bfca229af21 Mon Sep 17 00:00:00 2001 From: "A.J. Shulman" Date: Wed, 7 Aug 2024 13:08:41 -0400 Subject: trying to get rules to delete after using rool --- src/client/views/nodes/ChatBox/tools/BaseTool.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/client/views/nodes/ChatBox/tools') diff --git a/src/client/views/nodes/ChatBox/tools/BaseTool.ts b/src/client/views/nodes/ChatBox/tools/BaseTool.ts index 903161bd5..c7942e359 100644 --- a/src/client/views/nodes/ChatBox/tools/BaseTool.ts +++ b/src/client/views/nodes/ChatBox/tools/BaseTool.ts @@ -11,13 +11,20 @@ export abstract class BaseTool = Record; - getActionRule(): Record { + getActionRule(isCurrentTool: boolean): Record { + if (isCurrentTool) { + return { + [this.name]: { + name: this.name, + useRules: this.useRules, + description: this.description, + parameters: this.parameters, + }, + }; + } return { [this.name]: { - name: this.name, - useRules: this.useRules, - description: this.description, - parameters: this.parameters, + description: 'This tool is not currently selected.', }, }; } -- cgit v1.2.3-70-g09d2