feat(chat): render commercial actions and persist greetings

This commit is contained in:
Codex
2026-07-23 14:52:34 +08:00
parent b1f52c68e8
commit 537a0a2c36
26 changed files with 548 additions and 1 deletions
+14
View File
@@ -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,