diff --git a/docs/external-plugin-guide.md b/docs/external-plugin-guide.md index f218c388..9ce4f77c 100644 --- a/docs/external-plugin-guide.md +++ b/docs/external-plugin-guide.md @@ -250,9 +250,8 @@ interface TabDescriptor { /** * tab 栏右侧操作区(v0.25.0+):tab 激活时,返回的 ReactNode 渲染在 tab 栏 * 右端(+ 按钮右侧、面板关闭按钮左侧,右对齐)。让 tab 把自己的工具栏 - * (如终端 tab 的新建 / 拆分 / 重启)直接放进 tab 栏,而不是在内容区顶部 - * 再单独渲染一行头部。返回 null/undefined 不渲染;抛错被吞掉(不渲染操作)。 - * 每次活跃 tab 渲染都会调用——保持廉价。 + * 直接放进 tab 栏,而不是在内容区顶部再单独渲染一行头部。返回 null/undefined + * 不渲染;抛错被吞掉(不渲染操作)。每次活跃 tab 渲染都会调用——保持廉价。 */ rightActions?: (ctx: Context, scope: SessionScope, state: SidebarState) => ReactNode /** diff --git a/src/client/Sidebar.tsx b/src/client/Sidebar.tsx index 2117351b..efa67176 100644 --- a/src/client/Sidebar.tsx +++ b/src/client/Sidebar.tsx @@ -619,9 +619,9 @@ export function Sidebar(props: { ctx: Context; store: SidebarStore }) { /** * The active tab's right-aligned action area from the tab-type registry: * a descriptor that declares `rightActions` supplies its own toolbar - * (e.g. a terminal tab's new / split / restart buttons) rendered at the - * tab strip's right end. A throwing resolver is swallowed (no actions) — - * the tab strip must never break because a plugin's resolver failed. + * rendered at the tab strip's right end. A throwing resolver is swallowed + * (no actions) — the tab strip must never break because a plugin's + * resolver failed. */ const tabRightActionsOf = (tab: SidebarTab): ReactNode => { const descriptor = ctx.get('betterSidebar')?.getTab(tab.type) diff --git a/src/client/service.ts b/src/client/service.ts index dfa73d39..0b1240e7 100644 --- a/src/client/service.ts +++ b/src/client/service.ts @@ -239,9 +239,9 @@ export interface TabDescriptor { * Right-aligned action area for the tab strip (v0.25.0+). When the tab is * active, the returned ReactNode renders at the tab strip's right end * (between the + button and the panel's close control). Lets a descriptor - * (e.g. a terminal tab) put its toolbar (new / split / restart) directly - * in the strip instead of a separate header row below it. Returning - * null/undefined renders nothing; a throw is swallowed (no actions shown). + * put its toolbar directly in the strip instead of a separate header row + * below it. Returning null/undefined renders nothing; a throw is swallowed + * (no actions shown). */ rightActions?: (ctx: Context, scope: SessionScope, state: SidebarState) => ReactNode /**