(chatKey: string, aiChatId: string | null)
| 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 |
no test coverage detected