Skip to content

🎥 Make videos programmatically with React

Detect Codex from the client oai bridge

Jonny Burger56fad346455c
diff --git a/packages/studio-server/src/preview-server/routes/remotion-skills-info.ts b/packages/studio-server/src/preview-server/routes/remotion-skills-info.ts
index f05b01825c..aaf7fcf41b 100644
--- a/packages/studio-server/src/preview-server/routes/remotion-skills-info.ts
+++ b/packages/studio-server/src/preview-server/routes/remotion-skills-info.ts
@@ -70,9 +70,7 @@ export const getRemotionSkillsInfo = ({
return {
studioServerStartedByAgent: Boolean(
- process.env.CODEX_THREAD_ID ||
- process.env.CURSOR_AGENT ||
- process.env.CLAUDECODE === '1',
+ process.env.CURSOR_AGENT || process.env.CLAUDECODE === '1',
),
remotionUpgradeSkillAvailable: isSkillAvailable('remotion-upgrade'),
remotionInteractivitySkillAvailable: isSkillAvailable(
diff --git a/packages/studio/src/components/Notifications/ServerDisconnected.tsx b/packages/studio/src/components/Notifications/ServerDisconnected.tsx
index f83e121ae4..cc2ecc6ef0 100644
--- a/packages/studio/src/components/Notifications/ServerDisconnected.tsx
+++ b/packages/studio/src/components/Notifications/ServerDisconnected.tsx
@@ -59,7 +59,9 @@ export const ServerDisconnected: React.FC = () => {
const annotationTarget = useRef<HTMLDivElement>(null);
const canAnnotate = getCodexAnnotation() !== null;
const isInAgent =
- canAnnotate || remotionSkillsInfo?.studioServerStartedByAgent;
+ ('oai' in window && Boolean(window.oai)) ||
+ ('oai' in document && Boolean(document.oai)) ||
+ remotionSkillsInfo?.studioServerStartedByAgent;
const restartSkill = isInAgent
? (['remotion-studio', 'remotion-best-practices'].find((skillName) =>
remotionSkillsInfo?.skills.some(