Exactly like the quick action commands selector, a context selector should be implemented into the prompt input field. But unlike the quick action commands, it can be picked multiple times and should be written inside the prompt text. It should also send the selected context items in an additional attribute in the prompt object.
The available context items should be provided through the data model like the QuickAction commands but in a new attribute field.
We want to allow users to specify a target for the context like workspace or in the future file or folder.
Solution
A new field added in the tabStore data model which is called contextCommands and accepts an array of QuickActionCommandGroup
Prompt input text field listens @ character insertion and enables the overlay picker for the provided context items if there is any.
Prompt input checks if the letter trying to be removed with DEL or BACKSPACE, it checks if the cursor position is in a word which is a mention (starts with @) and removes the whole word/mention.
All DOCS are updated with the according information of contextCommands addition.
Example app is also updated to showcase the context selector functionality.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Problem
Exactly like the quick action commands selector, a context selector should be implemented into the prompt input field. But unlike the quick action commands, it can be picked multiple times and should be written inside the prompt text. It should also send the selected context items in an additional attribute in the
prompt
object. The available context items should be provided through the data model like the QuickAction commands but in a new attribute field.We want to allow users to specify a target for the context like
workspace
or in the futurefile
orfolder
.Solution
contextCommands
and accepts an array ofQuickActionCommandGroup
@
character insertion and enables the overlay picker for the provided context items if there is any.@
) and removes the whole word/mention.contextCommands
addition.License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.