refactor: remove unused subscription plans and router files
This commit is contained in:
@@ -1,20 +1,5 @@
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* ChatRepository
|
||||
*
|
||||
* 聊天仓库:编排远程 ChatApi + 本地 LocalChatStorage(Dexie/IndexedDB)。
|
||||
* 行为对齐原 Dart `lib/data/repositories/chat_repository_impl.dart`:
|
||||
* - `saveMessagesToLocal` 保留「先清后写」语义(Dart `box.clear()` + bulk add)
|
||||
* - 替代 Dart 同步 `int get localMessageCount`,改为异步 `getLocalMessageCount()`
|
||||
* (Dexie 异步 API 决定)
|
||||
*
|
||||
* ChatMessage ↔ LocalMessage 的字段映射在仓库内 inline 完成(用户决策):
|
||||
* - 写:ChatMessage 的 id/role/content/createdAt → LocalMessage(sessionId="")
|
||||
* - 读:LocalMessage 的 id/role/content/createdAt → ChatMessage(丢弃 sessionId)
|
||||
*
|
||||
* 原始 Dart: lib/data/repositories/chat_repository_impl.dart
|
||||
*/
|
||||
import { ChatApi, chatApi } from "@/data/services/api";
|
||||
import {
|
||||
ChatHistoryResponse,
|
||||
|
||||
@@ -30,12 +30,14 @@ export interface IChatRepository {
|
||||
/** 获取聊天历史,分页参数默认 limit=50, offset=0。 */
|
||||
getHistory(limit?: number, offset?: number): Promise<Result<ChatHistoryResponse>>;
|
||||
|
||||
//TODO remove
|
||||
/** 解锁私密消息。 */
|
||||
unlockPrivateMessage(messageId: string): Promise<Result<UnlockPrivateResponse>>;
|
||||
|
||||
/** 一键解锁历史锁定消息。 */
|
||||
unlockHistory(): Promise<Result<UnlockHistoryResponse>>;
|
||||
|
||||
//TODO remove
|
||||
/** 把本地缓存中的私密消息标记为已解锁。 */
|
||||
markPrivateMessageUnlockedInLocal(
|
||||
messageId: string,
|
||||
|
||||
Reference in New Issue
Block a user