feat(chat): unlock history after payment
This commit is contained in:
@@ -30,6 +30,10 @@ interface ChatState {
|
||||
historyOffset: number;
|
||||
/** history 初始加载完成标志(local → network → save 跑完) —— UI 可用此显示 loading */
|
||||
historyLoaded: boolean;
|
||||
unlockHistoryPromptVisible: boolean;
|
||||
lockedHistoryCount: number;
|
||||
isUnlockingHistory: boolean;
|
||||
unlockHistoryError: string | null;
|
||||
}
|
||||
|
||||
const ChatStateCtx = createContext<ChatState | null>(null);
|
||||
@@ -55,6 +59,10 @@ export function ChatProvider({ children }: ChatProviderProps) {
|
||||
hasMore: state.context.hasMore,
|
||||
historyOffset: state.context.historyOffset,
|
||||
historyLoaded: state.context.historyLoaded,
|
||||
unlockHistoryPromptVisible: state.context.unlockHistoryPromptVisible,
|
||||
lockedHistoryCount: state.context.lockedHistoryCount,
|
||||
isUnlockingHistory: state.context.isUnlockingHistory,
|
||||
unlockHistoryError: state.context.unlockHistoryError,
|
||||
}),
|
||||
[state],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user