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

Function _chat_pinned_nodes

deployments/desktop/shared/agents.py:4372–4391  ·  view source on GitHub ↗
(
    *,
    user_id: str,
    question: str,
    resolved_nodes: List[Dict[str, Any]],
    limit: int,
    scope: str = "all",
)

Source from the content-addressed store, hash-verified

4370 "category": category,
4371 "source": "recent_daily_push",
4372 },
4373 "score": _to_float(score, 1.0),
4374 "updated_at": paper.get("pushed_at") or paper.get("updated_at") or "",
4375 }
4376 )
4377 if len(nodes) >= max(1, int(limit or 8)):
4378 break
4379 return nodes
4380
4381
4382def _chat_pinned_nodes(
4383 *,
4384 user_id: str,
4385 question: str,
4386 resolved_nodes: List[Dict[str, Any]],
4387 limit: int,
4388 scope: str = "all",
4389) -> List[Dict[str, Any]]:
4390 pinned = list(resolved_nodes or [])
4391 if _should_pin_recent_papers(question, scope) or pinned:
4392 seen = {str(node.get("node_id") or "") for node in pinned}
4393 remaining = max(0, int(limit or 8) - len(pinned))
4394 query = question if _local_paper_query_tokens(question) else ""

Callers 2

wiki_askFunction · 0.85
wiki_ask_streamFunction · 0.85

Calls 5

_daily_note_reading_nodeFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected