fix: picking a prompt from / in a channel inserts the prompt text (#32713)

This commit is contained in:
G30 2026-10-20 14:26:24 -04:00 • committed by GitHub
parent 46cdd70d7b
commit 1d0b782719
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) => {