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.
Plugins can create persistent
bb.sdk.terminalssessions, but cannot open/focus them in BB’s native terminal UI.useBbNavigate()only supports plugin panels.Proposal:
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.