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 used.add(key)
1008 else:
1009 next_lines.append(line)
1010
1011 missing = [key for key in EDITABLE_ENV_KEYS if key in updates and key not in used]
1012 if missing and next_lines and next_lines[-1].strip():
1013 next_lines.append("")
1014 for key in missing:
1015 next_lines.append(f"{key}={_serialize_env_value(updates[key])}")
1016
1017 ENV_PATH.write_text("\n".join(next_lines).rstrip() + "\n", encoding="utf-8")
1018
1019
1020def save_settings(values: Dict[str, Any]) -> Dict[str, Any]:
1021 updates: Dict[str, str] = {}
1022 for key, value in (values or {}).items():
1023 normalized_key = str(key or "").strip()
1024 if normalized_key not in EDITABLE_ENV_KEYS:
1025 continue
1026 text = str(value or "").strip()
1027 if text == "***":
1028 continue
1029 updates[normalized_key] = text
1030
1031 if not updates:
1032 return settings()

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