(sessionId: string)
| 791 | } |
| 792 | |
| 793 | private resolveFirstUserMessage(sessionId: string): string | undefined { |
| 794 | for (const message of this.store.messages.getFirstMessages(sessionId, 50)) { |
| 795 | const roleWrapped = unwrapRoleWrappedRecordEnvelope(message.content) |
| 796 | const text = roleWrapped?.role === 'user' |
| 797 | ? extractUserMessageText(roleWrapped.content) |
| 798 | : roleWrapped?.role === 'agent' |
| 799 | ? extractClaudeUserMessageTextFromAgentOutput(roleWrapped.content) |
| 800 | : undefined |
| 801 | if (text) return text |
| 802 | } |
| 803 | |
| 804 | return undefined |
| 805 | } |
| 806 | |
| 807 | /** |
| 808 | * tiann/hapi#824 — sync-on-open auto-migration. Returns the (possibly |
no test coverage detected