Skip to content

The open source AI video agent: turns any coding agent into a video agent, with an editor to change anything it makes.

Studio: an agent found and connected has Locate… too, beside Disconnect (#39)

youyouhdhd9c05395202cd
diff --git a/.changeset/agents-locate-when-found.md b/.changeset/agents-locate-when-found.md
new file mode 100644
index 0000000..2a85c13
--- /dev/null
+++ b/.changeset/agents-locate-when-found.md
@@ -0,0 +1,5 @@
+---
+"openfilm": patch
+---
+
+Settings → Agents: an agent found and connected has Locate… too, beside Disconnect, so the program it runs can be chosen even when one was found — a particular version, another install. What was chosen still says so under the agent, with Find it automatically.
diff --git a/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx b/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx
index df79296..0344e1d 100644
--- a/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx
+++ b/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx
@@ -180,11 +180,21 @@ export function AgentsSection() {
const action = (agent: HostAgent, chosen = true) => {
const working = busy === agent.id;
if (agent.status === 'ready' && chosen) {
+ /* the program can be pointed at even when one was found: a particular version, another install; byok has none */
+ const canLocate = host.locate && agent.id !== 'byok';
return (
- <SettingsButton variant="quiet" disabled={working} title={agent.id === 'byok' ? undefined : t('settings.agents.disconnectHint').replaceAll('{name}', agent.name)}
- onClick={() => act(agent.id, () => host.disconnect(agent.id))}>
- {t('settings.agents.disconnect')}
- </SettingsButton>
+ <>
+ {canLocate ? (
+ <SettingsButton variant="quiet" disabled={working} onClick={() => locate(agent)}>
+ {working ? <Loader2 size={16} className="animate-spin" aria-hidden /> : null}
+ {t('settings.agents.locate')}
+ </SettingsButton>
+ ) : null}
+ <SettingsButton variant="quiet" disabled={working} title={agent.id === 'byok' ? undefined : t('settings.agents.disconnectHint').replaceAll('{name}', agent.name)}
+ onClick={() => act(agent.id, () => host.disconnect(agent.id))}>
+ {t('settings.agents.disconnect')}
+ </SettingsButton>
+ </>
);
}
if (agent.status === 'missing') {
diff --git a/packages/openfilm/studio/ui/src/lib/host.ts b/packages/openfilm/studio/ui/src/lib/host.ts
index 3003f78..83de7b3 100644
--- a/packages/openfilm/studio/ui/src/lib/host.ts
+++ b/packages/openfilm/studio/ui/src/lib/host.ts
@@ -64,9 +64,10 @@ export interface StudioHost {
/**
* The agents the app's chat can use, for Settings → Agents: connected or not, shown in the chat's menu or not, and
* the person's own key for the one that takes one. `onChange` tells of every change (a sign-in finished, a key set up)
- * and returns a way to stop listening. One of the person's own agents not found can be pointed at (`locate`: the
- * system's file dialog, with Studio's words; `{ ok: false }` and no error when cancelled) and set back to being
- * found (`useAutomatic`); `diagnose` says what was searched (an older app has none of these).
+ * and returns a way to stop listening. One of the person's own agents, found or not, can be pointed at a program
+ * of the person's choosing (`locate`: the system's file dialog, with Studio's words; `{ ok: false }` and no error
+ * when cancelled) and set back to being found (`useAutomatic`); `diagnose` says what was searched (an older app
+ * has none of these).
*/
agents?: {
list: () => Promise<HostAgent[]>;