mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-07 06:52:28 +00:00
feat: add session resume capability with automatic continuation
Add ability to resume inactive sessions and automatically continue with new session ID. Includes message merging for preserving conversation history, UI improvements to allow sending during inactive state, and database schema migration. close #87
This commit is contained in:
@@ -266,6 +266,8 @@ export function HappyThread(props: {
|
||||
prevLoadingMoreRef.current = props.isLoadingMoreMessages
|
||||
}, [props.isLoadingMoreMessages])
|
||||
|
||||
const showSkeleton = props.isLoadingMessages && props.rawMessagesCount === 0 && props.pendingCount === 0
|
||||
|
||||
return (
|
||||
<HappyChatProvider value={{
|
||||
api: props.api,
|
||||
@@ -280,7 +282,7 @@ export function HappyThread(props: {
|
||||
<div ref={viewportRef} className="min-h-0 flex-1 overflow-y-auto overflow-x-hidden">
|
||||
<div className="mx-auto w-full max-w-content min-w-0 p-3">
|
||||
<div ref={topSentinelRef} className="h-px w-full" aria-hidden="true" />
|
||||
{props.isLoadingMessages ? (
|
||||
{showSkeleton ? (
|
||||
<MessageSkeleton />
|
||||
) : (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user