package thin import ( "slices" "amadan.net/oficina/equipo/internal/wire" ) // toolPlacesOld: the instance cannot take a place tool yet (below // wire.ProtocolPlaces). For the model; people never read it. const toolPlacesOld = "Equipo needs an update before it can say where sites go or offer to publish one. Tell the person that in one line." // placesRefused answers a place tool here on a link below protocol 31: // Encode refuses the call, so it is never sent to an older instance. func placesRefused(call wire.ToolCall, protocol int) (wire.ToolResult, bool) { if !slices.Contains(wire.PlacesTools, call.Name) || protocol == 0 || protocol >= wire.ProtocolPlaces { return wire.ToolResult{}, false } return wire.ToolResult{CallID: call.CallID, IsError: true, Code: "places_unsupported", Text: toolPlacesOld}, true }