MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / renderTuiConfig

Function renderTuiConfig

apps/kimi-code/src/tui/config.ts:151–169  ·  view source on GitHub ↗
(config: TuiConfig)

Source from the content-addressed store, hash-verified

149}
150
151export function renderTuiConfig(config: TuiConfig): string {
152 return `# ~/.kimi-code/tui.toml
153# Client preferences for kimi-code.
154# Agent/runtime settings stay in ~/.kimi-code/config.toml.
155
156theme = "${escapeTomlBasicString(config.theme)}" # "auto" | "dark" | "light" | custom theme name
157disable_paste_burst = ${String(config.disablePasteBurst)} # true disables non-bracketed paste-burst fallback
158
159[editor]
160command = "${escapeTomlBasicString(config.editorCommand ?? '')}" # Empty uses $VISUAL / $EDITOR
161
162[notifications]
163enabled = ${String(config.notifications.enabled)} # true | false
164notification_condition = "${config.notifications.condition}" # "unfocused" | "always"
165
166[upgrade]
167auto_install = ${String(config.upgrade.autoInstall)} # true | false
168`;
169}
170
171function escapeTomlBasicString(value: string): string {
172 return value

Callers 1

saveTuiConfigFunction · 0.85

Calls 1

escapeTomlBasicStringFunction · 0.85

Tested by

no test coverage detected