mirror of
https://github.com/coder/coder.git
synced 2026-10-29 17:44:33 +08:00
fix(site): only play completion chime for top-level chat agents (#22623)
This commit is contained in:
@@ -390,12 +390,15 @@ const AgentsPage: FC = () => {
|
|||||||
const prevStatus = currentChats?.find(
|
const prevStatus = currentChats?.find(
|
||||||
(c) => c.id === updatedChat.id,
|
(c) => c.id === updatedChat.id,
|
||||||
)?.status;
|
)?.status;
|
||||||
maybePlayChime(
|
// Only play the chime for top-level chats, not sub-agents.
|
||||||
prevStatus,
|
if (!updatedChat.parent_chat_id) {
|
||||||
updatedChat.status,
|
maybePlayChime(
|
||||||
updatedChat.id,
|
prevStatus,
|
||||||
activeChatIDRef.current,
|
updatedChat.status,
|
||||||
);
|
updatedChat.id,
|
||||||
|
activeChatIDRef.current,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (chatEvent.kind === "deleted") {
|
if (chatEvent.kind === "deleted") {
|
||||||
queryClient.setQueryData(
|
queryClient.setQueryData(
|
||||||
|
|||||||
Reference in New Issue
Block a user