@@ -11,7 +11,6 @@ import {
1111 MessageTimeline ,
1212 type MessageTimelineHandle ,
1313} from "@/features/messages/ui/MessageTimeline" ;
14- import type { ImetaMedia } from "@/features/messages/lib/imetaMediaMarkdown" ;
1514import { buildDirectMessageIntro } from "@/features/channels/lib/dmParticipantDisplay" ;
1615import {
1716 getDmHuddleMemberPubkeys ,
@@ -23,20 +22,12 @@ import {
2322} from "@/features/messages/lib/videoReviewContext" ;
2423import { useComposerHeightPadding } from "@/features/messages/ui/useComposerHeightPadding" ;
2524import { TypingIndicatorRow } from "@/features/messages/ui/TypingIndicatorRow" ;
26- import type { TypingIndicatorEntry } from "@/features/messages/useChannelTyping" ;
27- import {
28- type ProfilePanelTab ,
29- type ProfilePanelView ,
30- UserProfilePanel ,
31- } from "@/features/profile/ui/UserProfilePanel" ;
25+ import { UserProfilePanel } from "@/features/profile/ui/UserProfilePanel" ;
3226import { ChannelFindBar } from "@/features/search/ui/ChannelFindBar" ;
3327import { AgentSessionThreadPanel } from "@/features/channels/ui/AgentSessionThreadPanel" ;
3428import { ChannelManagementAuxiliaryPanel } from "@/features/channels/ui/ChannelManagementAuxiliaryPanel" ;
3529import { RightAuxiliaryPane } from "@/features/channels/ui/RightAuxiliaryPane" ;
36- import {
37- BotActivityComposerAction ,
38- type BotActivityAgent ,
39- } from "@/features/channels/ui/BotActivityBar" ;
30+ import { BotActivityComposerAction } from "@/features/channels/ui/BotActivityBar" ;
4031import {
4132 containsWelcomePersonaMention ,
4233 WelcomeComposerBanner ,
@@ -52,136 +43,17 @@ import {
5243 isWelcomeSetupSystemMessage ,
5344 mentionsKnownAgent ,
5445} from "@/features/channels/ui/ChannelPane.helpers" ;
46+ import type { ChannelPaneProps } from "@/features/channels/ui/ChannelPane.types" ;
5547import * as agentSessionSelection from "@/features/channels/ui/agentSessionSelection" ;
56- import type { ChannelAgentSessionAgent } from "@/features/channels/ui/useChannelAgentSessions" ;
5748import { Button } from "@/shared/ui/button" ;
58- import type { useChannelFind } from "@/features/search/useChannelFind" ;
59- import {
60- buildMainTimelineEntries ,
61- type MainTimelineEntry ,
62- } from "@/features/messages/lib/threadPanel" ;
49+ import { buildMainTimelineEntries } from "@/features/messages/lib/threadPanel" ;
6350import { useRenderScopedReactionHydration } from "@/features/messages/lib/useRenderScopedReactionHydration" ;
6451import type { TimelineMessage } from "@/features/messages/types" ;
65- import type { UserProfileLookup } from "@/features/profile/lib/identity" ;
6652import { isWelcomeChannel } from "@/features/onboarding/welcome" ;
6753import { KIND_SYSTEM_MESSAGE } from "@/shared/constants/kinds" ;
68- import type { Channel } from "@/shared/api/types" ;
6954import { useIsThreadPanelOverlay } from "@/shared/hooks/use-mobile" ;
7055import { channelChrome } from "@/shared/layout/chromeLayout" ;
7156import { cn } from "@/shared/lib/cn" ;
72- type ChannelPaneProps = {
73- activeChannel : Channel | null ;
74- activityAgents ?: BotActivityAgent [ ] ;
75- agentPubkeys ?: ReadonlySet < string > ;
76- agentPubkeysPending ?: boolean ;
77- agentSessionAgents : ChannelAgentSessionAgent [ ] ;
78- botTypingEntries : TypingIndicatorEntry [ ] ;
79- channelFind : ReturnType < typeof useChannelFind > ;
80- channelManagementOpen ?: boolean ;
81- currentPubkey ?: string ;
82- editTarget ?: {
83- author : string ;
84- body : string ;
85- id : string ;
86- imetaMedia ?: ImetaMedia [ ] ;
87- } | null ;
88- fetchOlder ?: ( ) => Promise < void > ;
89- header ?: React . ReactNode ;
90- hasOlderMessages ?: boolean ;
91- isFetchingOlder ?: boolean ;
92- isJoining ?: boolean ;
93- isSinglePanelView ?: boolean ;
94- isSending : boolean ;
95- isTimelineLoading : boolean ;
96- messages : TimelineMessage [ ] ;
97- firstUnreadMessageId ?: string | null ;
98- unreadCount ?: number ;
99- canResetThreadPanelWidth : boolean ;
100- onCancelEdit ?: ( ) => void ;
101- onCancelThreadReply : ( ) => void ;
102- onCloseAgentSession : ( ) => void ;
103- onCloseChannelManagement ?: ( ) => void ;
104- onChannelManagementDeleted ?: ( ) => void ;
105- onCloseProfilePanel : ( ) => void ;
106- onAddAgent ?: ( ) => void ;
107- onCreateChannel ?: ( ) => void ;
108- onCloseThread : ( ) => void ;
109- onDelete ?: ( message : TimelineMessage ) => void ;
110- onEdit ?: ( message : TimelineMessage ) => void ;
111- onEditSave ?: ( content : string , mediaTags ?: string [ ] [ ] ) => Promise < void > ;
112- onMarkUnread ?: ( message : TimelineMessage ) => void ;
113- onMarkRead ?: ( message : TimelineMessage ) => void ;
114- onExpandThreadReplies : ( message : TimelineMessage ) => void ;
115- onJoinChannel ?: ( ) => Promise < void > ;
116- onOpenAgentSession : ( pubkey : string ) => void ;
117- onOpenDm ?: ( pubkeys : string [ ] ) => Promise < void > | void ;
118- onOpenMembers ?: ( ) => void ;
119- onOpenProfilePanel : ( pubkey : string ) => void ;
120- onOpenThread : ( message : TimelineMessage ) => void ;
121- onResetThreadPanelWidth : ( ) => void ;
122- onSelectThreadReplyTarget : ( message : TimelineMessage ) => void ;
123- onSendMessage : (
124- content : string ,
125- mentionPubkeys : string [ ] ,
126- mediaTags ?: string [ ] [ ] ,
127- ) => Promise < void > ;
128- onSendVideoReviewComment ?: (
129- message : TimelineMessage ,
130- content : string ,
131- mentionPubkeys : string [ ] ,
132- mediaTags ?: string [ ] [ ] ,
133- parentEventId ?: string ,
134- ) => Promise < void > ;
135- onSendThreadReply : (
136- content : string ,
137- mentionPubkeys : string [ ] ,
138- mediaTags ?: string [ ] [ ] ,
139- ) => Promise < void > ;
140- onTargetReached ?: ( messageId : string ) => void ;
141- onToggleReaction ?: (
142- message : TimelineMessage ,
143- emoji : string ,
144- remove : boolean ,
145- ) => Promise < void > ;
146- onThreadScrollTargetResolved : ( ) => void ;
147- onThreadPanelResizeStart : (
148- event : React . PointerEvent < HTMLButtonElement > ,
149- ) => void ;
150- personaLookup ?: Map < string , string > ;
151- profiles ?: UserProfileLookup ;
152- openThreadHeadId : string | null ;
153- shouldShowThreadSkeleton : boolean ;
154- openAgentSessionPubkey : string | null ;
155- onProfilePanelViewChange : (
156- view : ProfilePanelView ,
157- options ?: { replace ?: boolean } ,
158- ) => void ;
159- onProfilePanelTabChange : (
160- tab : ProfilePanelTab ,
161- options ?: { replace ?: boolean } ,
162- ) => void ;
163- profilePanelPubkey ?: string | null ;
164- profilePanelTab : ProfilePanelTab ;
165- profilePanelView : ProfilePanelView ;
166- threadHeadMessage : TimelineMessage | null ;
167- threadMessages : MainTimelineEntry [ ] ;
168- threadPanelWidthPx : number ;
169- threadTypingPubkeys : string [ ] ;
170- threadReplyTargetMessage : TimelineMessage | null ;
171- threadScrollTargetId : string | null ;
172- threadUnreadCounts ?: ReadonlyMap < string , number > ;
173- threadReplyUnreadCounts ?: ReadonlyMap < string , number > ;
174- threadFirstUnreadReplyId ?: string | null ;
175- targetMessageId : string | null ;
176- typingPubkeys : string [ ] ;
177- isFollowingThread ?: boolean ;
178- onFollowThread ?: ( ) => void ;
179- onUnfollowThread ?: ( ) => void ;
180- followThreadById ?: ( rootId : string ) => void ;
181- unfollowThreadById ?: ( rootId : string ) => void ;
182- isFollowingThreadById ?: ( rootId : string ) => boolean ;
183- isMessageUnreadById ?: ( messageId : string ) => boolean ;
184- } ;
18557export const ChannelPane = React . memo ( function ChannelPane ( {
18658 activeChannel,
18759 agentPubkeys,
0 commit comments