feat(chat): add support action cards and live entitlements
Docker Image / Build and Push Docker Image (push) Successful in 2m2s

This commit is contained in:
Codex
2026-07-24 17:59:57 +08:00
parent 17236bd14e
commit 30ab2c2c97
52 changed files with 1151 additions and 40 deletions
@@ -0,0 +1,28 @@
"use client";
import { useEffect } from "react";
import { usePathname } from "next/navigation";
import {
clearPendingChatActionArrival,
readPendingChatActionArrival,
recordChatActionEventById,
} from "@/lib/chat/chat_action_events";
export function ChatActionArrivalTracker() {
const pathname = usePathname();
useEffect(() => {
const pending = readPendingChatActionArrival();
if (!pending || pathname !== pending.expectedPath) return;
void recordChatActionEventById(
pending.actionId,
pending.characterId,
"arrived",
)
.then(() => clearPendingChatActionArrival())
.catch(() => undefined);
}, [pathname]);
return null;
}
+2
View File
@@ -10,6 +10,7 @@
import type { ReactNode } from "react";
import { CharacterCatalogProvider } from "@/providers/character-catalog-provider";
import { ChatActionArrivalTracker } from "@/providers/chat-action-arrival-tracker";
import { SplashLatestMessageProvider } from "@/providers/splash-latest-message-provider";
import { ViewportCssVarsProvider } from "@/providers/viewport-css-vars-provider";
import { AppNavigationGuard } from "@/router/app-navigation-guard";
@@ -31,6 +32,7 @@ export function RootProviders({ children }: RootProvidersProps) {
<AuthStatusChecker />
<OAuthSessionSync />
<AppNavigationGuard />
<ChatActionArrivalTracker />
<SplashLatestMessageProvider>
<UserProvider>
<UserAuthSync />