Files
CherryHQ-cherry-studio/packages/ui/icons/general/github-copilot-cli.svg
jd 92ebb8b1c6 refactor(code): redesign Code Tools page with tool grid and drawer UI (#14315)
### What this PR does

Before this PR:

- Code Tools page rendered all CLI tools in a single static form,
without icon branding, search, or empty-state handling.
- There was no reusable empty-state / side-panel / icon-select primitive
in `@cherrystudio/ui`.

After this PR:

- Code Tools page is redesigned as a searchable tool grid (`ToolGrid`)
that opens a per-tool configuration drawer (`CodeToolDrawer`); each CLI
shows its own icon via `CliIconBadge`.
- Adds new `@cherrystudio/ui` composites: `EmptyState`, `PageSidePanel`,
`SelectDropdown`.
- Adds brand SVG icons for Claude Code, Qwen Code, Gemini CLI, OpenAI
Codex, iFlow CLI, GitHub Copilot CLI, Kimi CLI, OpenCode.
- Adds i18n strings for search, empty states, field hints, and the
"Official" tag across all locales.

Fixes #

### Why we need it and why it was done in this way

The following tradeoffs were made:

- A grid + drawer layout scales better as more CLI tools are added and
gives each tool a clear identity, at the cost of one extra click to
reach configuration.
- Shared primitives (`EmptyState`, `PageSidePanel`, `SelectDropdown`)
were lifted into `@cherrystudio/ui` so other v2 pages can reuse them,
rather than living locally inside the Code Tools page.

The following alternatives were considered:

- Keeping the single-form layout and only adding icons — rejected
because it does not solve discoverability or empty-state UX.
- Placing the new composites under the Code Tools page only — rejected
to avoid duplication in upcoming v2 pages.

Links to places where the discussion took place:

N/A

### Breaking changes

None.

### Special notes for your reviewer

- This PR only touches the v2 Code Tools page and adds new
`@cherrystudio/ui` composites; no existing components are modified
behaviorally.
- Translated locale files are mechanical additions of the new keys;
please spot-check `en-us.json` / `zh-cn.json` for wording.

### Checklist

- [x] PR: The PR description is expressive enough and will help future
contributors
- [x] Code: Write code that humans can understand and Keep it simple
- [x] Refactor: You have left the code cleaner than you found it (Boy
Scout Rule)
- [x] Upgrade: Impact of this change on upgrade flows was considered and
addressed if required
- [x] Documentation: A user-guide update was considered and is present
(link) or not required.
- [x] Self-review: I have reviewed my own code before requesting review
from others

### Release note

```release-note
Redesign the Code Tools page with a searchable tool grid and per-tool configuration drawer, with brand icons for each supported CLI.
```

---------

Signed-off-by: jdzhang <625013594@qq.com>
Signed-off-by: zhangjiadi225 <625013594@qq.com>
Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: MyPrototypeWhat <daoquqiexing@gmail.com>
2026-04-21 11:39:15 +08:00

9 lines
3.3 KiB
XML

<svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M85.9613 36.221C90.6984 41.0943 92.6872 47.745 93.5221 57.0652C95.7509 57.0652 97.8221 57.549 99.2267 59.4088L101.843 62.8631C102.595 63.8592 103 65.0489 103 66.2852V75.6735C103 76.8883 102.38 78.0708 101.377 78.7838C89.5231 87.2405 74.8959 94.0417 60 94.0417C43.5167 94.0417 27.0154 84.7859 18.6232 78.7838C17.6199 78.0672 17.0036 76.8847 17 75.6735V66.2852C17 65.0489 17.4049 63.8521 18.1503 62.8595L20.7661 59.4088C22.1707 57.5562 24.2562 57.0652 26.4743 57.0652L26.5783 56.001C27.4741 47.2362 29.4808 40.9044 34.0388 36.221C42.8573 27.1193 54.4996 26.0049 59.6452 25.9583H60.3547C65.5004 26.0049 77.1427 27.1157 85.9613 36.221ZM60.0036 51.7297C58.9859 51.7297 57.807 51.787 56.5564 51.9088C56.1157 53.5106 55.4635 54.9547 54.5139 55.8792C50.7514 59.5449 46.2149 60.1075 43.7854 60.1075C41.4992 60.1075 39.1056 59.6417 37.1527 58.4448C35.3037 59.0361 33.5263 59.8889 33.4117 62.0138C33.261 65.4566 33.1857 68.9022 33.1859 72.3482L33.1787 74.0682C33.1716 76.0856 33.1608 78.103 33.1322 80.124C33.1393 81.2922 33.8632 82.3815 34.9597 82.8653C43.8535 86.8141 52.2672 88.8028 60.0072 88.8028C67.7328 88.8028 76.1465 86.8141 85.0367 82.8653C85.5716 82.63 86.028 82.2464 86.3518 81.76C86.6757 81.2736 86.8535 80.7047 86.8642 80.1204C86.9717 74.0932 86.8857 68.0374 86.5919 62.0138C86.4808 59.8782 84.6999 59.0397 82.8437 58.4448C80.8872 59.6381 78.5007 60.1075 76.2146 60.1075C73.7887 60.1075 69.2557 59.5449 65.4897 55.8792C64.5365 54.9547 63.8879 53.5106 63.4472 51.9088C62.3005 51.7942 61.1503 51.7333 60.0036 51.7297ZM50.9557 66.1096C52.8871 66.1096 54.453 67.6361 54.453 69.5137V75.7953C54.453 77.6766 52.8871 79.1995 50.9557 79.1995C50.0407 79.211 49.1586 78.859 48.5029 78.2208C47.8472 77.5825 47.4715 76.7103 47.4583 75.7953V69.5173C47.4583 67.6361 49.0242 66.1096 50.9557 66.1096ZM68.8723 66.1096C70.8037 66.1096 72.3697 67.6361 72.3697 69.5137V75.7953C72.3697 77.6766 70.8037 79.1995 68.8723 79.1995C67.9574 79.211 67.0753 78.859 66.4196 78.2208C65.7639 77.5825 65.3882 76.7103 65.375 75.7953V69.5173C65.375 67.6361 66.9409 66.1096 68.8723 66.1096ZM44.3588 35.2284C40.5963 35.5939 37.425 36.7979 35.8125 38.4749C32.3187 42.1908 33.0712 51.6186 35.06 53.6109C36.5112 55.0228 39.2525 55.9652 42.2087 55.9652H42.5312C44.8568 55.9186 48.9275 55.3345 52.3137 51.9877C53.8725 50.5185 54.84 46.8527 54.7325 43.1368C54.625 40.1483 53.765 37.6902 52.475 36.6402C51.0775 35.4362 47.9063 34.9131 44.3588 35.2284ZM67.525 36.6402C66.235 37.6866 65.375 40.1519 65.2675 43.1368C65.16 46.8527 66.1275 50.5185 67.6863 51.9877C71.1549 55.4169 75.3402 55.9437 77.6336 55.9652H77.7912C80.7475 55.9652 83.4887 55.0228 84.94 53.6109C86.9287 51.6186 87.6812 42.1908 84.1875 38.4749C82.575 36.7979 79.4037 35.5939 75.6412 35.2284C72.0937 34.9131 68.9225 35.4362 67.525 36.6402ZM60 44.2871C59.14 44.2871 58.1187 44.3408 56.99 44.4447C57.0975 45.0181 57.1513 45.6488 57.205 46.3296L57.2014 46.8993C57.1974 47.1985 57.1807 47.4974 57.1512 47.7952C57.9575 47.7163 58.6742 47.6984 59.3443 47.6948H60.6557C61.3258 47.6948 62.0425 47.7163 62.8487 47.7952C62.795 47.272 62.795 46.8026 62.795 46.3296C62.8487 45.6488 62.9025 45.0217 63.01 44.4447C62.0096 44.3468 61.0052 44.2942 60 44.2871Z"
fill="black"
/>
</svg>