Body, Mind & Soul — API Reference
    Preparing search index...

    Function claimPromptFocus

    • Explicitly claim the focused-prompt slot for a canvas-interactive picker. Call this just before beginning canvas placement so ambient background prompts (e.g. the choices pane) don't hold focus and block isFocused() checks.

      Only claims focus when doing so doesn't steal it from a different action's in-flight prompt. _renderLocalTracked/handlePromptRequest only auto-focus a newly-created prompt when nothing else is focused yet — that's the backlog gate that lets multiple concurrently-resolving actions' prompts queue up one at a time instead of overlapping. Because target-picker/template placement always mint a fresh requestId (distinct from the choices pane's), an unconditional claim here would bypass that gate: whichever action's interactive picker happens to reach this call last would always win focus, hijacking it away from an unrelated action's prompt the user is still working through (see .claude/contexts/triggers.md's focus-stack notes). Handing off focus within one action's own prompt sequence (ambient pane → its own interactive picker) is still allowed since that's a legitimate, same-action transition — gated by matching actionId, when known.

      Parameters

      • requestId: string
      • OptionalactionId: string | null = null

        The combat tracker action id this prompt belongs to, when known — see promptFor's actionId param. When omitted, falls back to the unconditional claim (preserves behavior for call sites that don't have an actionId to thread through, e.g. non-action prompts).

      Returns void