Open
Description
Like we do for generating spoken forms, we'd like to be able to generate a description of what a given command does. We could use this for
- the command decoder (eg the transcript in https://pokey.github.io/videos/op3VQvua67k/#bb592ada-3cb0-4bb4-93b4-aaf041ad7430)
- Generate cheatsheet extension-side #2099
- keyboard: add sidebar #2097
- Command examples in documentation
- Including them as a field in our recorded tests would make it clearer what they do for new users / contributors
For example:
{
"name": "remove",
"target": {
"type": "primitive",
"mark": {
"type": "decoratedSymbol",
"symbolColor": "default",
"character": "a"
},
"modifiers": [
{
"type": "containingScope",
"scopeType": {
"type": "line"
}
}
]
}
}
would map to
"delete the line containing the token with a gray hat over the `a`"
Might be nice if the output could have a little structure, so that in rich contexts, eg web, it would render as
Would also be good to support having placeholders at various places in a command. We could define a special symbol called PLACEHOLDER
Eg
{
"name": "remove",
"target": {
"type": "primitive",
"mark": PLACEHOLDER,
"modifiers": [
{
"type": "containingScope",
"scopeType": {
"type": "line"
}
}
]
}
}
would render to
"delete the line containing <mark>"
Note also that we may want to generate from the post-inference command 🤔
Metadata
Metadata
Assignees
Labels
No labels