()
| 529 | }; |
| 530 | |
| 531 | const renderTips = () => { |
| 532 | if (!tipsBodyEl) return; |
| 533 | tipsBodyEl.innerHTML = ''; |
| 534 | const groups = getTipGroups(); |
| 535 | groups.forEach((group) => { |
| 536 | const section = document.createElement('div'); |
| 537 | section.style.display = 'flex'; |
| 538 | section.style.flexDirection = 'column'; |
| 539 | section.style.gap = '6px'; |
| 540 | |
| 541 | const title = document.createElement('div'); |
| 542 | title.style.fontSize = '11px'; |
| 543 | title.style.fontWeight = '700'; |
| 544 | title.style.letterSpacing = '.05em'; |
| 545 | title.style.textTransform = 'uppercase'; |
| 546 | title.style.opacity = '.74'; |
| 547 | title.textContent = group.title; |
| 548 | section.appendChild(title); |
| 549 | |
| 550 | const rail = document.createElement('div'); |
| 551 | rail.style.display = 'flex'; |
| 552 | rail.style.gap = '8px'; |
| 553 | rail.style.flexWrap = 'wrap'; |
| 554 | |
| 555 | group.items.forEach((item) => { |
| 556 | const btn = document.createElement('button'); |
| 557 | btn.type = 'button'; |
| 558 | btn.className = 'btn btn-sm btn-light'; |
| 559 | btn.style.borderRadius = '999px'; |
| 560 | btn.style.padding = '4px 10px'; |
| 561 | btn.style.fontSize = '11px'; |
| 562 | btn.style.lineHeight = '1.2'; |
| 563 | btn.textContent = String(item.label || ''); |
| 564 | btn.title = String(item.prompt || ''); |
| 565 | btn.addEventListener('click', () => insertTipPrompt(item.prompt)); |
| 566 | rail.appendChild(btn); |
| 567 | }); |
| 568 | |
| 569 | section.appendChild(rail); |
| 570 | tipsBodyEl.appendChild(section); |
| 571 | }); |
| 572 | |
| 573 | if (tipsSummaryEl) { |
| 574 | tipsSummaryEl.textContent = `${groups.length} example groups`; |
| 575 | } |
| 576 | }; |
| 577 | |
| 578 | const renderRecipeRail = () => { |
| 579 | if (!recipeRailEl) return; |
no test coverage detected