/** * @file ChatUiSettings — Settings → Appearance → Sessions, the Chat UI row * (`#chat-ui`): whether a Claude or Codex session opens as a chat like Claude * Desktop (`PaneChat`) instead of its terminal. A row, not a card: it sits in * the Sessions section beside the workspace-tabs switch. Saved per user on the server (`lib/chatUi.ts`), so each * account on a shared dashboard keeps its own choice on any browser. * @author Nguyễn Ngọc Trí Vĩ */ import { useTranslation } from "react-i18next"; import { saveChatUi, useChatUi } from "../../lib/chatUi"; import { toast } from "../../lib/toast"; import { SettingsSwitchRow } from "./SettingsRow"; export function ChatUiSettings() { const { t } = useTranslation("settings"); const chatUi = useChatUi(); return ( saveChatUi(on).catch((err: unknown) => toast.error(t("chatUi.saveFailed", { message: err instanceof Error ? err.message : "" })) ) } /> ); }