mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 11:26:02 +00:00
fix(cli): preview inside a host app's agent run no longer outlives the run (#5852)
A background preview detaches, so one started by an agent inside a host app's run kept running after the run and the app ended, and held the project's history lock for its whole life. Inside a host app's run, preview now refuses to start in the background and points to the host app's preview or --foreground, which stays attached to the run.
This commit is contained in:
@@ -221,6 +221,10 @@ export function desktopInstalled({
|
||||
return DESKTOP_BUNDLE_IDS.some(spotlight);
|
||||
}
|
||||
|
||||
export function insideHostApp(env: NodeJS.ProcessEnv = process.env): boolean {
|
||||
return Boolean(env.HYPERFRAMES_DESKTOP_PROJECT);
|
||||
}
|
||||
|
||||
/** The app line render and preview print; null inside the app, or with nothing here to open or download. */
|
||||
export function desktopHint(
|
||||
dir: string,
|
||||
@@ -236,7 +240,7 @@ export function desktopHint(
|
||||
platform?: NodeJS.Platform;
|
||||
} = {},
|
||||
): string | null {
|
||||
if (env.HYPERFRAMES_DESKTOP_PROJECT) return null;
|
||||
if (insideHostApp(env)) return null;
|
||||
if (ready && (installed ?? desktopInstalled({ platform, env })))
|
||||
return `Keep editing by chatting with Framey in the desktop app: ${openCommandFor(dir)}`;
|
||||
const url = desktopDownloadUrl(platform);
|
||||
|
||||
Reference in New Issue
Block a user