From c7abc56b0ced91cd65baf2af718c4e2c9b03803e Mon Sep 17 00:00:00 2001 From: Aditya Mitra <61635505+uinstinct@users.noreply.github.com> Date: Fri, 18 Jul 2025 21:03:38 +0530 Subject: [PATCH] fix: allow prompts starting with `/` (#6704) fix: allow prompts starting with / --- .../mainInput/TipTapEditor/extensions/SlashCommand.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui/src/components/mainInput/TipTapEditor/extensions/SlashCommand.ts b/gui/src/components/mainInput/TipTapEditor/extensions/SlashCommand.ts index 2673c81bd..3502bb9df 100644 --- a/gui/src/components/mainInput/TipTapEditor/extensions/SlashCommand.ts +++ b/gui/src/components/mainInput/TipTapEditor/extensions/SlashCommand.ts @@ -15,6 +15,9 @@ export const SlashCommand = Node.create({ addOptions() { return { suggestion: { + allow: ({ editor }) => + // the first character is "/". we want to avoid slash commands when there is a space after it + editor.getText().at(1) !== " ", char: "/", pluginKey: new PluginKey(this.name), startOfLine: true,