(config: TuiConfig)
| 149 | } |
| 150 | |
| 151 | export 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 | |
| 156 | theme = "${escapeTomlBasicString(config.theme)}" # "auto" | "dark" | "light" | custom theme name |
| 157 | disable_paste_burst = ${String(config.disablePasteBurst)} # true disables non-bracketed paste-burst fallback |
| 158 | |
| 159 | [editor] |
| 160 | command = "${escapeTomlBasicString(config.editorCommand ?? '')}" # Empty uses $VISUAL / $EDITOR |
| 161 | |
| 162 | [notifications] |
| 163 | enabled = ${String(config.notifications.enabled)} # true | false |
| 164 | notification_condition = "${config.notifications.condition}" # "unfocused" | "always" |
| 165 | |
| 166 | [upgrade] |
| 167 | auto_install = ${String(config.upgrade.autoInstall)} # true | false |
| 168 | `; |
| 169 | } |
| 170 | |
| 171 | function escapeTomlBasicString(value: string): string { |
| 172 | return value |
no test coverage detected