agent
This commit is contained in:
@@ -93,15 +93,6 @@ func StuckOrders(deliveries DeliveryReader, now func() time.Time) Tool {
|
||||
Default: StuckLookMinutes,
|
||||
}}},
|
||||
Handler: func(_ context.Context, req Request) (Result, error) {
|
||||
// The tenant comes from the verified session, never from an
|
||||
// argument. There is deliberately no `tenantid` field on the schema
|
||||
// above: a tool that accepted one would let the model be talked into
|
||||
// reading somebody else's shop, and the model is the one part of
|
||||
// this system that can be argued with.
|
||||
if req.Caller.Tenantid <= 0 {
|
||||
return Result{}, fmt.Errorf("stuck_orders needs a tenant; staff must pick one first")
|
||||
}
|
||||
|
||||
threshold := req.Int("minutes_waiting")
|
||||
if threshold <= 0 {
|
||||
threshold = StuckLookMinutes
|
||||
|
||||
Reference in New Issue
Block a user