S8 unread-away: Unread of a state and a view, the away answers, the start's phase
Builds: design 47 H2 H-A-708 (1) (2), H-A-717 (DQ-54, DQ-58)
This commit is contained in:
@@ -301,6 +301,12 @@ func ServeOn(name string, tools []Tool, in io.Reader, out io.Writer) error {
|
||||
args = map[string]any{}
|
||||
}
|
||||
result, err := runAs(t, inFlight{caller, call, ask}, args)
|
||||
// A tool's `away` fault is its result in §776's form, so it reaches the caller whole (design 47 H2 H-A-708 (2),
|
||||
// H-A-717 DQ-58); any other fault is an error as before.
|
||||
var away *busretry.Away
|
||||
if errors.As(err, &away) {
|
||||
result, err = busretry.AwayAnswer(away.Part, away.Words), nil
|
||||
}
|
||||
if err != nil {
|
||||
c.say(map[string]any{"id": id, "result": map[string]any{"content": []map[string]any{{"type": "text", "text": err.Error()}}, "isError": true}})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user