feat(app): improve payment and paywall UX

This commit is contained in:
2026-06-24 10:02:22 +08:00
parent 6c25a24440
commit bfbf7ee91a
23 changed files with 344 additions and 129 deletions
+5 -2
View File
@@ -89,6 +89,9 @@ export function sendResponseToUiMessage(response: ChatSendResponse): UiMessage {
isFromAI: true,
date: todayString(new Date(response.timestamp)),
...(response.imageUrl ? { imageUrl: response.imageUrl } : {}),
...(response.showUpgrade && response.imageUrl
? { imagePaywalled: true }
: {}),
};
}
@@ -147,8 +150,8 @@ export function applyHttpSendOutput(
return {
messages: [...context.messages, reply],
isReplyingAI: false,
paywallTriggered: true,
paywallReason: "photo_paywall",
paywallTriggered: false,
paywallReason: null,
paywallDetail: null,
};
}