Elffuss BraidHub

kikocis/continue public

fix: allow prompts starting with `/` (#6704)

fix: allow prompts starting with /
Changeset9aac2b5c28a40c054e6bbae1e37c8544554f1d8ace38711ba259caa7be4a8283
AuthorAditya Mitra <61635505+uinstinct@users.noreply.github.com> · 2025-07-18 21:03 +05:30
CommitterGitHub <noreply@github.com> · 2025-07-18 08:33 -07:00
Parentsad83f3cc5301

Browse the files at this changeset

1 file changed

modified gui/src/components/mainInput/TipTapEditor/extensions/SlashCommand.ts +3 −0
@@ -15,6 +15,9 @@
1515 addOptions() {
1616 return {
1717 suggestion: {
18+ allow: ({ editor }) =>
19+ // the first character is "/". we want to avoid slash commands when there is a space after it
20+ editor.getText().at(1) !== " ",
1821 char: "/",
1922 pluginKey: new PluginKey(this.name),
2023 startOfLine: true,