Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/components/account/config/system/ai.tsx
Views: 687
import { Space } from "antd";12import Loading from "components/share/loading";3import useEditTable from "lib/hooks/edit-table";4import register from "../register";56const desc = {7time_ago_absolute: `8You can display timestamps either as absolute points in time or relative to9the current time.`,10dark_mode: `Use Dark mode to reduce eye strain and save power by showing light text on a dark background.`,11extra: "dark reader",12};1314interface Data {15other_settings: {16openai_disabled: boolean;17};18}1920register({21path: "system/llm",22title: "AI Settings",23icon: "ai",24desc: "Configure AI integrations.",25search: desc,26Component: () => {27const { edited, original, Save, EditBoolean } = useEditTable<Data>({28accounts: { other_settings: null },29});30if (original == null || edited == null) {31return <Loading />;32}3334return (35<Space direction="vertical" style={{ width: "100%" }}>36<Save />3738<EditBoolean39path="other_settings.openai_disabled"40icon="robot"41title="Disable all AI integrations"42desc={43<>44Disable code generation, buttons in Jupyter, @chatgpt mentions,45etc.46</>47}48label="Disable all AI integrations"49/>5051{/* TODO: insert the <ModelSwitch/> component here, which is more complex than just a plain list of options */}52</Space>53);54},55});565758