From 0558c0991dbb9a26ea6b97b2b070625e6fb403f6 Mon Sep 17 00:00:00 2001 From: klopez4212 Date: Mon, 29 Jun 2026 20:17:31 +0100 Subject: [PATCH] Require real task thread roots --- desktop/src/features/agents/agentConversations.test.mjs | 2 ++ desktop/src/features/agents/agentConversations.ts | 6 ++++++ desktop/src/features/channels/ui/ChannelTasksView.tsx | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/desktop/src/features/agents/agentConversations.test.mjs b/desktop/src/features/agents/agentConversations.test.mjs index ef53dce54e..3facb2fcff 100644 --- a/desktop/src/features/agents/agentConversations.test.mjs +++ b/desktop/src/features/agents/agentConversations.test.mjs @@ -3,9 +3,11 @@ import test from "node:test"; import { buildAgentConversation, + buildAgentConversationMentionPubkeys, buildAgentConversationRecap, buildAgentConversationMarkers, deriveAgentConversationTitle, + getAutoRoutedAgentConversationPubkeys, getHiddenAgentConversationMessageIds, parseAgentConversationMarker, readPersistedAgentConversations, diff --git a/desktop/src/features/agents/agentConversations.ts b/desktop/src/features/agents/agentConversations.ts index e45b5f24a0..7a10a31cf1 100644 --- a/desktop/src/features/agents/agentConversations.ts +++ b/desktop/src/features/agents/agentConversations.ts @@ -6,6 +6,7 @@ import { KIND_AGENT_CONVERSATION, KIND_AGENT_CONVERSATION_COMPAT, } from "@/shared/constants/kinds"; +import { normalizePubkey } from "@/shared/lib/pubkey"; import { parseAgentConversationLink } from "./agentConversationLink"; import { collectConversationContextMessages, @@ -81,6 +82,11 @@ export type AgentConversationRecapInput = { messages: readonly TimelineMessage[]; }; +export type AgentConversationRouteableParticipant = { + canMessage: boolean; + pubkey: string; +}; + function normalizeAgentConversationStorageScope( workspaceScope: string | null | undefined, ): string { diff --git a/desktop/src/features/channels/ui/ChannelTasksView.tsx b/desktop/src/features/channels/ui/ChannelTasksView.tsx index 7f241ed76b..88703daa2c 100644 --- a/desktop/src/features/channels/ui/ChannelTasksView.tsx +++ b/desktop/src/features/channels/ui/ChannelTasksView.tsx @@ -215,7 +215,6 @@ export function ChannelTasksView({ const resolvedThreadMessage = messageById.get(marker.threadRootMessageId ?? "") ?? messageById.get(marker.threadRootId) ?? - messageById.get(marker.parentMessageId ?? "") ?? null; const isBroadcastTaskSource = message ? isBroadcastReply(message.tags ?? [])