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 node: Optional[Dict[str, Any]] = None
4371 if node_id:
4372 db_node = wiki_db.get_node(user_id, node_id)
4373 if _wiki_node_is_visible(db_node):
4374 node = db_node
4375 if node is None:
4376 daily_node = None
4377 for entry in _daily_note_reading_entries(scope="all", query=title or node_id, limit=8):
4378 candidate = _daily_note_reading_node(entry)
4379 if node_id and str(candidate.get("node_id") or "") == node_id:
4380 daily_node = candidate
4381 break
4382 if title and str(candidate.get("title") or "").strip().lower() == title.lower():
4383 daily_node = candidate
4384 break
4385 if daily_node is None:
4386 daily_node = candidate
4387 if daily_node is not None:
4388 node = daily_node
4389 if node is None:
4390 query = title or node_id
4391 if query:
4392 hits = wiki_db.search_nodes(user_id, query, limit=5)
4393 filtered_hits = _filter_wiki_nodes_for_configured_dir(hits)
4394 if filtered_hits is not None:

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