What feature would you like to see?
问题描述
当前 theme = "dark" / "light" 只改变了 UI 框架配色(状态栏、Diff 背景、任务浏览器等),代码高亮主题是完全固定的一套,不随主题切换而变化。
这导致在浅色终端或特定视觉偏好下,默认的 cyan / bright_cyan 代码高亮非常刺眼且难以阅读。
临时 workaround
为了换掉青色,我不得不直接修改源码:
| 文件 |
修改内容 |
kimi_cli/utils/rich/syntax.py |
将 KIMI_ANSI_THEME 中所有 cyan / bright_cyan 替换为其他颜色(如 yellow / bright_yellow) |
kimi_cli/utils/rich/markdown.py |
将 _FALLBACK_STYLES 中的 markdown.code、markdown.code_block、markdown.link_url 的 cyan 替换 |
kimi_cli/ui/shell/console.py |
将 NEUTRAL_MARKDOWN_THEME 中的 markdown.link_url 的 cyan 替换 |
希望官方提供一种无需改源码的方式来自定义代码高亮配色
Additional information
No response
What feature would you like to see?
Problem description
Currently theme = "dark" / "light" only changes the UI frame color (status bar, Diff background, task browser, etc.). The code highlighting theme is a completely fixed set and does not change with theme switching.
This results in the default cyan / bright_cyan code highlighting being very harsh and difficult to read in light-colored terminals or under certain visual preferences.
Temporary workaround
In order to replace the cyan color, I had to modify the source code directly:
| File |
Modify content |
kimi_cli/utils/rich/syntax.py |
Replace all cyan / bright_cyan in KIMI_ANSI_THEME with other colors (such as yellow / bright_yellow) |
kimi_cli/utils/rich/markdown.py |
Replace the cyan of markdown.code, markdown.code_block, markdown.link_url in _FALLBACK_STYLES |
kimi_cli/ui/shell/console.py |
Replace the cyan of markdown.link_url in NEUTRAL_MARKDOWN_THEME |
I hope the official can provide a way to customize the code highlight color without changing the source code.
Additional information
No response
What feature would you like to see?
问题描述
当前
theme = "dark" / "light"只改变了 UI 框架配色(状态栏、Diff 背景、任务浏览器等),代码高亮主题是完全固定的一套,不随主题切换而变化。这导致在浅色终端或特定视觉偏好下,默认的
cyan/bright_cyan代码高亮非常刺眼且难以阅读。临时 workaround
为了换掉青色,我不得不直接修改源码:
kimi_cli/utils/rich/syntax.pyKIMI_ANSI_THEME中所有cyan/bright_cyan替换为其他颜色(如yellow/bright_yellow)kimi_cli/utils/rich/markdown.py_FALLBACK_STYLES中的markdown.code、markdown.code_block、markdown.link_url的 cyan 替换kimi_cli/ui/shell/console.pyNEUTRAL_MARKDOWN_THEME中的markdown.link_url的 cyan 替换希望官方提供一种无需改源码的方式来自定义代码高亮配色
Additional information
No response
What feature would you like to see?
Problem description
Currently
theme = "dark" / "light"only changes the UI frame color (status bar, Diff background, task browser, etc.). The code highlighting theme is a completely fixed set and does not change with theme switching.This results in the default
cyan/bright_cyancode highlighting being very harsh and difficult to read in light-colored terminals or under certain visual preferences.Temporary workaround
In order to replace the cyan color, I had to modify the source code directly:
kimi_cli/utils/rich/syntax.pycyan/bright_cyaninKIMI_ANSI_THEMEwith other colors (such asyellow/bright_yellow)kimi_cli/utils/rich/markdown.pymarkdown.code,markdown.code_block,markdown.link_urlin_FALLBACK_STYLESkimi_cli/ui/shell/console.pymarkdown.link_urlinNEUTRAL_MARKDOWN_THEMEI hope the official can provide a way to customize the code highlight color without changing the source code.
Additional information
No response