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
+9 -12
View File
@@ -18,19 +18,15 @@ export interface ChatState {
* - 非 VIP / 游客:固定 false,走 HTTP
*/
wsConnected: boolean;
paywallTriggered: boolean;
paywallReason:
| "daily_limit"
| "total_limit"
| "photo_paywall"
| "private_paywall"
| null;
paywallDetail:
upgradePromptVisible: boolean;
upgradeReason: "daily_limit" | "private_message" | "image" | null;
upgradeHint: string | null;
upgradeDetail:
| {
type?: string;
usedToday?: number;
usedTotal?: number;
limit: number;
limit?: number;
}
| null;
unlockingPrivateMessageId: string | null;
@@ -48,9 +44,10 @@ export const initialState: ChatState = {
messages: [],
isReplyingAI: false,
wsConnected: false,
paywallTriggered: false,
paywallReason: null,
paywallDetail: null,
upgradePromptVisible: false,
upgradeReason: null,
upgradeHint: null,
upgradeDetail: null,
unlockingPrivateMessageId: null,
isLoadingMore: false,
hasMore: true,