mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 16:42:27 +00:00
fix(skills): stage SVGs that capture wrote into capture/assets/svgs/ (#3336)
`hyperframes capture` extracts inline SVGs into capture/assets/svgs/, and the
capture manifest advertises them to the agent as `assets/svgs/<name>.svg`, so a
frame names one in `asset_candidates` exactly the way it names a screenshot.
stageAssets searched only capture/{assets,assets/videos,screenshots}, so every
captured SVG resolved to nothing: logged as a non-fatal anomaly, and the frame
404'd the brand mark it had been told to use.
Add the directory to the search list, and cover it with a test that fails
without the fix.
lib/assets.mjs is byte-identical across product-launch-video,
faceless-explainer and pr-to-video, so the fix lands in all three. Folding it
into hyperframes-core/scripts/lib/, where frame-packets-core.mjs already lives,
is a separate change.
Co-authored-by: anikam13 <22992075+anikam13@users.noreply.github.com>
This commit is contained in:
@@ -17,8 +17,8 @@ export function basenamesFromCandidates(value) {
|
||||
}
|
||||
|
||||
// Copy each frame's asset_candidates from capture/{assets,assets/videos,
|
||||
// screenshots} into assets/. Already-staged files are left as is (first-wins),
|
||||
// so calling this twice is safe. Returns { staged, wanted, anomalies }.
|
||||
// assets/svgs, screenshots} into assets/. Already-staged files are left as is
|
||||
// (first-wins), so calling this twice is safe. Returns { staged, wanted, anomalies }.
|
||||
export function stageAssets({ hyperframesDir, frames }) {
|
||||
const wanted = new Set();
|
||||
for (const f of frames) {
|
||||
@@ -27,6 +27,7 @@ export function stageAssets({ hyperframesDir, frames }) {
|
||||
const captureDirs = [
|
||||
join(hyperframesDir, "capture/assets"),
|
||||
join(hyperframesDir, "capture/assets/videos"), // videos download into a subdir
|
||||
join(hyperframesDir, "capture/assets/svgs"), // inline SVGs extract into a subdir
|
||||
join(hyperframesDir, "capture/screenshots"),
|
||||
];
|
||||
const assetsDir = join(hyperframesDir, "assets");
|
||||
|
||||
Reference in New Issue
Block a user