docs: 注释去掉终端插件举例,保持通用接口描述
This commit is contained in:
1 parent
e556ebb378
commit
bb0c4649c8
3 files changed
+8
-9
No files matched your search
@@ -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
|
||||
/**
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user