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

Function _local_paper_query_tokens

deployments/desktop/shared/agents.py:4241–4246  ·  view source on GitHub ↗
(question: str)

Source from the content-addressed store, hash-verified

4239 has_recent_signal = any(term in normalized for term in _RECENT_CONTEXT_QUERY_TERMS)
4240 return has_paper_signal and has_recent_signal
4241
4242
4243def _comparison_needs_mentions(question: str, resolved_nodes: List[Dict[str, Any]]) -> bool:
4244 normalized = str(question or "").strip().lower()
4245 if len(resolved_nodes or []) >= 2:
4246 return False
4247 has_deictic_pair = any(term in normalized for term in ("这两篇", "这两个", "上述两篇", "上面两篇"))
4248 return has_deictic_pair and any(term in normalized for term in _COMPARE_QUERY_TERMS)
4249

Callers 3

_chat_pinned_nodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected