🎥 Make videos programmatically with React
Studio: Include wrapper import in agent prompt
JonnyBurger8a8186385ceb
diff --git a/packages/skills/skills/remotion-markup/SKILL.md b/packages/skills/skills/remotion-markup/SKILL.mdindex f2caa7443e..26e93f61d0 100644--- a/packages/skills/skills/remotion-markup/SKILL.md+++ b/packages/skills/skills/remotion-markup/SKILL.md@@ -78,18 +78,6 @@ style={{}}```-## Wrapping an item--For a Studio request such as `Wrap Title (src/MyComp.tsx:42) in <Sequence>`, locate the JSX element at the given source location and make that exact element the wrapper's only direct child. Preserve the selected element, its props, its children, sibling order, and surrounding conditions or iteration. Do not move timing or styling props from the selected element to the wrapper.--Import the requested wrapper and use this shape:--- `AbsoluteFill` and `Sequence` come from `remotion` and need no props merely to wrap the item.-- `HtmlInCanvas` comes from `remotion`; pass the current composition's `width` and `height` as explicit props.-- `HtmlInCanvasMotionBlur` comes from `@remotion/motion-blur`; install that package if necessary and pass the current composition's `width` and `height` as explicit props.--Do not wrap an ancestor or every matching component when the source location identifies one JSX expression. If that expression is inside a loop or conditional, wrap the expression in place so its existing runtime behavior is preserved.-## AssetsPlace assets in the `public/` folder at your project root.diff --git a/packages/studio/src/components/WrapRefactorModal.tsx b/packages/studio/src/components/WrapRefactorModal.tsxindex 80020d3aab..10801c057e 100644--- a/packages/studio/src/components/WrapRefactorModal.tsx+++ b/packages/studio/src/components/WrapRefactorModal.tsx@@ -55,6 +55,10 @@ export const WrapRefactorModal: React.FC<{readonly state: State}> = ({const target = state.displayName? `${state.displayName} (${location})`: location;+ const wrapperImportPath =+ state.wrapper === 'HtmlInCanvasMotionBlur'+ ? '@remotion/motion-blur'+ : 'remotion';return (<DismissableModal panelStyle={panelStyle}>@@ -67,7 +71,7 @@ export const WrapRefactorModal: React.FC<{readonly state: State}> = ({{canSuggestAgent ? (<AgentPromptavailableText="You can wrap it using an agent:"- promptDetails={` Wrap ${target} in <${state.wrapper}>`}+ promptDetails={` Wrap ${target} in <${state.wrapper}> from '${wrapperImportPath}'`}skillId="remotion-markup"/>) : (