Skip to content

[BUG] AI prompt templates prompt without run context: MacroChoiceEngine skips setPromptRunContext #1621

Description

@chhoumann

Describe the bug

MacroChoiceEngine.ts:651-655 builds the AI command's formatter without calling setPromptRunContext. So a {{VALUE}} / {{VALUE:name}} inside an AI prompt template prompts with the generic modal title and a shared draft scope, instead of the run-time context (#1546, PR #1555) every other prompt surface now gets.

Repro

Macro -> AI Assistant command -> prompt template containing {{VALUE:topic}} -> run the macro: the prompt modal appears without the "what is being asked / where it goes" context line, and its draft key collides with the generic scope.

Expected

The AI path constructs its formatter with the same PromptScope context as Template/Capture runs, so prompts inside AI templates are labelled and draft-isolated identically.

Found during the #1571/#1572 triage investigation - a live #1546 gap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions