Skip to content

Commit 16deb6a

Browse files
Krashnicov3clyp50
authored andcommitted
feat: add per-row extension points inside sidebar chat list x-for loop
Adds sidebar-chat-item-start and sidebar-chat-item-end x-extension points inside the x-for loop in chats-list.html. Previously only sidebar-chats-list-start/end existed, both outside the x-for loop. This forced plugins that need per-chat-row UI (e.g. status indicators, labels, badges) to resort to MutationObserver + index-based DOM scanning and monkey-patching internal store methods. With these new extension points, plugins can inject content into each chat row with access to the reactive Alpine context object (context.id, context.name, context.running, context.project, etc.) entirely through declarative Alpine bindings — no DOM scanning, no method patching, no index arithmetic.
1 parent d280500 commit 16deb6a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

webui/components/sidebar/chats/chats-list.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ <h3 class="section-header">Chats</h3>
2626
<li>
2727
<div :class="{'chat-container': true, 'chat-selected': context.id === $store.chats.selected}"
2828
@click="$store.chats.selectChat(context.id)">
29+
<x-extension id="sidebar-chat-item-start"></x-extension>
2930
<div class="chat-list-button">
3031
<span :class="{'project-color-ball': true, 'heartbeat': context.running}"
3132
:style="context.project?.color ? { backgroundColor: context.project.color } : { border: '1px solid var(--color-border)' }"></span>
@@ -35,6 +36,7 @@ <h3 class="section-header">Chats</h3>
3536
<button class="btn-icon-action chat-list-action-btn" title="Close chat" @click.stop="$confirmClick($event, () => $store.chats.killChat(context.id))">
3637
<span class="material-symbols-outlined">close</span>
3738
</button>
39+
<x-extension id="sidebar-chat-item-end"></x-extension>
3840
</div>
3941
</li>
4042
</template>

0 commit comments

Comments
 (0)