(container: HTMLElement, loading: boolean)
| 444 | } |
| 445 | |
| 446 | function 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 | |
| 460 | function workspacePayloadText(card: ToolResultCard): string { |
| 461 | const agentsFiles = card.agentsFiles ?? []; |
no test coverage detected