CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/admin/llm/value.tsx
Views: 687
1
import { Icon, Text } from "@cocalc/frontend/components";
2
3
export function Value({ val }: { val: any }) {
4
switch (typeof val) {
5
case "boolean":
6
return val ? <Icon unicode={0x2705} /> : <Icon unicode={0x274c} />;
7
case "number":
8
return <>`${val}`</>;
9
default:
10
return <Text code>{JSON.stringify(val)}</Text>;
11
}
12
}
13
14