feat(chat): migrate chat protocol to lock detail

This commit is contained in:
2026-06-24 14:06:30 +08:00
parent c280a3c1ea
commit 42c03f8901
34 changed files with 609 additions and 373 deletions
+8 -6
View File
@@ -21,9 +21,10 @@ import type { ChatEvent, ChatState as MachineContext } from "./chat-machine";
interface ChatState {
messages: MachineContext["messages"];
isReplyingAI: boolean;
paywallTriggered: boolean;
paywallReason: MachineContext["paywallReason"];
paywallDetail: MachineContext["paywallDetail"];
upgradePromptVisible: boolean;
upgradeReason: MachineContext["upgradeReason"];
upgradeHint: MachineContext["upgradeHint"];
upgradeDetail: MachineContext["upgradeDetail"];
unlockingPrivateMessageId: MachineContext["unlockingPrivateMessageId"];
isLoadingMore: boolean;
hasMore: boolean;
@@ -47,9 +48,10 @@ export function ChatProvider({ children }: ChatProviderProps) {
() => ({
messages: state.context.messages,
isReplyingAI: state.context.isReplyingAI,
paywallTriggered: state.context.paywallTriggered,
paywallReason: state.context.paywallReason,
paywallDetail: state.context.paywallDetail,
upgradePromptVisible: state.context.upgradePromptVisible,
upgradeReason: state.context.upgradeReason,
upgradeHint: state.context.upgradeHint,
upgradeDetail: state.context.upgradeDetail,
unlockingPrivateMessageId: state.context.unlockingPrivateMessageId,
isLoadingMore: state.context.isLoadingMore,
hasMore: state.context.hasMore,