mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-22 19:47:15 +00:00
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.
This commit is contained in:
parent
1623088699
commit
bd10a667cb
1 changed files with 2 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
<li>
|
||||
<div :class="{'chat-container': true, 'chat-selected': context.id === $store.chats.selected}"
|
||||
@click="$store.chats.selectChat(context.id)">
|
||||
<x-extension id="sidebar-chat-item-start"></x-extension>
|
||||
<div class="chat-list-button">
|
||||
<span :class="{'project-color-ball': true, 'heartbeat': context.running}"
|
||||
:style="context.project?.color ? { backgroundColor: context.project.color } : { border: '1px solid var(--color-border)' }"></span>
|
||||
|
|
@ -35,6 +36,7 @@
|
|||
<button class="btn-icon-action chat-list-action-btn" title="Close chat" @click.stop="$confirmClick($event, () => $store.chats.killChat(context.id))">
|
||||
<span class="material-symbols-outlined">close</span>
|
||||
</button>
|
||||
<x-extension id="sidebar-chat-item-end"></x-extension>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue