Skip to content

Expose complete composer input to plugin customizations #1978

Closed

Description

@brsbl

The workflow

A composer customization such as Prompt Improver needs to start an invisible BB agent using everything currently present in the prompt box. When the user includes screenshot attachments, the plugin must forward those images together with the text and structured mentions so the helper agent sees the same context the user composed.

What happens today

On bb core main at 1654d0f00, the public composer API exposes the current plain text while the read-only composer view exposes only an attachment count. The host keeps the actual screenshot/file paths and structured mentions in private draft state.

A plugin can therefore preserve text-only behavior, but it cannot reconstruct or forward the complete prompt. Sending only the text silently drops screenshots and files; an attachment count is not enough to recover them.

A focused regression at the real host adapter confirmed that no structured composer-input reader existed before the proposed change.

What you would expect

Provide an additive experimental plugin API that snapshots the same structured PromptInput[] the active composer would submit at call time. It should:

  • include normalized text and structured mention ranges;
  • include independently attached screenshots and files using their host-managed paths;
  • return data detached from live draft state;
  • avoid mutating, clearing, focusing, or submitting the composer;
  • work through the official plugin frontend test harness;
  • preserve existing text-only composer behavior and compatibility.

This enables Prompt Improver and similar plugins to forward the snapshot unchanged to threads.spawn({ input }) after the core API ships.

Context and alternatives

Flattening attachments into text or querying private host state would be incomplete and brittle. A host-owned snapshot at the existing composer boundary reuses BB's current draft-to-input conversion policy and keeps attachment semantics centralized.

No SDK version or protocol change is required beyond the additive API in the existing unreleased 0.4.9 integration target on main.

Related implementation: #1977

Investigation thread: thr_bwikffmsvp

  • I searched open and closed issues for the same request.

AGENT GENERATED: by GPT-5.6-Sol

Activity

  1. added
    plugins
    on Aug 19, 2026
  2. added
    ui
    on Aug 20, 2026
  3. ymichael commented on Oct 8, 2026

    @ymichael
    Collaborator

    Fixed by #4474: plugins get the full composer input ({ text, mentions, attachments }) through useComposer().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginsui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions