MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / getFirstUserTurnTitle

Function getFirstUserTurnTitle

shared/pi-message-mapper.ts:368–373  ·  view source on GitHub ↗
(messages: Message[])

Source from the content-addressed store, hash-verified

366}
367
368export function getFirstUserTurnTitle(messages: Message[]) {
369 const firstUserMessage = messages.find((uiMessage) => uiMessage.role === 'user') as
370 | Extract<Message, { role: 'assistant' | 'user' }>
371 | undefined
372 return normalizeThreadTitle(firstUserMessage?.content[0])
373}
374
375export function getPreviousMessageCount(entries: SessionBranchEntry[]) {
376 let compactionIndex = -1

Callers 2

buildThreadDataFunction · 0.90

Calls 1

normalizeThreadTitleFunction · 0.85

Tested by

no test coverage detected