feat: 接入 gpui-kit 全部 38 个官方主题预设 + 按语言拆分 locales + 0.7.3 升级

主题预设("我全都要"):
- gpui-app/themes/ 内嵌官方捆绑 21 个文件 36 变体 + Default Light/Dark
- theme.rs:register_bundled_themes(bootstrap 注册)/ apply_theme_preset
  (Theme::update + apply_config 整包应用)/ theme_preset_names
- settings.theme_preset 字段(serde 默认 linear);保存/启动按预设分派,
  外观模式与跟随系统监听仅对 Linear 生效(预设自带明暗不被冲掉)
- 设置页「主题预设」下拉(Linear + 38 注册名),切换即时生效

语言包按语言分文件(用户要求):
- locales/ui.yml → locales/en.yml + locales/zh-CN.yml
  (rust-i18n 文件名 stem 即 locale,扁平 "ns.key": "value")
- i18n.rs 测试改为双文件键集合一致性 + 占位符强制

修复:设置对话框打开即栈溢出
- gpui-kit 0.7.0→0.7.3 无法解决;根因是 Windows 主线程 8MB 栈对
  Dialog 覆盖层内 Select 渲染的深调用链不足,注册多主题后越过阈值
  (64MB 试验栈下不复现,证实深调用链而非无限递归)
- .cargo/config.toml:Windows 主线程栈 8MB→64MB
- 注册时机移到 bootstrap(main 的 init_themes,gpui_kit::init 后、
  窗口创建前),对齐官方 story 示例的注册姿势
- 误伤修复:gpui-app/Cargo.toml 被批量编辑误删 bin.name 与
  build-dependencies 段;examples/flood.rs 误删已恢复

官方 skill 同步:npx skills add 被墙,gh-proxy 镜像克隆后手动覆盖
~/.agents/skills 与 ~/.zcode/skills 的 gpui-kit + gpui-kit-design-guides。
This commit is contained in:
2026-10-12 17:07:40 +08:00
parent c2c89014d1
commit ac5b6e9862
34 changed files with 6150 additions and 608 deletions
+148
View File
@@ -0,0 +1,148 @@
{
"name": "Spaceduck",
"author": "Guillermo Rodriguez",
"url": "https://github.com/pineapplegiant/spaceduck",
"$schema": "https://github.com/longbridge/gpui-kit/raw/refs/heads/main/.theme-schema.json",
"themes": [
{
"name": "Spaceduck",
"mode": "dark",
"colors": {
"accent.background": "#212440",
"accent.foreground": "#a3a49d",
"background": "#0F111B",
"border": "#272C42",
"foreground": "#a3a49d",
"input.border": "#272C42",
"link.active.foreground": "#089CC5",
"link.foreground": "#089CC5",
"link.hover.foreground": "#089CC5",
"list.active.background": "#089CC511",
"list.active.border": "#089CC5",
"list.even.background": "#161928",
"muted.background": "#272C4255",
"muted.foreground": "#4b6479",
"panel.background": "#003a5b",
"popover.background": "#0F111B",
"popover.foreground": "#a3a49d",
"primary.background": "#089CC5",
"primary.foreground": "#ecf0c1",
"scrollbar.background": "#003a5b00",
"scrollbar.thumb.background": "#24303a",
"secondary.background": "#242547",
"secondary.active.background": "#292b51",
"secondary.foreground": "#a3a49d",
"secondary.hover.background": "#242547",
"tab.active.background": "#0F111B",
"tab.foreground": "#838182",
"title_bar.background": "#141724",
"title_bar.border": "#272C42",
"base.red": "#e33400",
"base.green": "#5ccc96",
"base.blue": "#00a3cc",
"base.cyan": "#089CC5",
"base.magenta": "#C86D8C",
"base.magenta.light": "#C86D8C33",
"base.yellow": "#b89c00"
},
"highlight": {
"editor.foreground": "#ecf0c1",
"editor.background": "#0F111B",
"editor.active_line.background": "#1c1d39",
"editor.line_number": "#4b6479",
"editor.active_line_number": "#ecf0c1",
"editor.invisible": "#4b647966",
"conflict": "#e33400",
"created": "#5ccc96",
"deleted": "#e33400",
"error": "#e33400",
"hidden": "#4b6479",
"hint": "#C86D8C",
"ignored": "#4b6479",
"info": "#089CC5",
"modified": "#f2ce00",
"predictive": "#5D5945",
"renamed": "#089CC5",
"success": "#5ccc96",
"unreachable": "#4b6479",
"warning": "#f2ce00",
"syntax": {
"attribute": {
"color": "#f2ce00"
},
"boolean": {
"color": "#f2ce00"
},
"comment": {
"color": "#4b6479",
"font_style": "italic"
},
"comment.doc": {
"color": "#4b6479",
"font_style": "italic"
},
"constant": {
"color": "#e33400"
},
"constructor": {
"color": "#5ccc96"
},
"embedded": {
"color": "#ecf0c1"
},
"function": {
"color": "#089CC5"
},
"keyword": {
"color": "#C86D8C"
},
"link_text": {
"color": "#089CC5",
"font_style": "underline"
},
"link_uri": {
"color": "#089CC5",
"font_style": "italic"
},
"number": {
"color": "#f2ce00"
},
"string": {
"color": "#5ccc96"
},
"string.escape": {
"color": "#5ccc96"
},
"string.regex": {
"color": "#5ccc96"
},
"string.special": {
"color": "#f2ce00"
},
"string.special.symbol": {
"color": "#f2ce00"
},
"tag": {
"color": "#C86D8C"
},
"text.literal": {
"color": "#ecf0c1"
},
"title": {
"color": "#f2ce00",
"font_weight": 600
},
"type": {
"color": "#089CC5"
},
"property": {
"color": "#ecf0c1"
},
"variable.special": {
"color": "#C86D8C"
}
}
}
}
]
}