feat(chat): render commercial actions and persist greetings

This commit is contained in:
Codex
2026-07-23 14:52:34 +08:00
parent 3790fb813f
commit 05f625dd0b
26 changed files with 548 additions and 1 deletions
@@ -7,6 +7,8 @@ import {
ChatHistoryResponse,
ChatPreviewsResponse,
ChatSendResponse,
OpeningMessageRequestSchema,
OpeningMessageResponse,
SendMessageRequestSchema,
UnlockHistoryRequestSchema,
UnlockHistoryResponse,
@@ -50,6 +52,19 @@ export class ChatRemoteDataSource {
});
}
async saveOpeningMessage(
characterId: string,
openingMessage: string,
options?: ChatRequestOptions,
): Promise<Result<OpeningMessageResponse>> {
return Result.wrap(() =>
this.api.saveOpeningMessage(
OpeningMessageRequestSchema.parse({ characterId, openingMessage }),
options,
),
);
}
async getPreviews(
options?: ChatRequestOptions,
): Promise<Result<ChatPreviewsResponse>> {