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

Function settings

deployments/desktop/shared/agents.py:1060–1117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1058 name = str(item.get("name") or "").strip()
1059 if not name:
1060 continue
1061 conferences.append(
1062 {
1063 "id": name,
1064 "label": name,
1065 "group": str(item.get("venue_type") or ""),
1066 "source": str(item.get("source") or ""),
1067 "venue_id": str(item.get("venue_id") or ""),
1068 "acceptance_timeline": str(item.get("acceptance_timeline") or ""),
1069 "conference_date": str(item.get("conference_date") or ""),
1070 "enabled": bool(item.get("enabled", True)),
1071 }
1072 )
1073 except Exception:
1074 conferences = [{"id": name, "label": name, "enabled": True} for name in daily_agent.load_default_conferences()]
1075
1076 journals: List[Dict[str, Any]] = []
1077 try:
1078 config = yaml.safe_load((PROJECT_ROOT / "config" / "journals.yaml").read_text(encoding="utf-8")) or {}
1079 for group, items in (config.get("journals", {}) or {}).items():
1080 for item in items or []:
1081 name = str(item.get("name") or "").strip()
1082 if not name:
1083 continue
1084 journals.append(
1085 {
1086 "id": name,
1087 "label": name,
1088 "group": str(group or ""),
1089 "enabled": bool(item.get("enabled", True)),
1090 }
1091 )
1092 except Exception:
1093 journals = [{"id": name, "label": name, "enabled": True} for name in daily_agent.load_default_journals()]
1094
1095 return {
1096 "arxiv_categories": arxiv_items,
1097 "conferences": conferences,
1098 "journals": journals,
1099 }
1100
1101
1102@contextmanager
1103def _local_only_feishu_doc_patch(enabled: bool):
1104 if not enabled:
1105 yield
1106 return
1107 with _FEISHU_DOC_PATCH_LOCK:
1108 original = reading_agent.create_doc
1109
1110 def fake_create_doc(title: str, content: str, folder_id: Optional[str] = None) -> Dict[str, Any]:
1111 return {
1112 "url": None,
1113 "obj_token": None,
1114 "local_only": True,
1115 "title": title,
1116 "folder_id": folder_id,
1117 }

Callers 2

save_settingsFunction · 0.85

Calls 12

_env_textFunction · 0.85
_to_floatFunction · 0.85
_configured_pathFunction · 0.85
_storage_statsFunction · 0.85
_safe_envFunction · 0.85
_env_edit_payloadFunction · 0.85
_env_listFunction · 0.70
_env_boolFunction · 0.70

Tested by

no test coverage detected