MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / getStep9ErrorVisualSignals

Function getStep9ErrorVisualSignals

content/vps-panel.js:312–335  ·  view source on GitHub ↗
(element, className = '')

Source from the content-addressed store, hash-verified

310}
311
312function getStep9ErrorVisualSignals(element, className = '') {
313 const signals = [];
314 const normalizedClassName = String(className || '').replace(/\s+/g, ' ').trim();
315 if (/(?:error|danger|fail|destructive|text-red|text-danger|alert)/i.test(normalizedClassName)) {
316 signals.push(`class=${getInlineTextSnippet(normalizedClassName, 80)}`);
317 }
318
319 if (!element) {
320 return signals;
321 }
322
323 const style = window.getComputedStyle(element);
324 if (isReddishColor(style.color)) {
325 signals.push(`color=${style.color}`);
326 }
327 if (isReddishColor(style.borderColor)) {
328 signals.push(`border=${style.borderColor}`);
329 }
330 if (isReddishColor(style.backgroundColor)) {
331 signals.push(`background=${style.backgroundColor}`);
332 }
333
334 return signals;
335}
336
337function createStep9Entry(candidate, selector) {
338 const className = String(candidate?.className || '').replace(/\s+/g, ' ').trim();

Callers 1

createStep9EntryFunction · 0.85

Calls 2

getInlineTextSnippetFunction · 0.85
isReddishColorFunction · 0.85

Tested by

no test coverage detected