Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
export type HistoryPageAttempt =
| { status: 'failed' }
| {
status: 'loaded'
itemCount: number
pageSize: number
cursorAdvanced: boolean
}
export function historyHasMoreAfterAttempt(
previousHasMore: boolean,
attempt: HistoryPageAttempt,
): boolean {
if (attempt.status === 'failed') return previousHasMore
return previousHasMore && attempt.cursorAdvanced && attempt.itemCount >= attempt.pageSize
}