Conversation
Contributor
|
Thanks @tobi for the PR. This repo needs approval before a PR. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ) and explain what you want to open a PR for and why. A maintainer then adds you to the allow list. This PR now closes on its own. Reopen it or open a new one after approval. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
PluginSidebarThreadActions.openNewThread()can select a project, reuse an environment, or select a machine, but cannot select a fresh worktree with a base branch or pass environment-provider inputs. Plugins such as Bots Sidebar therefore need an embedded composer to supply defaults that BB's native New thread screen already knows how to submit.What changed
Add
experimental_environmentusingNewThreadRequest's environment shape:The native composer waits for its catalogs, applies the seed once per navigation, and keeps all pickers editable. Existing
environmentIdtakes precedence, followed by the full environment seed, thenhostId. The action validates before changing the project or navigating; route state is validated independently. Host seeds require an explicit machine, including personal workspaces. The shared composer owns seed application. Provider inputs are scoped to the environment seed so a repeated opening cannot inherit stale branch overrides, while model-default changes preserve branch edits.Update the Plugin Guide and API audit inventory. This is a selection API, not a plugin submission callback or bot-binding mechanism. No server/daemon wire change or protocol bump;
bb.sdk.threads.spawnandbb thread spawn --project ... --machine ... --new-environment worktree --base-branch ...already support the underlying creation request.How you verified
pnpm exec turbo run typecheck --filter=@bb/app --filter=@get-bb/plugin-sdk --filter=bb-plugin-plugin-api-docspassed.plugin-sidebar-hooks,RootComposeView,PluginNewThreadComposer,new-thread-environment-seed, anduseThreadCreationOptions, run through Turbo.