From faabd384a106941b0489f4fb1a82df4bfdf69f7f Mon Sep 17 00:00:00 2001 From: Peter Zaback Date: Fri, 19 Apr 2024 14:29:30 -0500 Subject: [PATCH] Fix slash command params loading Existing slash commands expect an object named "params" so mapping to "options" here caused params to be undefined within the run scope. I renamed from 'm' to 's' just to avoid potential confusion with the model property mapping above. --- .prettierrc | 3 ++- core/config/load.ts | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.prettierrc b/.prettierrc index 222861c34..d3be6d22e 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,5 @@ { "tabWidth": 2, - "useTabs": false + "useTabs": false, + "trailingComma": "all" } diff --git a/core/config/load.ts b/core/config/load.ts index cdd91aacf..03bd5b416 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -334,10 +334,10 @@ function finalToBrowserConfig( })), systemMessage: final.systemMessage, completionOptions: final.completionOptions, - slashCommands: final.slashCommands?.map((m) => ({ - name: m.name, - description: m.description, - options: m.params, + slashCommands: final.slashCommands?.map((s) => ({ + name: s.name, + description: s.description, + params: s.params, //PZTODO: is this why params aren't referenced properly by slash commands? })), contextProviders: final.contextProviders?.map((c) => c.description), disableIndexing: final.disableIndexing,