Fix task link feature gate regressions

This commit is contained in:
klopez4212
2026-06-30 13:56:37 +01:00
parent 295c7a07aa
commit 75940450be
4 changed files with 13 additions and 2 deletions
@@ -341,6 +341,10 @@ export function ChannelScreen({
const managedAgents = managedAgentsQuery.data ?? [];
const relayAgentsQuery = useRelayAgentsQuery();
const relayAgents = relayAgentsQuery.data ?? [];
const agentLookupReady =
!channelMembersQuery.isLoading &&
!managedAgentsQuery.isLoading &&
!relayAgentsQuery.isLoading;
const agentPubkeys = React.useMemo(() => {
const pubkeys = new Set<string>();
for (const member of channelMembers ?? []) {
@@ -732,6 +736,7 @@ export function ChannelScreen({
useAgentConversationRouteTarget({
activeChannel,
agentConversationMarkers,
agentLookupReady,
agentPubkeys,
enabled: isChannelTasksEnabled,
goChannel,
@@ -23,6 +23,7 @@ type UseAgentConversationRouteTargetInput = {
activeChannel: Channel | null;
agentConversationMarkers: readonly AgentConversationMarker[];
agentPubkeys: ReadonlySet<string>;
agentLookupReady: boolean;
enabled: boolean;
goChannel: GoChannel;
messageProfilesReady: boolean;
@@ -37,6 +38,7 @@ type UseAgentConversationRouteTargetInput = {
export function useAgentConversationRouteTarget({
activeChannel,
agentConversationMarkers,
agentLookupReady,
agentPubkeys,
enabled,
goChannel,
@@ -77,6 +79,9 @@ export function useAgentConversationRouteTarget({
if (!sourceMessage) {
return;
}
if (!marker && !agentLookupReady) {
return;
}
const sourceAuthorIsAgent = sourceMessage.pubkey
? agentPubkeys.has(normalizePubkey(sourceMessage.pubkey))
@@ -128,6 +133,7 @@ export function useAgentConversationRouteTarget({
}, [
activeChannel,
agentConversationMarkers,
agentLookupReady,
agentPubkeys,
enabled,
goChannel,
@@ -21,7 +21,7 @@ type ComposerPasteHandlerOptions = {
export function createMessageComposerPasteHandler({
agentConversationTitleForHref,
enableAgentConversationLinks = true,
enableAgentConversationLinks = false,
editor,
scrollComposerToBottom,
uploadFile,
@@ -174,7 +174,7 @@ export function useRichTextEditor({
channelNames,
customEmoji,
agentConversationTitleForHref,
enableAgentConversationLinks = true,
enableAgentConversationLinks = false,
onSubmit,
onEditLastOwnMessage,
isAutocompleteOpen,