From 1d0b78271910cb5a20e121fd586389906b87dbbe Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Tue, 20 Oct 2026 14:26:24 -0400 Subject: [PATCH] fix: picking a prompt from / in a channel inserts the prompt text (#32713) --- src/lib/components/channel/MessageInput.svelte | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib/components/channel/MessageInput.svelte b/src/lib/components/channel/MessageInput.svelte index f9844af5c8..dbf1bf6382 100644 --- a/src/lib/components/channel/MessageInput.svelte +++ b/src/lib/components/channel/MessageInput.svelte @@ -711,6 +711,24 @@ : []), { char: '/', + command: ({ editor, range, props }) => { + if (props?.type === 'prompt') { + void insertTextAtCursor(props.content ?? ''); + return; + } + + editor + .chain() + .focus() + .insertContentAt(range, [ + { + type: 'mention', + attrs: { ...props, mentionSuggestionChar: '/' } + }, + { type: 'text', text: ' ' } + ]) + .run(); + }, render: getSuggestionRenderer(CommandSuggestionList, { i18n, onSelect: (e) => {