feat(chat): add promotional external entry flow

This commit is contained in:
2026-07-13 12:43:18 +08:00
parent e5ee9940ca
commit 3752b3b729
44 changed files with 1623 additions and 190 deletions
+11
View File
@@ -16,6 +16,8 @@
* chat-screen 不直接读 AuthStorage(除 token 取值)。
*/
import type { PendingChatUnlockKind } from "@/lib/navigation/chat_unlock_session";
import type { ChatLockType } from "@/data/schemas/chat";
import type { PendingChatPromotion } from "@/data/storage/navigation";
export type ChatEvent =
// 鉴权生命周期(登录态变化后由 ChatAuthSync 派)
@@ -35,10 +37,19 @@ export type ChatEvent =
| { type: "ChatSendMessage"; content: string }
| { type: "ChatSendImage"; imageBase64: string }
| { type: "ChatLoadMoreHistory" }
| {
type: "ChatPromotionInjected";
promotion: PendingChatPromotion;
messageId?: string;
}
| { type: "ChatPromotionCleared" }
| {
type: "ChatUnlockMessageRequested";
messageId: string;
remoteMessageId?: string;
kind: PendingChatUnlockKind;
lockType?: ChatLockType;
clientLockId?: string;
}
| { type: "ChatUnlockPaywallNavigationConsumed" }
| { type: "ChatPaymentSucceeded" }