Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d8f2dcd
refactor(ui): 统一使用主题颜色替代硬编码样式
hqwlkj May 28, 2026
7c2b97a
Merge branch 'main' into feature/theme
hqwlkj May 28, 2026
fdd9909
refactor(theme): 替换主题色从 accent 到 primary
hqwlkj May 28, 2026
5c497b8
refactor(theme): 调整权限风险色为语义色
hqwlkj May 28, 2026
5196b02
fix(ui): 修改MessageView组件中的文本样式
hqwlkj May 28, 2026
a80d89b
style(ui): 优化界面样式和主题配色细节
hqwlkj May 29, 2026
f07f221
Merge branch 'main' into feature/theme
hqwlkj May 29, 2026
f4f69ab
test(theme): 更新默认主题的语义颜色值
hqwlkj May 29, 2026
0e052f5
docs(readme): 补充默认主题色值说明及优先级提示
hqwlkj May 29, 2026
b82a407
Merge branch 'main' into feature/theme
hqwlkj May 29, 2026
3358ca8
feat(theme): 添加亮色文字(textBright)支持
hqwlkj May 29, 2026
ff7ccec
feat(theme): 增加多主题支持与主题切换功能
hqwlkj May 30, 2026
33aaab0
docs(config): 优化主题切换说明与README文档
hqwlkj May 30, 2026
7e588a0
Merge branch 'main' into feature/theme
hqwlkj May 30, 2026
ad855d9
feat(cli): 添加主题更换命令
hqwlkj May 30, 2026
34acff4
feat(ui): 完善重启和主题切换功能及界面元素样式调整
hqwlkj Jun 1, 2026
c7b2a49
refactor(theme): 统一主题颜色与样式实现
hqwlkj Jun 1, 2026
d023ba6
feat(theme): 改进主题管理并增强终端背景适配
hqwlkj Jun 2, 2026
368a00a
Merge branch 'main' into feature/theme
hqwlkj Jun 2, 2026
bc475e1
test(theme): 为系统主题检测相关函数添加详细单元测试
hqwlkj Jun 2, 2026
a52d684
docs(readme-en): 更新英文版文档链接以指向正确文件
hqwlkj Jun 2, 2026
a5da21f
refactor(ui): 优化主题管理和界面相关代码
hqwlkj Jun 2, 2026
cf3ff3a
refactor(ui): 优化主界面抖动的问题
hqwlkj Jun 2, 2026
0e986d7
Merge branch 'main' into feature/theme
hqwlkj Jun 2, 2026
e4c3584
refactor(ui): 优化 PromptInput 组件中 showFooterText 的计算逻辑
hqwlkj Jun 2, 2026
98dc76e
refactor(ui): 优化 ThemeableStatic 组件及 ThemeManager 初始化逻辑
hqwlkj Jun 3, 2026
c6241ca
Merge branch 'main' into feature/theme
hqwlkj Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Create `~/.deepcode/settings.json`:

The configuration file is shared with the [Deep Code VSCode extension](https://github.com/lessweb/deepcode) — configure once, use everywhere.

For complete configuration details (multi-level priority, environment variables, etc.), see [docs/configuration.md](docs/configuration.md).
For complete configuration details (multi-level priority, environment variables, etc.), see [docs/configuration_en.md](docs/configuration_en.md).

## Key Features

Expand All @@ -71,6 +71,7 @@ Deep Code CLI supports agent skills that allow you to extend the assistant's cap
| `/resume` | Choose a previous conversation to continue |
| `/continue` | Continue the active conversation or pick one to resume |
| `/model` | Switch model, thinking mode, and reasoning effort |
| `/theme` | Open theme picker with live preview |
| `/raw` | Toggle display mode (Normal / Lite / Raw scrollback) |
| `/init` | Initialize an AGENTS.md file (LLM project instructions) |
| `/skills` | List available skills |
Expand Down Expand Up @@ -102,13 +103,31 @@ Yes. Deep Code offers a full-featured VSCode extension, available on the [VSCode

Deep Code supports multimodal input — you can paste images from the clipboard with `Ctrl+V`. However, `deepseek-v4` does not support multimodal yet. Some models have multimodal capabilities but impose strict limits on multi-turn dialogue requests. For multimodal input, we recommend using the Volcano Ark `Doubao-Seed-2.0-pro` model, which has the best integration.

### How to automatically send a Slack message after a task completes?
### How to send a Slack message after a task completes?

Write a shell notification script that calls a Slack webhook, then set the `notify` field in `~/.deepcode/settings.json` to the full path of the script. For detailed steps, see [docs/notify_en.md](docs/notify_en.md).
Write a shell notification script that calls a Slack webhook, then set the `notify` field in `~/.deepcode/settings.json` to the full path of the script.

> 📖 See [docs/notify_en.md](docs/notify_en.md) for details.

### How do I enable web search?

Deep Code comes with a built-in, free Web Search tool that works well for most use cases. If you prefer to use a custom script for web search, set the `webSearchTool` field in `~/.deepcode/settings.json` to the full path of your script. For detailed steps, refer to: https://github.com/qorzj/web_search_cli
Deep Code comes with a built-in, free Web Search tool that works well for most use cases. If you prefer to use a custom script for web search, set the `webSearchTool` field in `~/.deepcode/settings.json` to the full path of your script. For details, refer to: https://github.com/qorzj/web_search_cli

### How do I configure MCP?

Deep Code supports MCP (Model Context Protocol) to connect external services such as GitHub, browsers, databases, and more. Configure the `mcpServers` field in `settings.json` to enable it, then use the `/mcp` command to view MCP server status and available tools.

> 📖 See [docs/mcp_en.md](docs/mcp.md) for details.

### How to configure notifications after a task completes?

When the AI assistant completes a task, Deep Code can automatically execute a notification script to send the results to your specified channel (e.g., Slack, system notifications, etc.).

> 📖 See [docs/notify_en.md](docs/notify_en.md) for details.

### Does Deep Code only support YOLO mode?

No. Deep Code has a built-in fine-grained permission control mechanism that lets you confirm operations before the AI assistant executes shell commands, reads/writes files, accesses the network, and more. You can configure each permission scope's policy — always allow, always ask, or deny — via the `permissions` field in `settings.json`. See [docs/permission_en.md](docs/permission.md) for details.

### Does it support Coding Plan?

Expand All @@ -125,21 +144,17 @@ Yes. Just set `env.BASE_URL` in `~/.deepcode/settings.json` to an OpenAI-compati
}
```

### How do I configure MCP?

Deep Code supports MCP (Model Context Protocol) to connect external services such as GitHub, browsers, databases, and more. Configure the `mcpServers` field in `settings.json` to enable it, then use the `/mcp` command to view MCP server status and available tools.

For detailed setup instructions, see: [docs/mcp.md](docs/mcp.md)
### How to use and customize themes?

### How to configure Deep Code to send notifications after a task completes?
Deep Code CLI includes 8 built-in preset themes, supports the `/theme` command for live preview and switching, and allows full customization via `settings.json`.

When the AI assistant completes a task, Deep Code can automatically execute a notification script to send the task results to the specified channel (e.g., Slack, system notifications, etc.).
**Quick switch:** Run `/theme` to open the picker. Browse with arrow keys, confirm with Enter, cancel with Esc.

For detailed configuration instructions, see: [docs/notify_en.md](docs/notify_en.md)
**Available presets:** `light` (default), `dark`, `github-light`, `github-dark`, `monokai`, `dracula`, `ansi-light`, `ansi-dark`.

### Does Deep Code only support YOLO mode?
**Custom themes:** Supports simplified color palette (`colors`), partial overrides (`overrides`), and full customization (`tokens`).

No. Deep Code has a built-in fine-grained permission control mechanism that lets you confirm operations before the AI assistant executes shell commands, reads/writes files, accesses the network, and more. You can configure each permission scope's policy — always allow, always ask, or deny — via the `permissions` field in `settings.json`. See [docs/permission.md](docs/permission.md) for details.
> 📖 See [docs/configuration_en.md](docs/configuration_en.md) for the full configuration guide.

## Contributing

Expand Down
21 changes: 18 additions & 3 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Deep Code CLI 支持 agent skills,允许您扩展助手的能力:
| `/resume` | 选择历史对话继续 |
| `/continue` | 继续当前对话,或选择历史对话恢复 |
| `/model` | 切换模型、思考模式和推理强度 |
| `/theme` | 打开主题选择器,实时预览并切换主题 |
| `/raw` | 切换显示模式(Normal / Lite / Raw 滚动回溯) |
| `/init` | 初始化 AGENTS.md 文件 |
| `/skills` | 列出可用 skills |
Expand Down Expand Up @@ -104,7 +105,9 @@ Deep Code 支持多模态,可使用ctrl+v从剪贴板粘贴图片。但目前

### 怎样在任务完成后自动给 Slack 发消息?

编写一个调用 Slack webhook 的 Shell 通知脚本,然后在 `~/.deepcode/settings.json` 中将 `notify` 字段设为该脚本的完整路径即可。详细步骤请参考 [docs/notify.md](docs/notify.md)。
编写一个调用 Slack webhook 的 Shell 通知脚本,然后在 `~/.deepcode/settings.json` 中将 `notify` 字段设为该脚本的完整路径即可。

> 📖 详细配置指南 [docs/notify.md](docs/notify.md)。

### 怎样启用联网搜索功能?

Expand All @@ -114,13 +117,13 @@ Deep Code自带免费的、且大部分情况够用的Web Search工具。如果

Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览器、数据库等外部服务。在 `settings.json` 中配置 `mcpServers` 字段即可启用,启动后使用 `/mcp` 命令查看已配置的 MCP 服务器状态和可用工具。

详细配置指南:[docs/mcp.md](docs/mcp.md)
> 📖 详细配置指南:[docs/mcp.md](docs/mcp.md)

### 如何配置 Deep Code 任务完成后发送通知?

当 AI 助手完成一轮任务后,Deep Code 可以自动执行一个通知脚本,将任务结果发送到你指定的渠道(如 Slack、系统通知等)。

详细配置指南:[docs/notify.md](docs/notify.md)
> 📖 详细配置指南:[docs/notify.md](docs/notify.md)

### Deep Code 只支持 YOLO 模式吗?

Expand All @@ -141,6 +144,18 @@ Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览
}
```

### 如何使用和自定义主题?

Deep Code CLI 内置 8 套预设主题,支持 `/theme` 命令实时预览切换,也支持通过 `settings.json` 自定义配色。

**快速切换主题:** 运行 `/theme` 打开选择器,方向键浏览,Enter 确认,Esc 取消。

**可用预设:** `light`(默认)、`dark`、`github-light`、`github-dark`、`monokai`、`dracula`、`ansi-light`、`ansi-dark`。

**自定义主题:** 支持简化色板(`colors`)、部分覆盖(`overrides`)、完全自定义(`tokens`)三种方式。

> 📖 详细配置指南见 [docs/configuration.md](docs/configuration.md)。

## 贡献

欢迎贡献代码!以下是参与方式:
Expand Down
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Deep Code CLI 支持 agent skills,允许您扩展助手的能力:
| `/resume` | 选择历史对话继续 |
| `/continue` | 继续当前对话,或选择历史对话恢复 |
| `/model` | 切换模型、思考模式和推理强度 |
| `/theme` | 打开主题选择器,实时预览并切换主题 |
| `/raw` | 切换显示模式(Normal / Lite / Raw 滚动回溯) |
| `/init` | 初始化 AGENTS.md 文件 |
| `/skills` | 列出可用 skills |
Expand Down Expand Up @@ -104,7 +105,9 @@ Deep Code 支持多模态,可使用ctrl+v从剪贴板粘贴图片。但目前

### 怎样在任务完成后自动给 Slack 发消息?

编写一个调用 Slack webhook 的 Shell 通知脚本,然后在 `~/.deepcode/settings.json` 中将 `notify` 字段设为该脚本的完整路径即可。详细步骤请参考 [docs/notify.md](docs/notify.md)。
编写一个调用 Slack webhook 的 Shell 通知脚本,然后在 `~/.deepcode/settings.json` 中将 `notify` 字段设为该脚本的完整路径即可。

> 📖 详细配置指南 [docs/notify.md](docs/notify.md)。

### 怎样启用联网搜索功能?

Expand All @@ -114,13 +117,13 @@ Deep Code自带免费的、且大部分情况够用的Web Search工具。如果

Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览器、数据库等外部服务。在 `settings.json` 中配置 `mcpServers` 字段即可启用,启动后使用 `/mcp` 命令查看已配置的 MCP 服务器状态和可用工具。

详细配置指南:[docs/mcp.md](docs/mcp.md)
> 📖 详细配置指南:[docs/mcp.md](docs/mcp.md)

### 如何配置 Deep Code 任务完成后发送通知?

当 AI 助手完成一轮任务后,Deep Code 可以自动执行一个通知脚本,将任务结果发送到你指定的渠道(如 Slack、系统通知等)。

详细配置指南:[docs/notify.md](docs/notify.md)
> 📖 详细配置指南:[docs/notify.md](docs/notify.md)

### Deep Code 只支持 YOLO 模式吗?

Expand All @@ -141,6 +144,18 @@ Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览
}
```

### 如何使用和自定义主题?

Deep Code CLI 内置 8 套预设主题,支持 `/theme` 命令实时预览切换,也支持通过 `settings.json` 自定义配色。

**快速切换主题:** 运行 `/theme` 打开选择器,方向键浏览,Enter 确认,Esc 取消。

**可用预设:** `light`(默认)、`dark`、`github-light`、`github-dark`、`monokai`、`dracula`、`ansi-light`、`ansi-dark`。

**自定义主题:** 支持简化色板(`colors`)、部分覆盖(`overrides`)、完全自定义(`tokens`)三种方式。

> 📖 详细配置指南见 [docs/configuration.md](docs/configuration.md)。

## 贡献

欢迎贡献代码!以下是参与方式:
Expand Down
94 changes: 94 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,100 @@ MCP(Model Context Protocol)服务器配置。值是键值对,键为服务
详细 MCP 使用说明请参考 [mcp.md](mcp.md)。


#### `theme` — 主题配置

Deep Code 支持自定义主题颜色,让你的终端界面更符合个人喜好。

**使用预设主题**

```json
{
"theme": {
"preset": "dark"
}
}
```

可用的预设主题:

| 预设名称 | 说明 |
| --------------- | ------------------------------ |
| `light` | 浅色主题(默认,浅色背景优化) |
| `dark` | 暗色主题(深色背景优化) |
| `github-light` | GitHub Light 风格主题 |
| `github-dark` | GitHub Dark 风格主题 |
| `monokai` | Monokai 风格主题 |
| `dracula` | Dracula 风格主题 |
| `ansi-light` | ANSI 浅色主题(标准 16 色) |
| `ansi-dark` | ANSI 暗色主题(标准 16 色) |

**自定义主题颜色**

推荐使用 `colors` 简化色板配置,只需定义 16 个基础色,系统自动推导完整主题:

```json
{
"theme": {
"preset": "custom",
"colors": {
"Background": "#ffffff",
"Foreground": "#1F2328",
"Gray": "#8b949e",
"LightBlue": "#0969da",
"AccentBlue": "#ff6600",
"AccentPurple": "#8250df",
"AccentCyan": "#0550ae",
"AccentGreen": "#1a7f37",
"AccentYellow": "#fa8c16",
"AccentRed": "#d1242f",
"AccentYellowDim": "#9a6700",
"AccentRedDim": "#a40e26",
"DiffAdded": "#dafbe1",
"DiffRemoved": "#ffebe9",
"Comment": "#6e7781"
}
}
}
```

也可在 `colors` 基础上用 `overrides` 微调个别 token:

```json
{
"theme": {
"preset": "custom",
"colors": { "Background": "#1a1a2e", "Foreground": "#e0e0e0", "..." : "..." },
"overrides": {
"agent": { "streaming": "#ffcc00" }
}
}
}
```

高级用法:通过 `base` 基于其他预设,用 `overrides` 微调:

```json
{
"theme": {
"preset": "custom",
"base": "dark",
"overrides": {
"brand": { "primary": "#ff6600" }
}
}
}
```

**运行时切换主题**

在 CLI 中使用 `/theme` 命令打开主题选择器,使用方向键浏览主题,按 Space 或 Enter 确认选择:

```
/theme # 打开主题选择器
```

在选择器中浏览过程中会实时预览主题效果,按 Esc 可取消并恢复原主题。确认后会自动保存到 `settings.json`,并立即生效。

#### `debugLogEnabled` — 调试日志

设为 `true` 可让程序输出详细的调试日志(默认 `false`),用于排查 API 调用和工具执行的问题。
Expand Down
94 changes: 94 additions & 0 deletions docs/configuration_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,100 @@ Configuration for MCP (Model Context Protocol) servers. The value is a key-value

For detailed MCP usage instructions, refer to [mcp.md](mcp.md).

#### `theme` — Theme Configuration

Deep Code supports customizing theme colors to make your terminal interface match your personal preferences.

**Using Preset Themes**

```json
{
"theme": {
"preset": "dark"
}
}
```

Available preset themes:

| Preset Name | Description |
| --------------- | ---------------------------------------- |
| `light` | Light theme (default, optimized for light backgrounds) |
| `dark` | Dark theme (optimized for dark backgrounds) |
| `github-light` | GitHub Light style theme |
| `github-dark` | GitHub Dark style theme |
| `monokai` | Monokai-style theme |
| `dracula` | Dracula-style theme |
| `ansi-light` | ANSI light theme (standard 16 colors) |
| `ansi-dark` | ANSI dark theme (standard 16 colors) |

**Custom Theme Colors**

The recommended way is to use `colors` — a simplified palette of 16 base colors. The system automatically derives the full theme:

```json
{
"theme": {
"preset": "custom",
"colors": {
"Background": "#ffffff",
"Foreground": "#1F2328",
"Gray": "#8b949e",
"LightBlue": "#0969da",
"AccentBlue": "#ff6600",
"AccentPurple": "#8250df",
"AccentCyan": "#0550ae",
"AccentGreen": "#1a7f37",
"AccentYellow": "#fa8c16",
"AccentRed": "#d1242f",
"AccentYellowDim": "#9a6700",
"AccentRedDim": "#a40e26",
"DiffAdded": "#dafbe1",
"DiffRemoved": "#ffebe9",
"Comment": "#6e7781"
}
}
}
```

You can also combine `colors` with `overrides` to fine-tune specific tokens:

```json
{
"theme": {
"preset": "custom",
"colors": { "Background": "#1a1a2e", "Foreground": "#e0e0e0", "..." : "..." },
"overrides": {
"agent": { "streaming": "#ffcc00" }
}
}
}
```

Advanced: use `base` to inherit from another preset, with `overrides` to tweak:

```json
{
"theme": {
"preset": "custom",
"base": "dark",
"overrides": {
"brand": { "primary": "#ff6600" }
}
}
}
```

**Runtime Theme Switching**

In the CLI, use the `/theme` command to open the theme picker. Browse with arrow keys, confirm with Space or Enter:

```
/theme # Open theme picker
```

As you browse in the picker, the theme is previewed in real-time. Press Esc to cancel and revert to the original theme. Once confirmed, the selection is automatically saved to `settings.json` and takes effect immediately.

#### `debugLogEnabled` — Debug Log

Set to `true` to enable detailed debug logging (default `false`), useful for troubleshooting API calls and tool execution.
Expand Down
Loading
Loading