xonecas.io
64875
Mc

mini-coder / commit ba7e85e

feat: ansi16 and molokai themes

xonecas2026-06-16 ba7e85eb777e96df811e0c656206348857b1ee5a parent 0251d49

7 files changed

src/args.ts+4−0
@@ -9,6 +9,7 @@ import {
99 import { Value } from "typebox/value";
1010 import { getAvailableProviders, isOAuthProvider, loginOAuth } from "./oauth";
1111 import { DATA_DIR, SETTINGS_PATH } from "./shared.ts";
12+import { DEFAULT_TUI_THEME_ID } from "./themes.ts";
1213 import {
1314 type CliOptions,
1415 CliOptionsSchema,
@@ -149,6 +150,7 @@ export async function handleArgv(argv: string[]): Promise<CliOptions> {
149150 ? DEFAULT_MODEL_ID
150151 : getFirstModelConfig(settingsProvider, customProviders).id);
151152 const settingsEffort = settings?.effort ?? DEFAULT_EFFORT;
153+ const settingsTheme = settings?.theme ?? DEFAULT_TUI_THEME_ID;
152154 let provider: string = settingsProvider;
153155 let modelId = settingsModelId;
154156 let effort: string = settingsEffort;
@@ -273,6 +275,7 @@ export async function handleArgv(argv: string[]): Promise<CliOptions> {
273275 effort: cliSettings.effort,
274276 prompt,
275277 customProviders,
278+ theme: settingsTheme,
276279 });
277280 const nextSettings = parseSettings(
278281 {
@@ -280,6 +283,7 @@ export async function handleArgv(argv: string[]): Promise<CliOptions> {
280283 model: options.model.id,
281284 effort: options.effort,
282285 customProviders,
286+ theme: options.theme,
283287 },
284288 "settings",
285289 );
src/themes.ts+234−0
@@ -0,0 +1,234 @@
1+import type { SyntaxHighlightTheme } from "@cel-tui/components";
2+import type { Color, Theme } from "@cel-tui/core";
3+
4+export const TUI_THEME_IDS = [
5+ "ansi16",
6+ "molokai-dark",
7+ "molokai-light",
8+] as const;
9+
10+export type TUIThemeId = (typeof TUI_THEME_IDS)[number];
11+
12+export interface TUIThemeDefinition {
13+ id: TUIThemeId;
14+ label: string;
15+ palette: Theme;
16+ syntax: SyntaxHighlightTheme;
17+ rootFgColor?: Color;
18+ rootBgColor?: Color;
19+ userMessageBgColor?: Color;
20+}
21+
22+const ANSI_SLOT_HEX: Record<Color, string> = {
23+ color00: "#000000",
24+ color01: "#cd3131",
25+ color02: "#0dbc79",
26+ color03: "#e5e510",
27+ color04: "#2472c8",
28+ color05: "#bc3fbc",
29+ color06: "#11a8cd",
30+ color07: "#e5e5e5",
31+ color08: "#666666",
32+ color09: "#f14c4c",
33+ color10: "#23d18b",
34+ color11: "#f5f543",
35+ color12: "#3b8eea",
36+ color13: "#d670d6",
37+ color14: "#29b8db",
38+ color15: "#ffffff",
39+};
40+
41+export const theme = {
42+ black: "color00",
43+ red: "color01",
44+ green: "color02",
45+ yellow: "color03",
46+ blue: "color04",
47+ magenta: "color05",
48+ cyan: "color06",
49+ white: "color07",
50+ bblack: "color08",
51+ bred: "color09",
52+ bgreen: "color10",
53+ byellow: "color11",
54+ bblue: "color12",
55+ bmagenta: "color13",
56+ bcyan: "color14",
57+ bwhite: "color15",
58+} as const satisfies Record<string, Color>;
59+
60+const ansi16Palette: Theme = {
61+ color00: 0,
62+ color01: 1,
63+ color02: 2,
64+ color03: 3,
65+ color04: 4,
66+ color05: 5,
67+ color06: 6,
68+ color07: 7,
69+ color08: 8,
70+ color09: 9,
71+ color10: 10,
72+ color11: 11,
73+ color12: 12,
74+ color13: 13,
75+ color14: 14,
76+ color15: 15,
77+};
78+
79+const molokaiDarkPalette: Theme = {
80+ color00: "#272822",
81+ color01: "#f92672",
82+ color02: "#a6e22e",
83+ color03: "#e6db74",
84+ color04: "#66d9ef",
85+ color05: "#f92672",
86+ color06: "#66d9ef",
87+ color07: "#f8f8f2",
88+ color08: "#6f705f",
89+ color09: "#ff6188",
90+ color10: "#a6e22e",
91+ color11: "#ffd866",
92+ color12: "#78dce8",
93+ color13: "#ae81ff",
94+ color14: "#66d9ef",
95+ color15: "#ffffff",
96+};
97+
98+const molokaiLightPalette: Theme = {
99+ color00: "#272822",
100+ color01: "#ff5f87",
101+ color02: "#8bcf26",
102+ color03: "#c7a100",
103+ color04: "#61aeee",
104+ color05: "#d16dff",
105+ color06: "#00a8b5",
106+ color07: "#f2efe4",
107+ color08: "#5f6060",
108+ color09: "#b0003a",
109+ color10: "#3f7d00",
110+ color11: "#725f00",
111+ color12: "#005f9f",
112+ color13: "#7f2caf",
113+ color14: "#007885",
114+ color15: "#fffdf5",
115+};
116+
117+const slotColor = (slot: Color) => ANSI_SLOT_HEX[slot];
118+
119+function syntaxScope(
120+ scope: string | readonly string[],
121+ foreground: Color,
122+ fontStyle?: string,
123+) {
124+ return {
125+ scope,
126+ settings: {
127+ foreground: slotColor(foreground),
128+ ...(fontStyle ? { fontStyle } : {}),
129+ },
130+ };
131+}
132+
133+const molokaiDarkSyntax = {
134+ name: "mini-coder-molokai-dark",
135+ type: "dark",
136+ fg: slotColor("color07"),
137+ tokenColors: [
138+ syntaxScope(["comment", "markup.quote"], "color08", "italic"),
139+ syntaxScope(["keyword", "operator"], "color05"),
140+ syntaxScope(["string", "escape", "markup.list"], "color03"),
141+ syntaxScope(["number", "regexp"], "color13"),
142+ syntaxScope(["function", "command", "markup.code"], "color10"),
143+ syntaxScope(["builtin", "property", "type", "meta"], "color06"),
144+ syntaxScope("markup.heading", "color04", "bold"),
145+ syntaxScope(["diff.deleted", "diff.file.old"], "color09"),
146+ syntaxScope(["diff.inserted", "diff.file.new"], "color10"),
147+ syntaxScope("diff.hunk", "color13"),
148+ syntaxScope(["diff.header", "diff.no-newline"], "color08"),
149+ ],
150+} as const satisfies SyntaxHighlightTheme;
151+
152+const molokaiLightSyntax = {
153+ name: "mini-coder-molokai-light",
154+ type: "light",
155+ fg: slotColor("color00"),
156+ tokenColors: [
157+ syntaxScope(["comment", "markup.quote"], "color08", "italic"),
158+ syntaxScope(["keyword", "operator"], "color13"),
159+ syntaxScope(["string", "escape", "markup.list"], "color11"),
160+ syntaxScope(["number", "regexp"], "color09"),
161+ syntaxScope(["function", "command", "markup.code"], "color10"),
162+ syntaxScope(["builtin", "property", "type", "meta"], "color14"),
163+ syntaxScope("markup.heading", "color12", "bold"),
164+ syntaxScope(["diff.deleted", "diff.file.old"], "color09"),
165+ syntaxScope(["diff.inserted", "diff.file.new"], "color10"),
166+ syntaxScope("diff.hunk", "color13"),
167+ syntaxScope(["diff.header", "diff.no-newline"], "color08"),
168+ ],
169+} as const satisfies SyntaxHighlightTheme;
170+
171+export const DEFAULT_TUI_THEME_ID: TUIThemeId = "ansi16";
172+
173+export const TUI_THEMES = {
174+ ansi16: {
175+ id: "ansi16",
176+ label: "ansi16",
177+ palette: ansi16Palette,
178+ syntax: "default",
179+ userMessageBgColor: theme.bblack,
180+ },
181+ "molokai-dark": {
182+ id: "molokai-dark",
183+ label: "molokai dark",
184+ palette: molokaiDarkPalette,
185+ syntax: molokaiDarkSyntax,
186+ rootFgColor: theme.bwhite,
187+ rootBgColor: theme.black,
188+ userMessageBgColor: theme.bblack,
189+ },
190+ "molokai-light": {
191+ id: "molokai-light",
192+ label: "molokai light",
193+ palette: molokaiLightPalette,
194+ syntax: molokaiLightSyntax,
195+ rootFgColor: theme.black,
196+ rootBgColor: theme.bwhite,
197+ userMessageBgColor: theme.white,
198+ },
199+} as const satisfies Record<TUIThemeId, TUIThemeDefinition>;
200+
201+export const activeTuiTheme: Theme = { ...ansi16Palette };
202+
203+export function applyTUITheme(id: TUIThemeId): void {
204+ Object.assign(activeTuiTheme, TUI_THEMES[id].palette);
205+}
206+
207+export function getTUITheme(id: TUIThemeId): TUIThemeDefinition {
208+ return TUI_THEMES[id];
209+}
210+
211+export function textColorForBackground(
212+ bgColor: Color,
213+ themeId: TUIThemeId,
214+): Color {
215+ if (bgColor === theme.bblack) return theme.bwhite;
216+
217+ if (
218+ themeId === "molokai-light" &&
219+ (
220+ [
221+ theme.bred,
222+ theme.bgreen,
223+ theme.byellow,
224+ theme.bblue,
225+ theme.bmagenta,
226+ theme.bcyan,
227+ ] as readonly Color[]
228+ ).includes(bgColor)
229+ ) {
230+ return theme.bwhite;
231+ }
232+
233+ return theme.black;
234+}
src/tui-components.ts+4−27
@@ -1,32 +1,9 @@
11 import { type Color, HStack, Text } from "@cel-tui/core";
22 import { onceEvery } from "./shared";
3+import { textColorForBackground, theme } from "./themes";
34 import type { TUIState } from "./types";
45
5-export const theme = {
6- black: "color00" as Color,
7- bblack: "color08" as Color,
8-
9- red: "color01" as Color,
10- bred: "color09" as Color,
11-
12- green: "color02" as Color,
13- bgreen: "color10" as Color,
14-
15- yellow: "color03" as Color,
16- byellow: "color11" as Color,
17-
18- blue: "color04" as Color,
19- bblue: "color12" as Color,
20-
21- magenta: "color05" as Color,
22- bmagenta: "color13" as Color,
23-
24- cyan: "color06" as Color,
25- bcyan: "color14" as Color,
26-
27- white: "color07" as Color,
28- bwhite: "color15" as Color,
29-};
6+export { theme };
307
318 export function TextPill(
329 content: string,
@@ -100,7 +77,7 @@ export function ActivityPill(state: TUIState, spinnerFrame: string) {
10077
10178 export function ContextPill(state: TUIState) {
10279 let text = "";
103- let bg = theme.bgreen;
80+ let bg: Color = theme.bgreen;
10481 if (!state.contextSize) {
10582 text = "0%";
10683 bg = theme.bwhite;
@@ -126,7 +103,7 @@ export function ContextPill(state: TUIState) {
126103
127104 text += ` (${state.options.model.contextWindow / 1000}k)`;
128105
129- return TextPill(text, theme.black, bg);
106+ return TextPill(text, textColorForBackground(bg, state.options.theme), bg);
130107 }
131108
132109 export function GitPill(state: TUIState) {
src/tui-conversation.ts+48−16
@@ -1,36 +1,48 @@
1-import { SyntaxHighlight } from "@cel-tui/components";
2-import { HStack, type Node, Text, VStack } from "@cel-tui/core";
1+import {
2+ SyntaxHighlight,
3+ type SyntaxHighlightTheme,
4+} from "@cel-tui/components";
5+import { type Color, HStack, type Node, Text, VStack } from "@cel-tui/core";
36 import { estimateTokens } from "./shared";
7+import { getTUITheme, textColorForBackground } from "./themes";
48 import { TextPill, theme } from "./tui-components";
59 import type { TUIMessage, TUIState, TUIToolCall } from "./types";
610
7-export function emptyState(): Node {
11+export function emptyState(state: TUIState): Node {
812 const randColor = theme.bgreen;
13+ const shortcutFgColor =
14+ state.options.theme === "ansi16"
15+ ? randColor
16+ : textColorForBackground(theme.bblack, state.options.theme);
917 return HStack({ flex: 1, alignItems: "center" }, [
1018 VStack({ flex: 1, alignItems: "center", gap: 1 }, [
1119 HStack({ gap: 1 }, [
1220 Text("mini"),
13- TextPill("coder", theme.black, randColor),
21+ TextPill(
22+ "coder",
23+ textColorForBackground(randColor, state.options.theme),
24+ randColor,
25+ ),
1426 ]),
1527 VStack({ gap: 1 }, [
1628 HStack({ gap: 1 }, [
17- TextPill("/new", randColor, theme.bblack, 13),
29+ TextPill("/new", shortcutFgColor, theme.bblack, 13),
1830 Text("Start a new session from the input box.", {
1931 fgColor: theme.bblack,
2032 }),
2133 ]),
2234 HStack({ gap: 1 }, [
23- TextPill("ctrl+p", randColor, theme.bblack, 13),
35+ TextPill("ctrl+p", shortcutFgColor, theme.bblack, 13),
2436 Text("Menu for session history, and settings.", {
2537 fgColor: theme.bblack,
2638 }),
2739 ]),
2840 HStack({ gap: 1 }, [
29- TextPill("ESC", randColor, theme.bblack, 13),
41+ TextPill("ESC", shortcutFgColor, theme.bblack, 13),
3042 Text("Abort agent response.", { fgColor: theme.bblack }),
3143 ]),
3244 HStack({ gap: 1 }, [
33- TextPill("ctrl+c|d|q", randColor, theme.bblack, 13),
45+ TextPill("ctrl+c|d|q", shortcutFgColor, theme.bblack, 13),
3446 Text("Quit.", { fgColor: theme.bblack }),
3547 ]),
3648 ]),
@@ -38,7 +50,10 @@ export function emptyState(): Node {
3850 ]);
3951 }
4052
41-function ConversationMessageToolCall(call: TUIToolCall) {
53+function ConversationMessageToolCall(
54+ call: TUIToolCall,
55+ syntaxTheme: SyntaxHighlightTheme,
56+) {
4257 let outputNode: Node | null = null;
4358
4459 // Compress read and bash calls
@@ -64,7 +79,7 @@ function ConversationMessageToolCall(call: TUIToolCall) {
6479
6580 outputNode = VStack({ width: "100%" }, blocks);
6681 } else if (call.tool === "edit") {
67- outputNode = SyntaxHighlight(call.output, "patch");
82+ outputNode = SyntaxHighlight(call.output, "patch", { theme: syntaxTheme });
6883 } else {
6984 outputNode = Text(call.output, { wrap: "word" });
7085 }
@@ -81,7 +96,7 @@ function ConversationMessageToolCall(call: TUIToolCall) {
8196
8297 // Syntax highlight bash args
8398 if (call.tool === "bash") {
84- node = SyntaxHighlight(String(value), "bash");
99+ node = SyntaxHighlight(String(value), "bash", { theme: syntaxTheme });
85100 return node;
86101 }
87102
@@ -99,7 +114,11 @@ function ConversationMessageToolCall(call: TUIToolCall) {
99114 ]);
100115 }
101116
102-function ConversationMessage(message: TUIMessage) {
117+function ConversationMessage(
118+ message: TUIMessage,
119+ syntaxTheme: SyntaxHighlightTheme,
120+ userMessageBgColor: Color | undefined,
121+) {
103122 const blocks: Node[] = [];
104123
105124 if (message.thinking) {
@@ -118,17 +137,22 @@ function ConversationMessage(message: TUIMessage) {
118137 VStack(
119138 {
120139 width: "100%",
121- bgColor: message.role === "user" ? theme.bblack : undefined,
140+ bgColor: message.role === "user" ? userMessageBgColor : undefined,
122141 padding: { y: 1, x: message.role === "user" ? 1 : 0 },
123142 },
124- [SyntaxHighlight(message.text, "markdown")],
143+ [SyntaxHighlight(message.text, "markdown", { theme: syntaxTheme })],
125144 ),
126145 );
127146 }
128147
129148 if (message.toolCalls?.length) {
130149 blocks.push(
131- VStack({ gap: 1 }, message.toolCalls.map(ConversationMessageToolCall)),
150+ VStack(
151+ { gap: 1 },
152+ message.toolCalls.map((call) =>
153+ ConversationMessageToolCall(call, syntaxTheme),
154+ ),
155+ ),
132156 );
133157 }
134158
@@ -158,6 +182,8 @@ function ConversationMessage(message: TUIMessage) {
158182 }
159183
160184 export function Conversation(state: TUIState) {
185+ const activeTheme = getTUITheme(state.options.theme);
186+
161187 return VStack(
162188 {
163189 flex: 1,
@@ -169,6 +195,12 @@ export function Conversation(state: TUIState) {
169195 state.stickToBottom = offset >= maxOffset;
170196 },
171197 },
172- state.tuiMessages.map(ConversationMessage),
198+ state.tuiMessages.map((message) =>
199+ ConversationMessage(
200+ message,
201+ activeTheme.syntax,
202+ activeTheme.userMessageBgColor,
203+ ),
204+ ),
173205 );
174206 }
src/tui-overlay.ts+47−2
@@ -1,4 +1,4 @@
1-import { HStack, Text, TextInput, VStack } from "@cel-tui/core";
1+import { cel, HStack, Text, TextInput, VStack } from "@cel-tui/core";
22 import {
33 getModels,
44 type Message,
@@ -9,6 +9,7 @@ import { saveSettings } from "./args";
99 import { getAvailableProviders } from "./oauth";
1010 import { listSessionsForCwd } from "./session";
1111 import { estimateTokens, formatTimestamp } from "./shared";
12+import { applyTUITheme, getTUITheme, TUI_THEME_IDS } from "./themes";
1213 import { TextPill, theme } from "./tui-components";
1314 import type { SelectOptions, SelectState, Session, TUIState } from "./types";
1415
@@ -344,12 +345,28 @@ export function mainMenu(state: TUIState, initialPane = "main") {
344345 })),
345346 });
346347
348+ const themesPane = (): MenuPane => ({
349+ label: "themes",
350+ filter: "",
351+ list: TUI_THEME_IDS.map((id) => {
352+ const tuiTheme = getTUITheme(id);
353+ return {
354+ label:
355+ id === state.options.theme
356+ ? `${tuiTheme.label} (current)`
357+ : tuiTheme.label,
358+ value: id,
359+ };
360+ }),
361+ });
362+
347363 const mainPane: MenuPane = {
348364 label: "main",
349365 filter: state.prompt.length ? state.prompt : "",
350366 list: [
351367 { label: "models and providers", value: "providers" },
352368 { label: "reasoning effort", value: "effort" },
369+ { label: "themes", value: "themes" },
353370 { label: "sessions", value: "sessions" },
354371 { label: "fork", value: "fork" },
355372 ],
@@ -359,7 +376,7 @@ export function mainMenu(state: TUIState, initialPane = "main") {
359376 filter: "",
360377 list: efforts,
361378 };
362- const panes: MenuPane[] = [effortPane];
379+ const panes: MenuPane[] = [effortPane, themesPane()];
363380 let currentPane = initialPane === "fork" ? forkPane() : mainPane;
364381 let selectedProvider: string | undefined;
365382
@@ -387,6 +404,14 @@ export function mainMenu(state: TUIState, initialPane = "main") {
387404 state.overlay = false;
388405 };
389406
407+ const requestThemeRefresh = () => {
408+ state.forceThemeRefresh = true;
409+ setTimeout(() => {
410+ state.forceThemeRefresh = false;
411+ cel.render();
412+ }, 0);
413+ };
414+
390415 const toTUIMessage = (msg: Message) => {
391416 const textFromContent = (
392417 content: string | { type: string; text?: string }[],
@@ -509,6 +534,24 @@ export function mainMenu(state: TUIState, initialPane = "main") {
509534 return;
510535 }
511536
537+ if (currentPane.label === "themes") {
538+ const nextTheme = TUI_THEME_IDS.find((id) => id === s.selected);
539+ if (!nextTheme) return;
540+
541+ state.options.theme = nextTheme;
542+ applyTUITheme(nextTheme);
543+ saveSettings({
544+ provider: state.options.provider,
545+ model: state.options.model.id,
546+ effort: state.options.effort,
547+ customProviders: state.options.customProviders,
548+ theme: nextTheme,
549+ });
550+ requestThemeRefresh();
551+ closeMenu(s);
552+ return;
553+ }
554+
512555 if (currentPane.label === "providers") {
513556 const provider = currentProviders.find((v) => v === s.selected);
514557 if (!provider) return;
@@ -541,6 +584,7 @@ export function mainMenu(state: TUIState, initialPane = "main") {
541584 model: model.id,
542585 effort: state.options.effort,
543586 customProviders: state.options.customProviders,
587+ theme: state.options.theme,
544588 });
545589 closeMenu(s);
546590 return;
@@ -556,6 +600,7 @@ export function mainMenu(state: TUIState, initialPane = "main") {
556600 model: state.options.model.id,
557601 effort: effort,
558602 customProviders: state.options.customProviders,
603+ theme: state.options.theme,
559604 });
560605 closeMenu(s);
561606 }
src/tui.ts+8−2
@@ -16,6 +16,7 @@ import {
1616 } from "./prompt";
1717 import { updateSession } from "./session";
1818 import { estimateTokens, formatTimestamp, secureRandomString } from "./shared";
19+import { activeTuiTheme, applyTUITheme, getTUITheme } from "./themes";
1920 import { bash, runBashTool } from "./tool-bash";
2021 import { edit, runEditTool } from "./tool-edit";
2122 import { read, runReadTool } from "./tool-read";
@@ -173,8 +174,10 @@ export function initTUI(state: TUIState, leave: (s: string) => void) {
173174 }
174175 };
175176
176- cel.init(new ProcessTerminal());
177+ applyTUITheme(state.options.theme);
178+ cel.init(new ProcessTerminal(), { theme: activeTuiTheme });
177179 cel.viewport(() => {
180+ const activeTheme = getTUITheme(state.options.theme);
178181 const layers = [
179182 VStack(
180183 {
@@ -182,9 +185,12 @@ export function initTUI(state: TUIState, leave: (s: string) => void) {
182185 gap: 1,
183186 padding: { x: 1, y: 1 },
184187 onKeyPress: onWindowKeyPress,
188+ fgColor: activeTheme.rootFgColor,
189+ bgColor: activeTheme.rootBgColor,
190+ italic: state.forceThemeRefresh,
185191 },
186192 [
187- state.messages.length ? Conversation(state) : emptyState(),
193+ state.messages.length ? Conversation(state) : emptyState(state),
188194 HStack({ gap: 1 }, [
189195 ModelPill(state),
190196 TextPill(`../${state.cwd}`, theme.bwhite, theme.bblack),
src/types.ts+8−0
@@ -10,6 +10,7 @@ import {
1010 Type,
1111 } from "@earendil-works/pi-ai";
1212 import type { OAuthCredentials } from "@earendil-works/pi-ai/oauth";
13+import { TUI_THEME_IDS, type TUIThemeId } from "./themes";
1314
1415 const ThinkingLevelSchema = Type.Unsafe<ThinkingLevel>(
1516 Type.Union([
@@ -45,11 +46,16 @@ const ModelSchema = Type.Unsafe<Model<Api>>(
4546 }),
4647 );
4748
49+const TUIThemeIdSchema = Type.Unsafe<TUIThemeId>(
50+ Type.Union(TUI_THEME_IDS.map((id) => Type.Literal(id))),
51+);
52+
4853 export const SettingsSchema = Type.Object({
4954 provider: Type.String(),
5055 model: Type.String(),
5156 effort: ThinkingLevelSchema,
5257 customProviders: Type.Optional(Type.Array(ModelSchema)),
58+ theme: Type.Optional(TUIThemeIdSchema),
5359 });
5460 export type Settings = Static<typeof SettingsSchema>;
5561
@@ -59,6 +65,7 @@ export const CliOptionsSchema = Type.Object({
5965 effort: ThinkingLevelSchema,
6066 prompt: Type.Optional(Type.String()),
6167 customProviders: Type.Optional(Type.Array(ModelSchema)),
68+ theme: TUIThemeIdSchema,
6269 });
6370 export type CliOptions = Static<typeof CliOptionsSchema>;
6471
@@ -105,6 +112,7 @@ export type TUIState = {
105112 cwd: string;
106113 gitBranch?: string;
107114 overlay?: boolean | undefined;
115+ forceThemeRefresh?: boolean | undefined;
108116 sessionId?: string | undefined;
109117 };