insert command completion as command part (instead of plain)
this prevents the command being sent as plain text this adds a `type` property to completions to decide which parts should be inserted into the composer, hence deciding how they will be rendered.
This commit is contained in:
parent
133e68191a
commit
228905bec2
7 changed files with 25 additions and 13 deletions
|
@ -64,6 +64,7 @@ export default class CommandProvider extends AutocompleteProvider {
|
|||
return matches.map((result) => ({
|
||||
// If the command is the same as the one they entered, we don't want to discard their arguments
|
||||
completion: result.command === command[1] ? command[0] : (result.command + ' '),
|
||||
type: "command",
|
||||
component: <TextualCompletion
|
||||
title={result.command}
|
||||
subtitle={result.args}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue