MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / executeRepair

Function executeRepair

static/js/selfcheck.js:345–363  ·  view source on GitHub ↗
(runId, repairKey, btn)

Source from the content-addressed store, hash-verified

343}
344
345async function executeRepair(runId, repairKey, btn) {
346 if (!runId || !repairKey) return;
347 if (btn) loading.show(btn, '执行中...');
348 try {
349 const data = await api.post(`/selfcheck/runs/${Number(runId)}/repairs/${encodeURIComponent(repairKey)}`, {});
350 toast.success(`${getRepairName(repairKey)} 执行完成`);
351 const run = data?.run;
352 if (run?.id) {
353 renderRunDetail(run);
354 await loadRuns();
355 } else {
356 await loadRunDetail(runId);
357 }
358 } catch (error) {
359 toast.error(`修复失败: ${parseErrorMessage(error)}`);
360 } finally {
361 if (btn) loading.hide(btn);
362 }
363}
364
365function collectRepairKeysFromSelectedRun() {
366 const run = selfcheckState.selectedRun;

Callers 1

bindEventsFunction · 0.85

Calls 10

getRepairNameFunction · 0.85
renderRunDetailFunction · 0.85
loadRunsFunction · 0.85
loadRunDetailFunction · 0.85
parseErrorMessageFunction · 0.85
successMethod · 0.80
errorMethod · 0.80
hideMethod · 0.80
showMethod · 0.45
postMethod · 0.45

Tested by

no test coverage detected