MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / focusAIChat

Function focusAIChat

src/stores/aiChat.ts:559–571  ·  view source on GitHub ↗
(chatKey: string, aiChatId: string | null)

Source from the content-addressed store, hash-verified

557 }
558
559 function focusAIChat(chatKey: string, aiChatId: string | null): boolean {
560 const state = getSessionState(chatKey)
561 if (!state) return false
562
563 const bufferKey = aiChatId ?? DRAFT_AI_CHAT_KEY
564 if (!state.aiChatBuffers[bufferKey]) {
565 return false
566 }
567
568 bindDisplayedBuffer(state, bufferKey)
569 applySessionAssistantSelection(chatKey)
570 return true
571 }
572
573 function focusActiveTaskAIChat(): boolean {
574 if (!activeTask.value) return false

Callers 1

focusActiveTaskAIChatFunction · 0.85

Calls 3

getSessionStateFunction · 0.85
bindDisplayedBufferFunction · 0.85

Tested by

no test coverage detected