assistant.ts

 1import { ColorScheme } from "../themes/common/colorScheme"
 2import { text, border, background } from "./components"
 3import editor from "./editor"
 4
 5export default function assistant(colorScheme: ColorScheme) {
 6    const layer = colorScheme.highest;
 7    return {
 8      container: {
 9        background: editor(colorScheme).background,
10        padding: { left: 12 }
11      },
12      header: {
13        border: border(layer, "default", { bottom: true, top: true }),
14        margin: { bottom: 6, top: 6 }
15      },
16      user_sender: {
17        ...text(layer, "sans", "default", { size: "sm", weight: "bold" }),
18      },
19      assistant_sender: {
20        ...text(layer, "sans", "accent", { size: "sm", weight: "bold" }),
21      },
22      sent_at: {
23        margin: { top: 2, left: 8 },
24        ...text(layer, "sans", "default", { size: "2xs" }),
25      },
26      apiKeyEditor: {
27          background: background(layer, "on"),
28          cornerRadius: 6,
29          text: text(layer, "mono", "on"),
30          placeholderText: text(layer, "mono", "on", "disabled", {
31              size: "xs",
32          }),
33          selection: colorScheme.players[0],
34          border: border(layer, "on"),
35          padding: {
36              bottom: 4,
37              left: 8,
38              right: 8,
39              top: 4,
40          },
41      },
42      apiKeyPrompt: {
43        padding: 10,
44        ...text(layer, "sans", "default", { size: "xs" }),
45      }
46    }
47}