diff --git a/src/app/chat/components/chat-area.tsx b/src/app/chat/components/chat-area.tsx index 4af9a568..0c2e8f22 100644 --- a/src/app/chat/components/chat-area.tsx +++ b/src/app/chat/components/chat-area.tsx @@ -2,8 +2,6 @@ /** * ChatArea 消息列表区 * - * 原始 Dart: lib/ui/chat/widgets/chat_area.dart(153 行) - * * 组成(自上而下): * - AI 披露横幅 * - 日期分隔条 diff --git a/src/data/dto/chat/chat_send_response.ts b/src/data/dto/chat/chat_send_response.ts index 592b97d1..cf8a7479 100644 --- a/src/data/dto/chat/chat_send_response.ts +++ b/src/data/dto/chat/chat_send_response.ts @@ -26,6 +26,9 @@ export class ChatSendResponse { declare readonly paywallTriggered: boolean; declare readonly showUpgrade: boolean; declare readonly imageType: string | null; + declare readonly isPrivate: boolean | null; + declare readonly privateLocked: boolean | null; + declare readonly privateHint: string | null; declare readonly imageUrl: string | null; private constructor(input: ChatSendResponseInput) { diff --git a/src/data/schemas/chat/chat_send_response.ts b/src/data/schemas/chat/chat_send_response.ts index add4757b..962c975a 100644 --- a/src/data/schemas/chat/chat_send_response.ts +++ b/src/data/schemas/chat/chat_send_response.ts @@ -30,6 +30,9 @@ export const ChatSendResponseSchema = z.object({ paywallTriggered: z.boolean().default(false), showUpgrade: z.boolean().default(false), imageType: z.string().nullable().default(null), + isPrivate: z.boolean().nullable().default(null), + privateLocked: z.boolean().nullable().default(null), + privateHint: z.string().nullable().default(null), imageUrl: z.string().nullable().default(null), }); diff --git a/src/stores/chat/chat-machine.actors.ts b/src/stores/chat/chat-machine.actors.ts index 2d9a20d8..f2ce9e9b 100644 --- a/src/stores/chat/chat-machine.actors.ts +++ b/src/stores/chat/chat-machine.actors.ts @@ -41,8 +41,6 @@ export function getActiveChatWebSocket(): ChatWebSocket | null { return activeChatWebSocket; } -// 本地游客消息额度 actor 已停用:消息数量限制统一交由后端 blocked/daily_limit 响应处理。 - // ============================================================ // Init 任务 2:拉 history 3 步流(fromPromise,返回最终结果) // ============================================================ diff --git a/src/stores/chat/chat-machine.helpers.ts b/src/stores/chat/chat-machine.helpers.ts index 39f6b46a..2397df91 100644 --- a/src/stores/chat/chat-machine.helpers.ts +++ b/src/stores/chat/chat-machine.helpers.ts @@ -89,6 +89,13 @@ export function sendResponseToUiMessage(response: ChatSendResponse): UiMessage { ...(response.showUpgrade && response.imageUrl ? { imagePaywalled: true } : {}), + ...(response.isPrivate != null ? { isPrivate: response.isPrivate } : {}), + ...(response.privateLocked != null + ? { privateLocked: response.privateLocked } + : {}), + ...(response.privateHint != null + ? { privateHint: response.privateHint } + : {}), }; }