feat: decline pending action
This commit is contained in:
@@ -241,6 +241,20 @@ class ToolRegistry:
|
||||
return {"error": f"Pending action not found: {action_id}"}
|
||||
return await self.uex.post(action.endpoint, action.payload, authenticated=True)
|
||||
|
||||
async def decline(self, action_id: str) -> dict[str, Any]:
|
||||
action = self.pending_actions.pop(action_id, None)
|
||||
if not action:
|
||||
return {"error": f"Pending action not found: {action_id}"}
|
||||
return {
|
||||
"declined": True,
|
||||
"pending_action": {
|
||||
"id": action.id,
|
||||
"label": action.label,
|
||||
"endpoint": action.endpoint,
|
||||
"payload": action.payload,
|
||||
},
|
||||
}
|
||||
|
||||
async def search_marketplace_listings(
|
||||
self,
|
||||
query: str | None = None,
|
||||
|
||||
Reference in New Issue
Block a user