mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Fix task link feature gate regressions
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user