mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-29 12:10:57 +00:00
fix: active chat detection
This commit is contained in:
parent
9fc2d9570f
commit
bb89b7ae7f
1 changed files with 4 additions and 10 deletions
|
|
@ -6,18 +6,12 @@
|
|||
<body>
|
||||
<div x-data="{
|
||||
get disabled() {
|
||||
const ctx = globalThis.getContext?.();
|
||||
const store = Alpine?.store?.('compactStore');
|
||||
const chatInput = Alpine?.store?.('chatInput');
|
||||
return !ctx || store?.compacting || chatInput?.running;
|
||||
return !$store.chats?.selected || $store.compactStore?.compacting || $store.chatInput?.running;
|
||||
},
|
||||
get disabledReason() {
|
||||
const ctx = globalThis.getContext?.();
|
||||
const store = Alpine?.store?.('compactStore');
|
||||
const chatInput = Alpine?.store?.('chatInput');
|
||||
if (!ctx) return 'No active chat selected';
|
||||
if (store?.compacting) return 'Compaction in progress';
|
||||
if (chatInput?.running) return 'Cannot compact while agent is running';
|
||||
if (!$store.chats?.selected) return 'No active chat selected';
|
||||
if ($store.compactStore?.compacting) return 'Compaction in progress';
|
||||
if ($store.chatInput?.running) return 'Cannot compact while agent is running';
|
||||
return 'Compact chat history into a single summary';
|
||||
}
|
||||
}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue