import { getPaths } from "yt-dlp-transcript-common/lib/paths"; import { jobOfPaths } from "yt-dlp-transcript-common/controller/researchRuns"; import type { FindClipsDeps } from "yt-dlp-transcript-common/controller/findClips"; import { safeRevalidate } from "../../lib/safeRevalidate"; import { findClipsEditor } from "./_researchEditor"; // THE EDITOR'S SIDE OF FIND CLIPS (release 36 lane A): the chain's deps — its // steps through this editor's own ops actions in process (findClipsEditor), // its jobs from this registry, and the video page revalidated when the record // lands. Shared by `POST /api/ops/find-clips` and the video page's button // (findClipsActions.ts), so the two run one chain. export function findClipsDeps(slug: string, id: string): FindClipsDeps { const paths = getPaths(); return { paths, editor: findClipsEditor, jobOf: jobOfPaths(paths), onDone: () => safeRevalidate([`/channels/${slug}/videos/${id}`]), }; }