MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / format_pending_direction_prompt

Function format_pending_direction_prompt

agents/master-coordinator/main.py:728–741  ·  view source on GitHub ↗

Format a short confirmation prompt for pending canonical directions.

(pending_candidates: List[Dict[str, Any]])

Source from the content-addressed store, hash-verified

726
727
728def format_pending_direction_prompt(pending_candidates: List[Dict[str, Any]]) -> str:
729 """Format a short confirmation prompt for pending canonical directions."""
730 if not pending_candidates:
731 return ""
732 if len(pending_candidates) == 1:
733 candidate = pending_candidates[0]
734 label = candidate.get("name_cn") or candidate.get("name") or candidate.get("candidate_key")
735 return f"发现候选新方向:{label},回复“确认方向:{label}”后纳入统一方向库。"
736
737 lines = ["发现候选新方向,请任选其一确认:"]
738 for candidate in pending_candidates[:3]:
739 label = candidate.get("name_cn") or candidate.get("name") or candidate.get("candidate_key")
740 lines.append(f"- {label}:回复“确认方向:{label}”")
741 return "\n".join(lines)
742
743
744def merge_unique_message_sections(*sections: Any) -> str:

Callers 1

handle_profile_updateMethod · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected