MCPcopy Index your code
hub / github.com/codeaashu/claude-code / pageToMessages

Function pageToMessages

src/hooks/useAssistantHistory.ts:50–60  ·  view source on GitHub ↗

Convert a HistoryPage to REPL Message[] using the same opts as viewer mode.

(page: HistoryPage)

Source from the content-addressed store, hash-verified

48
49/** Convert a HistoryPage to REPL Message[] using the same opts as viewer mode. */
50function pageToMessages(page: HistoryPage): Message[] {
51 const out: Message[] = []
52 for (const ev of page.events) {
53 const c = convertSDKMessage(ev, {
54 convertUserTextMessages: true,
55 convertToolResults: true,
56 })
57 if (c.type === 'message') out.push(c.message)
58 }
59 return out
60}
61
62/**
63 * Lazy-load `claude assistant` history on scroll-up.

Callers 1

useAssistantHistoryFunction · 0.85

Calls 2

convertSDKMessageFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected