MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / extract_first_item

Function extract_first_item

scripts/issue_duplicate_check_openhands.py:265–276  ·  view source on GitHub ↗
(payload: Any)

Source from the content-addressed store, hash-verified

263
264
265def extract_first_item(payload: Any) -> dict[str, Any] | None:
266 if isinstance(payload, list):
267 first_item = payload[0] if payload else None
268 return first_item if isinstance(first_item, dict) else None
269 if not isinstance(payload, dict):
270 return None
271
272 items = payload.get('items')
273 if isinstance(items, list):
274 first_item = items[0] if items else None
275 return first_item if isinstance(first_item, dict) else None
276 return payload
277
278
279def poll_start_task(

Callers 2

poll_start_taskFunction · 0.70
poll_conversationFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected