Files
DeepTutor/web/features/chat/components/turn/ProtocolMismatchNotice.tsx
Bingxi Zhao (Frank) 6e6e56aedb release: v1.6.3
Ship the breaking front- and back-end runtime and route refactor,
learner and guardian flows, grounded reading, knowledge and parser
updates, and recoverable long-running streams.

Release notes: assets/releases/ver1-6-3.md
2026-09-02 04:09:11 +08:00

40 lines
928 B
TypeScript

"use client";
import { useTranslation } from "react-i18next";
import { Button, InlineAlert } from "@/shared/ui";
export interface ProtocolMismatchNoticeProps {
clientVersion: string;
serverVersion?: string;
onReload?: () => void;
}
export function ProtocolMismatchNotice({
clientVersion,
serverVersion,
onReload,
}: ProtocolMismatchNoticeProps) {
const { t } = useTranslation();
return (
<InlineAlert
tone="danger"
title={t("Frontend update required")}
action={
onReload ? (
<Button size="sm" variant="secondary" onClick={onReload}>
{t("Reload")}
</Button>
) : null
}
>
{t(
"This page uses protocol {{clientVersion}}, but the server reports {{serverVersion}}.",
{
clientVersion,
serverVersion: serverVersion || t("an incompatible version"),
},
)}
</InlineAlert>
);
}