MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / selectThread

Function selectThread

apps/web/ui/ChannelView/ChatView/index.tsx:301–319  ·  view source on GitHub ↗
(threadId: string)

Source from the content-addressed store, hash-verified

299 }
300
301 async function selectThread(threadId: string) {
302 const text = getSelectedText();
303 if (text) {
304 return null;
305 }
306 const currentThread =
307 threads.find((t) => t.id === threadId) ||
308 pinnedThreads.find((t) => t.id === threadId);
309
310 if (!currentThread) {
311 return;
312 }
313 onSelectThread(currentThread.id);
314 const isLastThread = currentThread.id === threads[threads.length - 1].id;
315 if (isLastThread) {
316 setTimeout(() => handleScroll(), 0);
317 }
318 handleLeftScroll();
319 }
320
321 const rootMargin =
322 viewport === 'desktop' ? '640px 0px 640px 0px' : '0px 0px 0px 0px';

Callers 1

ChannelFunction · 0.70

Calls 5

getSelectedTextFunction · 0.90
onSelectThreadFunction · 0.85
handleScrollFunction · 0.70
handleLeftScrollFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected