Skip to content

Automatically generate human-readable description of command #2096

Open
@pokey

Description

@pokey

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

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

delete the line containing a

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions