Skip to content

The VS Code of video editing, built for agents.

TypeScript

Add new agent icons and refactor agent handling in DashboardHomeView

konstantin-paulus90cf84aa9bd7
diff --git a/apps/web/src/assets/icons/claude-code.svg b/apps/web/src/assets/icons/claude-code.svg
new file mode 100644
index 00000000..d0e158d4
--- /dev/null
+++ b/apps/web/src/assets/icons/claude-code.svg
@@ -0,0 +1,3 @@
+<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M17.2488 11.1728H19V12.8272H17.25V14.4421H16.3826V16H15.5V14.4421H14.6326V16H13.75V14.4421H10.25V16H9.368V14.4421H8.5V16H7.61742V14.4421H6.75V12.8267H5V11.1733H6.75V8H17.2488V11.1728ZM8.5 11.1728H9.368V9.6544H8.5V11.1728ZM14.6308 11.1728H15.5V9.6544H14.6308V11.1728Z" fill="currentColor" />
+</svg>
diff --git a/apps/web/src/assets/icons/codex.svg b/apps/web/src/assets/icons/codex.svg
new file mode 100644
index 00000000..b4732850
--- /dev/null
+++ b/apps/web/src/assets/icons/codex.svg
@@ -0,0 +1,3 @@
+<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0428 6.22911C10.5245 6.03118 11.0487 5.95975 11.5658 6.02162C12.2323 6.09812 12.8263 6.3816 13.3478 6.87158C13.3548 6.87823 13.3634 6.88303 13.3727 6.88556C13.382 6.88809 13.3919 6.88827 13.4013 6.88608C14.1053 6.71309 14.7823 6.77408 15.4318 7.06906L15.4633 7.08406L15.5403 7.12206C16.2187 7.47354 16.7052 8.00701 16.9992 8.72097C17.1382 9.06045 17.2082 9.41493 17.2097 9.78391C17.2195 10.0587 17.1892 10.3334 17.1197 10.5994C17.1163 10.6129 17.1163 10.6271 17.1198 10.6407C17.1233 10.6542 17.1302 10.6667 17.1397 10.6769C17.5328 11.0754 17.8062 11.5761 17.9287 12.1223C18.1212 13.0727 17.9237 13.9297 17.3372 14.6921L17.2462 14.8021C16.8578 15.2469 16.3479 15.5686 15.7792 15.7276C15.7668 15.7312 15.7555 15.7377 15.7461 15.7465C15.7367 15.7554 15.7295 15.7664 15.7252 15.7786C15.5977 16.1466 15.4698 16.4605 15.2318 16.7745C14.6323 17.5655 13.7508 18.0054 12.7578 17.9999C11.9663 17.9959 11.2648 17.7065 10.6528 17.132C10.6435 17.1235 10.6322 17.1175 10.6199 17.1147C10.6077 17.1119 10.5949 17.1124 10.5828 17.116C10.3238 17.1995 10.0628 17.2115 9.78081 17.2085C9.3303 17.2049 8.88654 17.0985 8.48333 16.8975C8.06128 16.6882 7.69388 16.3833 7.41034 16.0071C7.30884 15.8726 7.20834 15.7461 7.13484 15.5966C7.03348 15.3905 6.95065 15.1759 6.88735 14.9551C6.75444 14.4535 6.75151 13.9263 6.87885 13.4232C6.88296 13.4113 6.88433 13.3987 6.88285 13.3862C6.88037 13.3738 6.87387 13.3626 6.86435 13.3542C6.55614 13.0425 6.32054 12.6665 6.17435 12.2533C6.07757 11.9988 6.02138 11.7307 6.00786 11.4588C5.98368 11.1008 6.01539 10.7412 6.10186 10.3929C6.32685 9.65092 6.75635 9.06895 7.39034 8.64648C7.53134 8.55248 7.66534 8.47949 7.79134 8.42749C7.93434 8.36749 8.07783 8.31749 8.22183 8.2755C8.23213 8.27244 8.24151 8.26686 8.2491 8.25927C8.2567 8.25167 8.26228 8.2423 8.26533 8.232C8.37453 7.83951 8.56232 7.47329 8.81733 7.15556C9.15732 6.73258 9.56582 6.4236 10.0428 6.22911ZM9.64082 10.1539C9.58499 10.0562 9.49265 9.98475 9.38412 9.95516C9.27558 9.92558 9.15974 9.94032 9.06207 9.99615C8.96441 10.052 8.89292 10.1443 8.86334 10.2528C8.83375 10.3614 8.8485 10.4772 8.90432 10.5749L9.75131 12.0573L8.90732 13.4812C8.85558 13.5777 8.84312 13.6904 8.87254 13.7959C8.90197 13.9014 8.971 13.9914 9.06523 14.0471C9.15946 14.1029 9.27159 14.1201 9.37819 14.0951C9.4848 14.0702 9.57764 14.005 9.63732 13.9132L10.6073 12.2773C10.6456 12.2128 10.666 12.1393 10.6667 12.0643C10.6673 11.9893 10.648 11.9154 10.6108 11.8503L9.64082 10.1539ZM12.3638 13.2737C12.2558 13.2801 12.1543 13.3276 12.0801 13.4063C12.0058 13.4851 11.9645 13.5892 11.9645 13.6974C11.9645 13.8057 12.0058 13.9098 12.0801 13.9885C12.1543 14.0673 12.2558 14.1147 12.3638 14.1212H14.7878C14.8966 14.1159 14.9993 14.0689 15.0745 13.99C15.1497 13.911 15.1917 13.8062 15.1917 13.6972C15.1917 13.5882 15.1497 13.4833 15.0745 13.4044C14.9993 13.3255 14.8966 13.2785 14.7878 13.2732H12.3638V13.2737Z" fill="currentColor" />
+</svg>
diff --git a/apps/web/src/components/dashboard/home-view.tsx b/apps/web/src/components/dashboard/home-view.tsx
index 927b10a6..4c9544e3 100644
--- a/apps/web/src/components/dashboard/home-view.tsx
+++ b/apps/web/src/components/dashboard/home-view.tsx
@@ -538,7 +538,7 @@ function AgentPicker(props: AgentPickerProps) {
aria-label="Choose the coding agent"
class="flex h-7 shrink-0 items-center rounded-md pl-0.5 pr-2 text-xs font-450 text-muted-foreground hover:bg-muted focus-ring"
>
- <AgentLogo id={props.current?.id} />
+ <AgentLogo agent={props.current} />
<span class="max-w-40 truncate">
{props.current?.label ?? "No agent installed"}
</span>
@@ -552,7 +552,7 @@ function AgentPicker(props: AgentPickerProps) {
disabled={!entry.installed}
onSelect={() => props.onSelect(entry.id)}
>
- <Icon name={agentIcon(entry.id)} />
+ <Icon name={agentIcon(entry)} />
<span class="min-w-0 flex-1 truncate">{entry.label}</span>
<Show
when={entry.installed}
@@ -577,10 +577,10 @@ function AgentPicker(props: AgentPickerProps) {
}
/** The agent's mark in the composer, in the same box the folder icon sits in. */
-function AgentLogo(props: { id?: string }) {
+function AgentLogo(props: { agent: AgentInfo | null }) {
return (
<span class="grid size-6 shrink-0 place-items-center overflow-clip">
- <Icon name={agentIcon(props.id)} />
+ <Icon name={agentIcon(props.agent)} />
</span>
);
}
diff --git a/apps/web/src/lib/agents.ts b/apps/web/src/lib/agents.ts
index 9825e3ad..9e17f8fc 100644
--- a/apps/web/src/lib/agents.ts
+++ b/apps/web/src/lib/agents.ts
@@ -10,22 +10,20 @@ export type AgentInfo = {
/** Stable id — what the picker remembers the user's choice as. */
id: string;
label: string;
+ /** The icon file, for {@link Icon}. */
+ icon: string;
/** Whether the picker offers it, or lists it as not installed. */
installed: boolean;
};
/** Every agent we support, in the order they are offered. */
export const AGENTS: readonly AgentInfo[] = [
- { id: "claude", label: "Claude Code", installed: true },
- { id: "codex", label: "Codex", installed: false },
+ { id: "fable-5.1", label: "Fable 5.1", icon: "claude-code", installed: true },
+ { id: "opus-5", label: "Opus 5", icon: "claude-code", installed: true },
+ { id: "gpt-6-astra", label: "GPT-6 Astra", icon: "codex", installed: true },
+ { id: "gpt-5.6-sol", label: "GPT-5.6 Sol", icon: "codex", installed: true },
];
-/** The icon file for each agent, for {@link Icon}. */
-const AGENT_ICONS: Record<string, string> = {
- claude: "claude",
- codex: "gpt-codex",
-};
-
-/** The icon name for `id`, falling back to a generic mark. */
-export const agentIcon = (id: string | undefined): string =>
- (id && AGENT_ICONS[id]) || "fx";
+/** The icon name for `agent`, falling back to a generic mark. */
+export const agentIcon = (agent: AgentInfo | null | undefined): string =>
+ agent?.icon ?? "fx";