The open source AI video agent: turns any coding agent into a video agent, with an editor to change anything it makes.
Settings: Claude Code in the Claude app has no Install button (#120)
riverisbuildinge1993148e814
diff --git a/.changeset/claude-code-tab-no-install.md b/.changeset/claude-code-tab-no-install.mdnew file mode 100644index 0000000..ba843ea--- /dev/null+++ b/.changeset/claude-code-tab-no-install.md@@ -0,0 +1,5 @@+---+"openfilm": patch+---++Settings › Agents: Claude Code waiting in the Claude app shows only how to get it (open the app's Code tab once), without an Install button that led elsewhere.diff --git a/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx b/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsxindex 83e45e0..b7045f2 100644--- a/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx+++ b/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx@@ -23,6 +23,7 @@ import { Check, Copy, Download, KeyRound, Loader2, Plus, X } from 'lucide-react'import { useLanguage, useT } from '@/i18n';import { BYOK_EFFORTS, studioHost, type HostAgent, type HostAgentDiagnosis, type HostAgentId, type HostAgentUsage, type HostByokEffort, type HostByokEffortLevel, type HostByokFormat, type HostOwnModel } from '@/lib/host';import { parseContextLength } from '@/lib/context-length';+import { missingActions } from '@/lib/agent-row';/** What is left of the plan: what Codex can say (the app's agent-usage.mjs; Claude Code's own report is wrong for Team accounts). */const PLAN_AGENTS: readonly HostAgentId[] = ['codex'];@@ -203,22 +204,22 @@ export function AgentsSection() {);}if (agent.status === 'missing') {- const canLocate = host.locate && agent.setupRequired !== 'code-tab';- if (!agent.install && !canLocate) return null;+ const offer = missingActions(agent, { locate: Boolean(host.locate), install: Boolean(host.install) });+ if (!offer.locate && !offer.install) return null;return (<>- {canLocate ? (+ {offer.locate ? (<SettingsButton variant="quiet" disabled={working} onClick={() => locate(agent)}>{working ? <Loader2 size={16} className="animate-spin" aria-hidden /> : null}{t('settings.agents.locate')}</SettingsButton>) : null}{/* its official installer, run once the person agrees to the command; else its install page */}- {agent.installer && host.install ? (+ {offer.install === 'run' ? (<SettingsButton disabled={working || agent.installing || confirming === agent.id} onClick={() => setConfirming(agent.id)}><Download size={16} />{t('settings.agents.install')}</SettingsButton>- ) : agent.install ? <SettingsLinkButton href={agent.install}><Download size={16} />{t('settings.agents.install')}</SettingsLinkButton> : null}+ ) : offer.install === 'page' && agent.install ? <SettingsLinkButton href={agent.install}><Download size={16} />{t('settings.agents.install')}</SettingsLinkButton> : null}</>);}diff --git a/packages/openfilm/studio/ui/src/lib/agent-row.test.ts b/packages/openfilm/studio/ui/src/lib/agent-row.test.tsnew file mode 100644index 0000000..3a80b9b--- /dev/null+++ b/packages/openfilm/studio/ui/src/lib/agent-row.test.ts@@ -0,0 +1,14 @@+import { test } from 'node:test';+import assert from 'node:assert/strict';+import { missingActions } from './agent-row.ts';++test('an agent not found offers Locate and its installer, or its install page', () => {+ const host = { locate: true, install: true };+ assert.deepEqual(missingActions({ installer: 'irm https://example.test/install.ps1 | iex', install: 'https://example.test' }, host), { locate: true, install: 'run' });+ assert.deepEqual(missingActions({ install: 'https://example.test' }, host), { locate: true, install: 'page' });+ assert.deepEqual(missingActions({ installer: 'x', install: 'https://example.test' }, { locate: false, install: false }), { locate: false, install: 'page' });+});++test("Claude Code waiting in the Claude app offers no Install or Locate: opening the app's Code tab downloads it", () => {+ assert.deepEqual(missingActions({ setupRequired: 'code-tab', install: 'https://example.test' }, { locate: true, install: true }), { locate: false, install: null });+});diff --git a/packages/openfilm/studio/ui/src/lib/agent-row.ts b/packages/openfilm/studio/ui/src/lib/agent-row.tsnew file mode 100644index 0000000..baf0e89--- /dev/null+++ b/packages/openfilm/studio/ui/src/lib/agent-row.ts@@ -0,0 +1,12 @@+import type { HostAgent } from '@/lib/host';++/**+ * What Settings › Agents offers for an agent that is not found: Locate (the program is somewhere else), and Install,+ * either its official installer run here (`run`) or its install page (`page`). Claude Code waiting in the Claude app+ * gets neither: the app downloads it once its Code tab is opened, as the row says.+ */+export function missingActions(agent: Pick<HostAgent, 'setupRequired' | 'install' | 'installer'>, host: { locate: boolean; install: boolean }) {+ if (agent.setupRequired === 'code-tab') return { locate: false, install: null };+ const install: 'run' | 'page' | null = agent.installer && host.install ? 'run' : agent.install ? 'page' : null;+ return { locate: host.locate, install };+}