From 5e1594244912fe3ffb3d759d7f7d1d69d0cc3727 Mon Sep 17 00:00:00 2001 From: HuanLinOTO Date: Fri, 11 Sep 2026 21:19:00 +0800 Subject: [PATCH] docs: scope the createTab seed-ignore rule to the bottom workbench Copilot review: the openTab JSDoc claimed createTab descriptors ignore title/path/id, but that is only the bottom-workbench landing (the factory mints the tab wholesale there). On the native right Sidebar the seed fields are forwarded as navigation params (createTab values as defaults, seed wins) and only the id is host-minted. State both landings so consumers do not drop path seeds. --- docs/external-plugin-guide.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/external-plugin-guide.md b/docs/external-plugin-guide.md index 6176b75..6537280 100644 --- a/docs/external-plugin-guide.md +++ b/docs/external-plugin-guide.md @@ -620,7 +620,11 @@ interface BetterSidebarService { /** * 打开一个 tab(+ 菜单和外部触发都用它;走 descriptor.dedupeKey 去重)。 * title 可选:给出时优先于 descriptor.title(editor 显示文件名); - * 有 createTab 的 descriptor(terminal)会忽略 title/path/id。 + * 有 createTab 的 descriptor 分落点:底部工作台(target: 'bottom')由 createTab + * 整体铸造 tab,忽略 seed 的 title/path/id(url 种子仍预填新建 tab 的 path); + * 原生右侧栏只忽略 id(原生 tab id 由宿主铸造,seed.id 仅影响 onOpen 收到的 + * 合成 tab),createTab 铸造的 title/meta 作缺省、seed 字段优先(v0.19.2+ 起 + * path 也随导航 params 下发,见下)。 * path 可选:含义跟随类型——editor(唯一认领 dsh-resource://file/** 的 * 类型)把 path 转成资源地址打开(文件落在编辑器);其余类型 path 是 * 组件种子,随导航 params 落到 tab.path(v0.19.2+;0.19.0/0.19.1 把一切