Skip to content

Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.

604 B
Raw Blame
import { existsSync } from 'node:fs';
import { shell } from 'electron';
import type { DesktopHostResult } from '../shared/types.js';

export async function openExternal(url: string): Promise<void> {
  const parsed = new URL(url);
  if (parsed.protocol !== 'https:') throw new Error('Only HTTPS links are allowed');
  await shell.openExternal(parsed.toString());
}

export async function revealPath(path: string): Promise<DesktopHostResult> {
  if (!existsSync(path)) {
    return { ok: false, code: 'FAILED', message: 'Path does not exist' };
  }
  shell.showItemInFolder(path);
  return { ok: true };
}