refactor(chat): remove guest history synchronization

This commit is contained in:
2026-07-20 14:02:39 +08:00
parent 1f7ab2be04
commit 4d1c85727a
17 changed files with 10 additions and 300 deletions
@@ -6,8 +6,6 @@ import type {
import {
ChatHistoryResponse,
ChatPreviewsResponse,
ChatSyncRequest,
ChatSyncRequestSchema,
ChatSendResponse,
SendMessageRequestSchema,
UnlockHistoryRequestSchema,
@@ -58,15 +56,6 @@ export class ChatRemoteDataSource {
return Result.wrap(() => this.api.getPreviews(options));
}
async syncGuestHistory(
request: ChatSyncRequest,
options?: ChatRequestOptions,
): Promise<Result<void>> {
return Result.wrap(() =>
this.api.syncGuestHistory(ChatSyncRequestSchema.parse(request), options),
);
}
async getHistory(
characterId: string,
limit = 50,
-8
View File
@@ -10,7 +10,6 @@ import type {
import type {
ChatHistoryResponse,
ChatPreviewsResponse,
ChatSyncRequest,
ChatMessage,
ChatSendResponse,
UnlockHistoryResponse,
@@ -63,13 +62,6 @@ export class ChatRepository implements IChatRepository {
return this.remote.getPreviews(options);
}
async syncGuestHistory(
request: ChatSyncRequest,
options?: ChatRequestOptions,
): Promise<Result<void>> {
return this.remote.syncGuestHistory(request, options);
}
/** 解锁单条历史付费 / 私密消息。 */
async unlockPrivateMessage(
input: UnlockPrivateMessageInput,
@@ -7,7 +7,6 @@
import type {
ChatHistoryResponse,
ChatPreviewsResponse,
ChatSyncRequest,
ChatImageData,
ChatLockDetailData,
ChatLockType,
@@ -79,12 +78,6 @@ export interface IChatRepository {
options?: ChatRequestOptions,
): Promise<Result<ChatPreviewsResponse>>;
/** 把一个角色的游客历史同步到正式账号。 */
syncGuestHistory(
request: ChatSyncRequest,
options?: ChatRequestOptions,
): Promise<Result<void>>;
/** 解锁单条历史付费 / 私密消息。 */
unlockPrivateMessage(
input: UnlockPrivateMessageInput,