Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/client/AgentPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const AgentTerminal = lazy(() =>
);

const CLI_STORAGE_KEY = "agent-native-cli-command";
const CLI_DEFAULT = "fusion";
const CLI_DEFAULT = "builder";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Missing localStorage migration for "fusion" → "builder"

Existing users with "fusion" saved under agent-native-cli-command will get a broken terminal on next load: the PTY server rejects "fusion" (removed from CLI_REGISTRY) and closes the WebSocket with a "not-found" error. Add a one-time migration: if (saved === "fusion") { localStorage.setItem(CLI_STORAGE_KEY, "builder"); return "builder"; }


How did I do? React with 👍 or 👎 to help me improve.


interface AvailableCli {
command: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/client/terminal/AgentTerminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import React, {
import { getHarnessOrigin } from "../harness.js";

export interface AgentTerminalProps {
/** CLI command to run. Default: 'fusion' */
/** CLI command to run. Default: 'builder' */
command?: string;
/** Additional CLI flags */
flags?: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/terminal/cli-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export interface CliEntry {
}

export const CLI_REGISTRY: Record<string, CliEntry> = {
fusion: {
builder: {
label: "Builder.io",
installPackage: "@builder.io/fusion",
installPackage: "",
stripEnv: [],
},
claude: {
Expand Down
7 changes: 4 additions & 3 deletions packages/core/src/terminal/terminal-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { defineEventHandler } from "h3";

export interface TerminalPluginOptions {
/** CLI command to run. Defaults to AGENT_CLI_COMMAND env or 'fusion' */
/** CLI command to run. Defaults to AGENT_CLI_COMMAND env or 'builder' */
command?: string;
/** Port for the WebSocket server. Defaults to AGENT_TERMINAL_PORT env or auto-assigned */
port?: number;
Expand Down Expand Up @@ -73,14 +73,15 @@ export function createTerminalPlugin(options: TerminalPluginOptions = {}) {
defineEventHandler(() => ({
available: true,
wsPort: existingPort ? parseInt(existingPort, 10) : 0,
command: options.command || process.env.AGENT_CLI_COMMAND || "claude",
command:
options.command || process.env.AGENT_CLI_COMMAND || "builder",
})),
);
return;
}

const command =
options.command || process.env.AGENT_CLI_COMMAND || "fusion";
options.command || process.env.AGENT_CLI_COMMAND || "builder";
const port =
options.port ??
(process.env.AGENT_TERMINAL_PORT
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/app/routes/docs.harnesses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pnpm dev:harness`}
["Codex", "codex", "--full-auto, --quiet"],
["Gemini CLI", "gemini", "--sandbox"],
["OpenCode", "opencode", "—"],
["Builder.io", "fusion", "—"],
["Builder.io", "builder", "—"],
].map(([name, cmd, flags]) => (
<tr key={cmd}>
<td>{name}</td>
Expand Down
4 changes: 2 additions & 2 deletions packages/harness-cli/client/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export function App() {
<p className="text-xs text-white/50 leading-relaxed">
Running{" "}
<code className="bg-white/10 px-1.5 py-0.5 rounded text-[11px]">
npx --yes {config.installPackage}
{config.installCommand || `npx --yes ${config.installPackage}`}
</code>
</p>
<p className="text-[11px] text-white/30 mt-3">
Expand All @@ -463,7 +463,7 @@ export function App() {
Install manually:
</p>
<code className="block bg-white/10 px-3 py-2 rounded text-[11px] text-white/70 mt-2">
npx --yes {config.installPackage}
{config.installCommand || `npx --yes ${config.installPackage}`}
</code>
<button
onClick={() => {
Expand Down
5 changes: 3 additions & 2 deletions packages/harness-cli/client/harnesses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ export const opencodeConfig: HarnessConfig = {

export const fusionConfig: HarnessConfig = {
name: "Builder.io",
command: "fusion",
installPackage: "@builder.io/fusion",
command: "builder",
installPackage: "",
installCommand: "curl -fsSL https://www.builder.io/install.sh | bash",
options: [],
customPlaceholder: "e.g. --project my-project",
};
Expand Down
2 changes: 2 additions & 0 deletions packages/harness-cli/client/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export interface HarnessConfig {
command: string;
/** npm package to install, e.g. "@anthropic-ai/claude-code" */
installPackage: string;
/** Override install command shown in the UI (e.g. a curl script). Falls back to npx --yes {installPackage} */
installCommand?: string;
/** Toggle options shown in settings panel */
options: HarnessOption[];
/** Placeholder for custom flags input */
Expand Down
2 changes: 1 addition & 1 deletion packages/harness-cli/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function buildCliArgs(
return ["--quiet", "--full-stdout", message];
case "gemini":
return ["--prompt", message];
case "fusion":
case "builder":
return [message];
default:
return [message];
Expand Down
Loading