You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**span**|[`Span`](#span)| The span in the source code that the label should point to. |
529
+
530
+
It is strongly preferred to provide labeled messages whenever possible to let the user know where the problem might be in their script. If there is no more suitable span from a value that can be used, `head` from [`EvaluatedCall`](#evaluatedcall) is a good fallback.
519
531
520
532
Example:
521
533
@@ -525,12 +537,24 @@ Example:
525
537
0,
526
538
{
527
539
"Error": {
528
-
"label": "A really bad error occurred",
529
-
"msg": "I don't know, but it's over nine thousand!",
530
-
"span": {
531
-
"start": 9001,
532
-
"end": 9007
533
-
}
540
+
"msg": "A really bad error occurred",
541
+
"labels": [
542
+
{
543
+
"text": "I don't know, but it's over nine thousand!",
"help": "you can solve this by not doing the bad thing",
553
+
"inner": [
554
+
{
555
+
"msg": "The bad thing"
556
+
}
557
+
]
534
558
}
535
559
}
536
560
]
@@ -777,6 +801,22 @@ Example:
777
801
}
778
802
```
779
803
804
+
#### `GetHelp` engine call
805
+
806
+
Get fully formatted help text for the current command. This can help with implementing top-level commands that just list their subcommands, rather than implementing any specific functionality. The response on success is [`Value` pipeline data](#pipelinedataheader-value) that always contains a string.
807
+
808
+
Example:
809
+
810
+
```json
811
+
{
812
+
"EngineCall": {
813
+
"context": 1,
814
+
"id": 2,
815
+
"call": "GetHelp"
816
+
}
817
+
}
818
+
```
819
+
780
820
#### `EvalClosure` engine call
781
821
782
822
Pass a [`Closure`](#closure) and arguments to the engine to be evaluated. Returns a [`PipelineData` response](#pipelinedata-engine-call-response) if successful with the output of the closure, which may be a stream.
0 commit comments