MCPcopy
hub / github.com/github/awesome-copilot / findingActions

Function findingActions

extensions/java-modernization-studio/renderer.mjs:477–490  ·  view source on GitHub ↗
(x, ord)

Source from the content-addressed store, hash-verified

475 }
476
477 function findingActions(x, ord) {
478 const act = x.action;
479 if (isFindingLocked(x, ord)) {
480 const why = '<span class="smuted lockwhy">🔒 fix ' + esc(shortPhase(ord.activePhase)) + " issues first</span>";
481 if (act && act.kind && act.kind !== "fix_finding") {
482 return why + btn(act.label || "Run this step", act.kind, act.payload || {}) + btn("Help me fix this", "fix_finding", findingCtx(x));
483 }
484 return why + btn((act && act.label) || "Help me fix this", "fix_finding", findingCtx(x));
485 }
486 if (act && act.kind && act.kind !== "fix_finding") {
487 return btn(act.label || "Run this step", act.kind, act.payload || {}, { primary: true }) + btn("Help me fix this", "fix_finding", findingCtx(x));
488 }
489 return btn((act && act.label) || "Help me fix this", "fix_finding", findingCtx(x), { primary: true });
490 }
491
492 function findingCtx(x) {
493 return { title: x.title, detail: x.detail, files: x.files, severity: x.severity };

Callers 1

findingCardFunction · 0.85

Calls 5

isFindingLockedFunction · 0.85
escFunction · 0.85
shortPhaseFunction · 0.85
btnFunction · 0.85
findingCtxFunction · 0.85

Tested by

no test coverage detected