MCPcopy Create free account
hub / github.com/Waishnav/devspace / setPayloadLoading

Function setPayloadLoading

src/ui/workspace-app.tsx:446–458  ·  view source on GitHub ↗
(container: HTMLElement, loading: boolean)

Source from the content-addressed store, hash-verified

444}
445
446function setPayloadLoading(container: HTMLElement, loading: boolean): void {
447 const header = container.previousElementSibling;
448 const chevron = header?.querySelector<HTMLElement>(".chevron");
449 if (!chevron) return;
450
451 chevron.classList.toggle("loading", loading);
452 chevron.innerHTML = loading
453 ? iconSvg('<circle cx="12" cy="12" r="8" />')
454 : iconSvg('<path d="m6 9 6 6 6-6" />');
455
456 const button = header instanceof HTMLButtonElement ? header : null;
457 if (button) button.setAttribute("aria-busy", String(loading));
458}
459
460function workspacePayloadText(card: ToolResultCard): string {
461 const agentsFiles = card.agentsFiles ?? [];

Callers 1

renderPayloadIfNeededFunction · 0.85

Calls 1

iconSvgFunction · 0.85

Tested by

no test coverage detected