opensumi / core

🚀 A framework helps you quickly build AI Native IDE products.
https://opensumi.com
MIT License
2.98k stars 382 forks source link

[BUG] 不支持 Kite 插件 #2479

Open bytemain opened 1 year ago

bytemain commented 1 year ago
CleanShot 2023-03-23 at 15 49 36@2x

Kite 插件使用了这样的代码,但我们没有这个配置项:

const ERROR_COLOR = () => {
  // For the High Contrast Theme, editorWarning.foreground renders the text invisible.
  return vscode.workspace
    .getConfiguration("workbench")
    .colorTheme.includes("High Contrast")
    ? "#ff0000" 
    : vscode.ThemeColor("editorWarning.foreground");
};
CleanShot 2023-03-23 at 15 53 27@2x
erha19 commented 1 year ago

这里应该需要在框架内注册一个配置项 workbench.colorTheme,预期是在切换到 HC 主题时,这里的配置项值为:

"workbench.colorTheme": "GitHub Theme High Contrast",

同样的,还有 workbench.iconTheme 也是一样逻辑

相关代码位置见:

应用颜色主题:https://github.com/opensumi/core/blob/3455b10620badfe7b03a02d66136d3226b7891b8/packages/theme/src/browser/workbench.theme.service.ts#L171

应用图标主题: https://github.com/opensumi/core/blob/3455b10620badfe7b03a02d66136d3226b7891b8/packages/theme/src/browser/icon.service.ts#L403

注册默认配置逻辑见:

https://github.com/opensumi/core/blob/3455b10620badfe7b03a02d66136d3226b7891b8/packages/theme/src/browser/icon.service.ts

欢迎开发者贡献代码,或等待我们后续实现。