Skip to content

Plugin API to open persistent terminals in the native panel #1132

Description

@orangy

Plugins can create persistent bb.sdk.terminals sessions, but cannot open/focus them in BB’s native terminal UI. useBbNavigate() only supports plugin panels.

Proposal:

await useBbNavigate().experimental_openThreadTerminal({
  terminalId,
  closeBehavior: "detach",
});

This should validate that the terminal belongs to the current thread, select it in the native right-panel terminal UI, and reveal the panel.

With closeBehavior: "detach", closing the terminal tab must only remove/hide the tab; it must not terminate the terminal process. The plugin can then reopen the same terminal later, while its own explicit Stop action remains responsible for terminating it.

This avoids plugins depending on BB’s private local-storage state and network interception to emulate native terminal focus/close behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions