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

Function saveSettings

deployments/desktop/static/app.js:1338–1355  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1336}
1337
1338async function saveSettings() {
1339 const values = {};
1340 document.querySelectorAll("[data-env-key]").forEach((input) => {
1341 values[input.dataset.envKey] = input.value;
1342 });
1343 setStatus("保存运行设置", true);
1344 const data = await api("/api/settings", {
1345 method: "POST",
1346 body: JSON.stringify({ values }),
1347 });
1348 const paths = data.paths || {};
1349 renderEnvSettings(data.editable_env || []);
1350 ["writeFeishuReports", "directWriteFeishu", "directPdfWriteFeishu"].forEach((id) => {
1351 const target = $(id);
1352 if (target) target.checked = Boolean(paths.write_feishu);
1353 });
1354 setStatus("运行设置已保存");
1355}
1356
1357async function testProvider(kind) {
1358 const label = kind === "embedding" ? "Embedding" : "LLM";

Callers

nothing calls this directly

Calls 4

renderEnvSettingsFunction · 0.85
setStatusFunction · 0.70
apiFunction · 0.70
$Function · 0.70

Tested by

no test coverage detected