Merge branch 'dev' into test

This commit is contained in:
2026-06-23 14:57:02 +08:00
25 changed files with 372 additions and 12 deletions
+2 -2
View File
@@ -3,8 +3,8 @@ NEXT_PUBLIC_APP_ENV=test
# NextAuth v4 —— OAuth callback **公**网 base URL**必**须与**公**网域名**一**致) # NextAuth v4 —— OAuth callback **公**网 base URL**必**须与**公**网域名**一**致)
NEXTAUTH_URL=https://frontend-test.banlv-ai.com NEXTAUTH_URL=https://frontend-test.banlv-ai.com
NEXTAUTH_URL_INTERNAL=http://localhost:3000 NEXTAUTH_URL_INTERNAL=http://localhost:3000
NEXT_PUBLIC_API_BASE_URL=https://api.cozsweet.com NEXT_PUBLIC_API_BASE_URL=https://testapi.banlv-ai.com
NEXT_PUBLIC_WS_BASE_URL=wss://api.cozsweet.com/ws NEXT_PUBLIC_WS_BASE_URL=wss://testapi.banlv-ai.com/ws
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51Te8ybEJDtUGxQHo0UMySJ2hW0vVryynzllmIUI3UQdQCFgxNLci0Jmm2lQkRsTaIP7C7IQlFzfFyBJ5rOhr1ML800G8P8DF5R NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51Te8ybEJDtUGxQHo0UMySJ2hW0vVryynzllmIUI3UQdQCFgxNLci0Jmm2lQkRsTaIP7C7IQlFzfFyBJ5rOhr1ML800G8P8DF5R
NEXT_PUBLIC_API_CONNECT_TIMEOUT=30000 NEXT_PUBLIC_API_CONNECT_TIMEOUT=30000
@@ -72,7 +72,9 @@
} }
.diamondIcon { .diamondIcon {
color: var(--color-accent, #f84d96); width: 14px;
height: 13px;
display: block;
flex-shrink: 0; flex-shrink: 0;
} }
+8 -9
View File
@@ -1,5 +1,7 @@
"use client"; "use client";
import Image from "next/image";
import { UserMessageAvatar } from "@/app/chat/components/user-message-avatar"; import { UserMessageAvatar } from "@/app/chat/components/user-message-avatar";
import styles from "./user-header.module.css"; import styles from "./user-header.module.css";
@@ -62,16 +64,13 @@ export function UserHeader({
)} )}
{state === "vip" && ( {state === "vip" && (
<span className={styles.vipMemberPill}> <span className={styles.vipMemberPill}>
<svg <Image
width="12" src="/images/sidebar/ic_user_vip.png"
height="12" alt=""
viewBox="0 0 24 24" width={39}
fill="currentColor" height={36}
aria-hidden="true"
className={styles.diamondIcon} className={styles.diamondIcon}
> />
<path d="M12 2L22 12L12 22L2 12L12 2Z" />
</svg>
<span>VIP Member</span> <span>VIP Member</span>
</span> </span>
)} )}
@@ -0,0 +1,11 @@
{
"message": "Look at this sunset.",
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
"imageId": "img_mock_001",
"imageThumbUrl": "https://cdn.cozsweet.com/mock/chat/img_mock_001_thumb.jpg",
"imageMediumUrl": "https://cdn.cozsweet.com/mock/chat/img_mock_001_medium.jpg",
"imageOriginalUrl": "https://cdn.cozsweet.com/mock/chat/img_mock_001_original.jpg",
"imageWidth": 1280,
"imageHeight": 960,
"useWebSocket": false
}
@@ -0,0 +1,11 @@
{
"message": "I missed you today.",
"image": "",
"imageId": "",
"imageThumbUrl": "",
"imageMediumUrl": "",
"imageOriginalUrl": "",
"imageWidth": 0,
"imageHeight": 0,
"useWebSocket": false
}
@@ -0,0 +1,14 @@
{
"messages": [
{
"role": "user",
"content": "Hi Elio.",
"timestamp": "2026-06-23T02:10:00.000Z"
},
{
"role": "assistant",
"content": "Hi, I am right here with you.",
"timestamp": "2026-06-23T02:10:04.000Z"
}
]
}
@@ -0,0 +1,3 @@
{
"messageId": "msg_private_locked_001"
}
@@ -0,0 +1,46 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"messages": [
{
"role": "user",
"content": "I had a long day.",
"id": "msg_user_001",
"created_at": "2026-06-23T02:10:00.000Z",
"isPrivate": false,
"privateLocked": false,
"privateHint": null,
"image_url": null
},
{
"role": "assistant",
"content": "Come here. Tell me everything, slowly.",
"id": "msg_ai_001",
"created_at": "2026-06-23T02:10:05.000Z",
"isPrivate": false,
"privateLocked": false,
"privateHint": null,
"image_url": null
},
{
"role": "assistant",
"content": "",
"id": "msg_private_locked_001",
"created_at": "2026-06-23T02:11:12.000Z",
"isPrivate": true,
"privateLocked": true,
"privateHint": "Elio has a private message for you.",
"image_url": null
}
],
"total": 3,
"limit": 50,
"offset": 0,
"isVip": false,
"privateFreeLimit": 1,
"privateUsedToday": 0,
"privateCanViewFree": true
}
}
@@ -0,0 +1,46 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"messages": [
{
"role": "user",
"content": "I had a long day.",
"id": "msg_user_001",
"created_at": "2026-06-23T02:10:00.000Z",
"isPrivate": false,
"privateLocked": false,
"privateHint": null,
"image_url": null
},
{
"role": "assistant",
"content": "I saved this softer thought for you, just between us.",
"id": "msg_private_unlocked_001",
"created_at": "2026-06-23T02:11:12.000Z",
"isPrivate": true,
"privateLocked": false,
"privateHint": null,
"image_url": null
},
{
"role": "assistant",
"content": "",
"id": "msg_ai_image_001",
"created_at": "2026-06-23T02:12:28.000Z",
"isPrivate": false,
"privateLocked": false,
"privateHint": null,
"image_url": "https://cdn.cozsweet.com/mock/chat/elio-schedule-001.jpg"
}
],
"total": 3,
"limit": 50,
"offset": 0,
"isVip": true,
"privateFreeLimit": 1,
"privateUsedToday": 0,
"privateCanViewFree": true
}
}
@@ -0,0 +1,29 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"mode": "http",
"reply": "",
"voiceUrl": "",
"audioUrl": "",
"intimacyChange": 0,
"newIntimacy": 42,
"relationshipStage": "close_friend",
"currentMood": "",
"messageId": "msg_blocked_daily_001",
"isGuest": false,
"timestamp": 1782180665000,
"blocked": true,
"blockReason": "daily_limit",
"blockDetail": {
"type": "daily_limit",
"usedToday": 20,
"limit": 20
},
"paywallTriggered": false,
"showUpgrade": false,
"imageType": null,
"imageUrl": null
}
}
@@ -0,0 +1,25 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"mode": "http",
"reply": "I can show you that photo after you activate VIP.",
"voiceUrl": "",
"audioUrl": "",
"intimacyChange": 0,
"newIntimacy": 42,
"relationshipStage": "close_friend",
"currentMood": "playful",
"messageId": "msg_photo_paywall_001",
"isGuest": false,
"timestamp": 1782180725000,
"blocked": null,
"blockReason": null,
"blockDetail": null,
"paywallTriggered": true,
"showUpgrade": true,
"imageType": null,
"imageUrl": null
}
}
@@ -0,0 +1,25 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"mode": "http",
"reply": "I am here. Tell me what happened, one small piece at a time.",
"voiceUrl": "",
"audioUrl": "",
"intimacyChange": 0,
"newIntimacy": 42,
"relationshipStage": "close_friend",
"currentMood": "gentle",
"messageId": "msg_ai_reply_001",
"isGuest": false,
"timestamp": 1782180605000,
"blocked": null,
"blockReason": null,
"blockDetail": null,
"paywallTriggered": false,
"showUpgrade": false,
"imageType": null,
"imageUrl": null
}
}
@@ -0,0 +1,25 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"mode": "http",
"reply": "This is the kind of view I would want to share with you.",
"voiceUrl": "",
"audioUrl": "",
"intimacyChange": 0,
"newIntimacy": 43,
"relationshipStage": "close_friend",
"currentMood": "warm",
"messageId": "msg_ai_image_reply_001",
"isGuest": false,
"timestamp": 1782180785000,
"blocked": null,
"blockReason": null,
"blockDetail": null,
"paywallTriggered": false,
"showUpgrade": false,
"imageType": "elio_schedule",
"imageUrl": "https://cdn.cozsweet.com/mock/chat/elio-schedule-001.jpg"
}
}
@@ -0,0 +1,8 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"text": "I want to talk to you for a while."
}
}
@@ -0,0 +1,9 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"syncedCount": 2,
"totalHistory": 18
}
}
@@ -0,0 +1,14 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"unlocked": false,
"content": null,
"showUpgrade": false,
"paywallTriggered": false,
"privateFreeLimit": 0,
"privateUsedToday": 0,
"reason": "not_found"
}
}
@@ -0,0 +1,14 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"unlocked": true,
"content": "This message is already public.",
"showUpgrade": false,
"paywallTriggered": false,
"privateFreeLimit": 1,
"privateUsedToday": 0,
"reason": "not_private"
}
}
@@ -0,0 +1,14 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"unlocked": false,
"content": null,
"showUpgrade": true,
"paywallTriggered": true,
"privateFreeLimit": 1,
"privateUsedToday": 1,
"reason": "quota_exceeded"
}
}
@@ -0,0 +1,14 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"unlocked": true,
"content": "I saved this softer thought for you, just between us.",
"showUpgrade": false,
"paywallTriggered": false,
"privateFreeLimit": 1,
"privateUsedToday": 1,
"reason": "ok"
}
}
@@ -0,0 +1,15 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"success": true,
"imageId": "img_mock_001",
"thumbUrl": "https://cdn.cozsweet.com/mock/chat/img_mock_001_thumb.jpg",
"mediumUrl": "https://cdn.cozsweet.com/mock/chat/img_mock_001_medium.jpg",
"originalUrl": "https://cdn.cozsweet.com/mock/chat/img_mock_001_original.jpg",
"width": 1280,
"height": 960,
"bytes": 286432
}
}
@@ -0,0 +1,9 @@
{
"type": "sentence",
"data": {
"index": 0,
"text": "I am listening.",
"total": 2,
"done": false
}
}
@@ -0,0 +1,6 @@
{
"type": "connected",
"data": {
"userId": "user_mock_001"
}
}
@@ -0,0 +1,6 @@
{
"type": "error",
"data": {
"message": "WebSocket connection interrupted."
}
}
@@ -0,0 +1,6 @@
{
"type": "image",
"data": {
"imageUrl": "https://cdn.cozsweet.com/mock/chat/elio-schedule-001.jpg"
}
}
@@ -0,0 +1,9 @@
{
"type": "paywall_status",
"data": {
"paywallTriggered": true,
"showUpgrade": true,
"imageType": null,
"imageUrl": null
}
}