(
state: AIChatSessionState,
bufferKey: string,
assistantId: string | null = null
)
| 360 | } |
| 361 | |
| 362 | function getOrCreateBuffer( |
| 363 | state: AIChatSessionState, |
| 364 | bufferKey: string, |
| 365 | assistantId: string | null = null |
| 366 | ): AIChatBuffer { |
| 367 | if (!state.aiChatBuffers[bufferKey]) { |
| 368 | state.aiChatBuffers[bufferKey] = createAIChatBuffer(assistantId) |
| 369 | } |
| 370 | return state.aiChatBuffers[bufferKey] |
| 371 | } |
| 372 | |
| 373 | /** |
| 374 | * 将当前 UI 绑定到某个 conversation buffer。 |
no test coverage detected