Skip to content

toCompose / NewThreadComposer: seed the draft with mention parts, not only serialized thread/project/section tokens #8014

Description

@wojteklembryk

The workflow

I maintain a local plugin that opens bb's new-thread composer for Obsidian vault projects (one bb project per vault). "Ask about this note" should open New thread with the note already attached as a pill, the same pill the user gets by typing @ and picking the file (a path mention) or one of the plugin's own mention items.

Observed on bb 0.49.0 (plugin SDK 0.6.132). Code links below are at 796cdcc (main, desktop 0.50.1), checked by reading the source.

What happens today

  • toCompose({ initialPrompt }) and NewThreadComposer's initialPrompt are strings. Only serialized @thread:, @project: and @section: tokens become pills (app-contract.ts:5287-5294, app-contract.ts:5573-5587); the parser matches only those three prefixes (ThreadTitleMentions.tsx:720-740).
  • path, attachment and plugin mentions have no serialized form a seed can carry, so the file goes into the prompt as plain text.
  • Once a composer is mounted, useComposer().insert() accepts ComposerInsertPart[], which includes every mention kind and the plugin's own { provider, id, label } mentions (app-contract.ts:4565-4611). Only the hand-off path lacks it.

What you would expect

A structured seed with the same "only while the draft is empty" semantics, for example:

  • toCompose({ initialPrompt: ComposerInsertPart[] }) (string still accepted), and
  • the same for NewThreadComposer's initialPrompt.

A plugin mention would resolve through its provider at send time, as it does when inserted by hand.

Context and alternatives

Checks

  • I searched open and closed issues for the same request.
  • If an agent wrote this, the body ends with > AGENT GENERATED.

AGENT GENERATED

Activity

  1. added
    plugins
    ui
    on Nov 22, 2026
  2. bb-slop-cop commented on Nov 22, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied classification:

    • Type: Feature
    • Priority: Medium — improves plugin hand-offs; plain-text and mounted-composer workarounds exist.
    • Effort: Medium — requires coordinated SDK contract and composer initialization changes.
    • Labels: plugins, ui

    All classifications were missing; no existing values were replaced. Final Type verified as Feature: this adds structured draft seeding rather than repairing supported behavior. Bug reproduction/report and automated fix steps were skipped; no pull request was opened because this requires a public API enhancement.

  3. added a commit that references this issue on Nov 23, 2026
    d40d927
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