Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

589 B
Raw Blame
import { createSnapshot, mergeGuideInto } from '@/core/guides/service';
import type { CaptureInsert } from '../capture-insert';
import { settleDescriptions } from './settle-descriptions';

export async function mergeRecording(
  guideId: string,
  { insertTargetGuideId, insertAtIndex }: Pick<CaptureInsert, 'insertTargetGuideId' | 'insertAtIndex'>,
  settleNarration: () => Promise<void>,
): Promise<void> {
  await settleNarration();
  await settleDescriptions(guideId);
  await createSnapshot(insertTargetGuideId);
  await mergeGuideInto(guideId, insertTargetGuideId, insertAtIndex);
}