class CustomSidebar extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `

Session

Agent Settings

`; // Event Listeners for Range Sliders this.shadowRoot.getElementById('max-tokens').addEventListener('input', (e) => { this.shadowRoot.getElementById('tokens-val').textContent = e.target.value; }); this.shadowRoot.getElementById('temperature').addEventListener('input', (e) => { this.shadowRoot.getElementById('temp-val').textContent = e.target.value; }); this.shadowRoot.getElementById('top-p').addEventListener('input', (e) => { this.shadowRoot.getElementById('topp-val').textContent = e.target.value; }); // Clear Memory Logic this.shadowRoot.getElementById('clear-mem').addEventListener('click', () => { if(window.MemoryDB) window.MemoryDB.clear(); }); // Replace Icons feather.replace(); } } customElements.define('custom-sidebar', CustomSidebar);