({ resetScroll = false } = {})
| 8502 | } |
| 8503 | |
| 8504 | /** |
| 8505 | * Forks the conversation from a specific message |
| 8506 | * @param {string} messageId - Message ID to fork from |
| 8507 | */ |
| 8508 | async forkConversation(messageId) { |
| 8509 | const session = this.getCurrentSession(); |
| 8510 | if (!session) return; |
| 8511 | const sourceSessionId = session.id; |
| 8512 | const forkNavigationGeneration = ++this.sessionNavigationGeneration; |
| 8513 | const mutationToken = this.beginSessionMutation(sourceSessionId, { exclusive: true, snapshotWhileStreaming: true }); |
| 8514 | if (!mutationToken) { |
| 8515 | await this.acknowledgeSessionMutationBusy(sourceSessionId); |
| 8516 | return; |
| 8517 | } |
| 8518 | let newSessionId = null; |
| 8519 | try { |
| 8520 | const messages = await chatDB.getSessionMessages(sourceSessionId); |
| 8521 | if (this.isSessionDeleted(sourceSessionId)) return; |
no outgoing calls
no test coverage detected