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

Function _local_only_feishu_doc_patch

deployments/desktop/shared/agents.py:1009–1029  ·  view source on GitHub ↗
(enabled: bool)

Source from the content-addressed store, hash-verified

1007 )
1008 except Exception:
1009 journals = [{"id": name, "label": name, "enabled": True} for name in daily_agent.load_default_journals()]
1010
1011 return {
1012 "arxiv_categories": arxiv_items,
1013 "conferences": conferences,
1014 "journals": journals,
1015 }
1016
1017
1018@contextmanager
1019def _local_only_feishu_doc_patch(enabled: bool):
1020 if not enabled:
1021 yield
1022 return
1023 with _FEISHU_DOC_PATCH_LOCK:
1024 original = reading_agent.create_doc
1025
1026 def fake_create_doc(title: str, content: str, folder_id: Optional[str] = None) -> Dict[str, Any]:
1027 return {
1028 "url": None,
1029 "obj_token": None,
1030 "local_only": True,
1031 "title": title,
1032 "folder_id": folder_id,

Callers 3

create_reading_reportsFunction · 0.85
read_arxivFunction · 0.85
read_local_pdfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected