Commit b94b589
fix(plugin: prompt-export): flow metadata to the toPrompt() export
afterClone received one ctx object and stashed metadata on it, but
snapdom's export pipeline creates a fresh ctx object for export hooks
(spread from the shared options context). The metadata never reached the
prompt() call, so toPrompt() always returned { elements: [], prompt: '' }
regardless of what was on the page.
Write the metadata onto ctx.options (the shared reference) in addition
to ctx itself, so the export ctx — which is spread from options — sees
it. Keeps the ctx.__promptMetadata assignment for standalone tests that
pass a minimal context.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 311c9e4 commit b94b589
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
| 51 | + | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| |||
0 commit comments