feat(chat): render commercial actions and persist greetings
This commit is contained in:
@@ -101,6 +101,20 @@ export async function syncNetworkHistory(
|
||||
emptyChatGreeting,
|
||||
);
|
||||
|
||||
const openingResult = await chatRepo.saveOpeningMessage(
|
||||
characterId,
|
||||
emptyChatGreeting,
|
||||
{ signal },
|
||||
);
|
||||
if (Result.isErr(openingResult)) {
|
||||
if (isAbortError(openingResult.error)) throw openingResult.error;
|
||||
log.warn("[chat-machine] opening message persistence skipped", {
|
||||
characterId,
|
||||
error: openingResult.error,
|
||||
});
|
||||
}
|
||||
signal?.throwIfAborted();
|
||||
|
||||
const networkResult = await chatRepo.getHistory(
|
||||
characterId,
|
||||
CHAT_HISTORY_LIMIT,
|
||||
|
||||
Reference in New Issue
Block a user