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

Function btn

extensions/java-modernization-studio/renderer.mjs:240–251  ·  view source on GitHub ↗
(label, kind, payload, opts)

Source from the content-addressed store, hash-verified

238 }
239
240 function btn(label, kind, payload, opts) {
241 opts = opts || {};
242 const cls = "btn" + (opts.primary ? " primary" : "");
243 // While Autopilot runs, freeze manual actions so a stray click can't inject
244 // a competing prompt into the same session — except Stop and tab navigation.
245 const frozen = autopilotRunning && kind !== "autopilot_stop" && kind !== "autopilot_dismiss" && String(kind).indexOf("goto:") !== 0;
246 const dis = pending || frozen ? " disabled" : "";
247 return (
248 '<button class="' + cls + '" data-kind="' + esc(kind) + '" data-payload="' +
249 esc(JSON.stringify(payload || {})) + '"' + dis + ">" + esc(label) + "</button>"
250 );
251 }
252
253 // ---- tab renderers -------------------------------------------------------
254

Callers 15

overviewTabFunction · 0.85
assessmentTabFunction · 0.85
heroNextFunction · 0.85
heroActionFunction · 0.85
findingActionsFunction · 0.85
autopilotStripFunction · 0.85
autopilotCardFunction · 0.85
planTabFunction · 0.85
stepActionFunction · 0.85
stepRowActionFunction · 0.85
validationTabFunction · 0.85
doctorTabFunction · 0.85

Calls 1

escFunction · 0.85

Tested by

no test coverage detected