(
conversationId: string,
updater: (
current: ConversationRuntimeState
) => ConversationRuntimeState
)
| 463 | ) |
| 464 | |
| 465 | function setConversationRuntime( |
| 466 | conversationId: string, |
| 467 | updater: ( |
| 468 | current: ConversationRuntimeState |
| 469 | ) => ConversationRuntimeState |
| 470 | ) { |
| 471 | setRuntimeByConversationId((current) => { |
| 472 | const previous = current[conversationId] ?? createRuntimeState() |
| 473 | return { |
| 474 | ...current, |
| 475 | [conversationId]: updater(previous), |
| 476 | } |
| 477 | }) |
| 478 | } |
| 479 | |
| 480 | function setConversationTitleGenerationState( |
| 481 | conversationId: string, |
no test coverage detected