{% from "_macros.html" import icon, section_toggle %} {# The folder tree and the unfiled chats -- on the Agents side, a section per device. Its own partial because it is rendered from two places: the sidebar on every page, and `POST /api/preferences/sidebar-kind` when the switch is flicked. Pinned models stay above it in `sidebar.html` -- they start a chat of either kind and are not part of what is being switched. The switch itself lives above the scroll area (`_sidebar_actions.html`), outside this fragment: it is two native radios whose checked state the browser keeps, and with "New chat" gone from that row nothing there changes with the side. Every section heading is `section_toggle` (`_macros.html`) -- the name and the chevron as one button that folds the section, remembered on the account under `sections` and rendered from it, so neither a reload nor an out-of-band swap of this fragment opens what somebody shut. Folders are the Chats side's alone (`sidebar_context` hands the Agents side none), and each root folder is a section of its own -- `[ NAME ]` with its actions beside it, the way `[ CHATS ]` and each device are -- rather than a row under a `[ FOLDERS ]` label. `sidebar_kind` is still passed down to `_folder.html`, which narrows each folder's own chats with it. #}