kin: auto-commit after pipeline
This commit is contained in:
parent
824341a972
commit
e3a286ef6f
5 changed files with 1598 additions and 6 deletions
|
|
@ -126,16 +126,25 @@ def generate_followups(
|
|||
parsed = _try_parse_json(output)
|
||||
if not isinstance(parsed, list):
|
||||
if isinstance(parsed, dict):
|
||||
parsed = parsed.get("tasks") or parsed.get("followups") or []
|
||||
if "tasks" in parsed:
|
||||
parsed = parsed["tasks"]
|
||||
elif "followups" in parsed:
|
||||
parsed = parsed["followups"]
|
||||
else:
|
||||
parsed = []
|
||||
else:
|
||||
return {"created": [], "pending_actions": []}
|
||||
|
||||
# Guard: extracted value might be null/non-list (e.g. {"tasks": null})
|
||||
if not isinstance(parsed, list):
|
||||
parsed = []
|
||||
|
||||
# Separate permission-blocked items from normal ones
|
||||
created = []
|
||||
pending_actions = []
|
||||
|
||||
for item in parsed:
|
||||
if not isinstance(item, dict) or "title" not in item:
|
||||
if not isinstance(item, dict) or not item.get("title"):
|
||||
continue
|
||||
|
||||
if _is_permission_blocked(item):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue