三项标签元数据功能补齐旧壳能力边界: • **F2 重命名**:侧栏行内编辑,Enter 提交 / Esc 取消 / 失焦提交。 空串 = 恢复自动标签名(取 cwd 末段或文件名)。custom_name 与 session v4 同字段,导出/恢复直通不需转换层。 • **标签颜色**:右键菜单尾部色板(首槽 A = 无色 + 7 枚品牌色,同色 再点取消,当前色带选中环)。左侧栏行首画一条竖光条(4px 内缩、 上下各留 7px、宽 2.5px + 圆角),默认标签不占视觉层级。旧壳 context_menu::TAB_COLORS 原地复用(已设色的 tab 可迁移过来)。 • **导出单标签为工作区**:文件名取标签名,扩展名 .nebula-workspace.json, 落盘走共享 v4 schema。只导出可恢复的终端标签(图片/文档/设置页 从不进 session)。 **结构性约束**:tabs 与 tab_meta 必须同下标(长度一致),所有增删移 操作封口到 insert_tab_at / remove_tab_at / move_tab 三个 helper, 避免本地分叉时色条和名字错位到邻居身上。恢复期保留文件里的既有次序, 不套「新标签插入位置」策略;快照时从 meta 拿 custom_name/color。 右键菜单新增「导出为工作区…」「重命名」条目,action 字段只用来渲染 键帽(handler 存在时组件不会 dispatch 它),命令仍然作用在被右键的 那个 tab 上,而不是活动标签。菜单结构、分隔符与键帽对齐旧壳 display::context_menu 的 Tab 目标。 依赖 gpui-component 1b737db8(popover_shadow helper + Theme::shadow 门控),已推送 Kuddev/gpui-component nebula 分支并更新 Cargo.toml。
105 lines
5.3 KiB
TOML
105 lines
5.3 KiB
TOML
[workspace]
|
||
members = [
|
||
"nebula_app",
|
||
"nebula_terminal",
|
||
"nebula_config",
|
||
"nebula_config_derive",
|
||
"nebula-completions",
|
||
"nebula_hook",
|
||
"nebula_gpui",
|
||
"nebula_settings",
|
||
"nebula_split",
|
||
]
|
||
resolver = "2"
|
||
|
||
[workspace.package]
|
||
edition = "2024"
|
||
rust-version = "1.85.0"
|
||
|
||
[profile.release]
|
||
lto = "thin"
|
||
debug = 0
|
||
strip = "debuginfo"
|
||
incremental = false
|
||
|
||
# Debug 壳仍要承担真实终端负载:GPUI 布局/字体塑形和 VT 解析若以
|
||
# opt-level 0 运行,窗口拖拽与持续输入都会出现发布版没有的延迟。
|
||
# 外部依赖统一 O2(Zed 同款策略:图形栈/图像解码/Unicode 处理散布在
|
||
# 几十个 crate 里,逐个点名永远漏),少数塑形/布局热点保持 O3;
|
||
# workspace 成员不受 "*" 影响,主 crate 继续增量 debug。
|
||
[profile.dev]
|
||
codegen-units = 16
|
||
debug = "limited"
|
||
split-debuginfo = "unpacked"
|
||
|
||
[profile.dev.package]
|
||
"*" = { opt-level = 2 }
|
||
resvg = { opt-level = 3 }
|
||
rustybuzz = { opt-level = 3 }
|
||
taffy = { opt-level = 3 }
|
||
ttf-parser = { opt-level = 3 }
|
||
smol = { opt-level = 3 }
|
||
gpui = { opt-level = 3 }
|
||
gpui_macros = { opt-level = 3 }
|
||
nebula_terminal = { opt-level = 3 }
|
||
|
||
[workspace.dependencies]
|
||
mlua = { version = "0.11.4", features = ["lua54", "vendored", "serialize", "send"] }
|
||
serde_path_to_error = "0.1.20"
|
||
toml = "0.9.11"
|
||
toml_edit = "0.24.0"
|
||
|
||
# TODO: Drop this pin and return to the crates.io release once the fix ships there.
|
||
[patch.crates-io]
|
||
x11-clipboard = { git = "https://github.com/quininer/x11-clipboard.git", rev = "19ab2163cf0bd0db607e827a5214571990307866" }
|
||
# Keep the 0.30.13 API/rwh_06 surface while backporting winit upstream
|
||
# 488c036a's Windows 11 mixed-DPI positioning fix. The upstream revision has
|
||
# since moved to a different EventLoop API and cannot be used directly here.
|
||
winit = { path = "third_party/winit-0.30.13" }
|
||
|
||
# ---- gpui / gpui-component fork(C 路线,nebula_gpui)----------------------
|
||
#
|
||
# 版本配对(发布线):gpui-component 0.5.1(含 -assets / -macros)编译在
|
||
# crates.io 的 gpui 0.2.2 上——longbridge 仓库 v0.5.1 的 workspace 依赖就是
|
||
# `gpui = "0.2.2"`,不是 zed git。nebula_gpui/Cargo.toml 用 "=0.2.2" /
|
||
# "=0.5.1" 精确 pin;[patch] 要求版本匹配,fork 上的版本号保持不动。
|
||
#
|
||
# 下面两个 fork 的 `nebula` 分支基于 crates.io 发布基点(读自 registry 包内
|
||
# 的 .cargo_vcs_info.json,包名/版本已在基点 rev 上核对过),当前补丁栈为空,
|
||
# 构建产物应与 crates.io 版本一致:
|
||
# Kuddev/zed nebula @ 69e2130295c2649963eb639fc70b4f2ee8ea1624
|
||
# (= zed-industries/zed 发布 gpui 0.2.2 的 rev,
|
||
# crates/gpui;上游发布时 dirty=true,若首次编译出现
|
||
# 与 registry src 的差异以 diff 为准补一个对齐 commit)
|
||
# Kuddev/gpui-component nebula @ 1b737db8f172d4d4fe1113fbde4d8bb09a4c6afe
|
||
# (基点 0f0ab352 = longbridge/gpui-component v0.5.1,
|
||
# crates/ui;上级目录 gpui-component-v0.5.1/ 有源码
|
||
# 检出可对照)
|
||
# 补丁栈:
|
||
# 1b737db8 popover 阴影:Tailwind shadow-lg(0 10 15
|
||
# -3 + 0 4 6 -4,两层 10% 黑)在半透明/亚克力窗口下
|
||
# 没有不透明底稀释,读起来是"菜单下垫了一块黑板"。
|
||
# 换成单层短偏移 + 负扩散,并尊重 Theme::shadow
|
||
# (button/input/slider 本来就这么门控)。无 upstream
|
||
# PR:数值是对着半透明宿主窗口调的。
|
||
#
|
||
# 加补丁 = 提交到 fork 的 nebula 分支 → push → 更新下面的 rev(永远 pin
|
||
# exact rev、不 pin branch)。每个补丁注明原因 + upstream PR 链接,上游合并
|
||
# 即撤;升级配对版本 = rebase nebula 分支到新发布基点(参照 ../tty7 的
|
||
# Cargo.toml 注释风格与守护测试做法)。gpui 的仓内兄弟 crate(gpui_macros、
|
||
# sum_tree、zed-reqwest 等)经 git 仓库内 path 依赖自动解析,无需逐个 patch。
|
||
#
|
||
# 升级基点到 gpui-component 0.5.2+ 时的回归检查单(2026-08-13 对照
|
||
# l0ng-ai/gpui-component 的 tty7 分支得出;0.5.1 上这些行为本来是对的,
|
||
# 是 0.5.2 重构 button 颜色推导时弄丢的,届时把 tty7 的两个 fix 带上):
|
||
# 1. ButtonVariant::Custom 的 text_color 必须回 colors.foreground(0.5.2
|
||
# 回归成背景色 colors.color,透明底按钮字直接隐形)→ tty7 3826fafacd3c
|
||
# 2. hovered()/active() 必须读 ButtonCustomVariant::hover/active(0.5.2
|
||
# 回归成从 color 派生,透明底按钮没有任何悬停/按下反馈)→ 469ab7a44f72
|
||
# 3. 新增的 text/inline_flow.rs:shape_line 前把 \n\r 换成空格(gpui
|
||
# shaper 遇换行 panic;替换保 byte 长度,run 偏移不失效)
|
||
# 本地 fork 工作拷贝在 ../gpui-component-fork(已挂 tty7 remote 可 diff)。
|
||
gpui = { git = "https://github.com/Kuddev/zed", rev = "69e2130295c2649963eb639fc70b4f2ee8ea1624" }
|
||
gpui-component = { git = "https://github.com/Kuddev/gpui-component", rev = "1b737db8f172d4d4fe1113fbde4d8bb09a4c6afe" }
|
||
gpui-component-assets = { git = "https://github.com/Kuddev/gpui-component", rev = "1b737db8f172d4d4fe1113fbde4d8bb09a4c6afe" }
|