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

Function _normalize_requested_mentions

deployments/desktop/shared/agents.py:4105–4119  ·  view source on GitHub ↗
(mentions: Any)

Source from the content-addressed store, hash-verified

4103 include_user_node = True
4104 if src_id not in node_by_id and src_id != user_node_id:
4105 continue
4106 if dst_id not in node_by_id and dst_id != user_node_id:
4107 continue
4108 try:
4109 metadata = json.loads(row["metadata_json"] or "{}")
4110 except (TypeError, json.JSONDecodeError):
4111 metadata = {}
4112 edges.append(
4113 {
4114 "src_id": src_id,
4115 "dst_id": dst_id,
4116 "relation": row["relation"],
4117 "weight": float(row["weight"] or 1.0),
4118 "metadata": _compact_wiki_metadata(metadata),
4119 }
4120 )
4121 edges.extend(
4122 edge

Callers 1

_resolve_wiki_mentionsFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected