feat(FN-3261): wire droid bundled plugin and improve agent detail view
Merged four step commits bringing AgentDetailView improvements with model favoritism UI, bundled plugin install wiring for the droid runtime, aligned documentation between settings reference and the plugin README, plus mobile layout refinements with safe-area padding test updates. Fusion-Task-Id: FN-3261
This commit is contained in:
@@ -39,14 +39,14 @@ interface PluginManagerProps {
|
||||
projectId?: string;
|
||||
}
|
||||
|
||||
interface BundledRuntimePlugin {
|
||||
interface BundledPlugin {
|
||||
id: string;
|
||||
name: string;
|
||||
path: string;
|
||||
experimental?: boolean;
|
||||
}
|
||||
|
||||
const BUNDLED_RUNTIME_PLUGINS: BundledRuntimePlugin[] = [
|
||||
const BUNDLED_PLUGINS: BundledPlugin[] = [
|
||||
{
|
||||
id: "fusion-plugin-agent-browser-runtime",
|
||||
name: "Agent Browser Runtime",
|
||||
@@ -70,6 +70,12 @@ const BUNDLED_RUNTIME_PLUGINS: BundledRuntimePlugin[] = [
|
||||
path: "./plugins/fusion-plugin-openclaw-runtime",
|
||||
experimental: true,
|
||||
},
|
||||
{
|
||||
id: "fusion-plugin-droid-runtime",
|
||||
name: "Droid Runtime",
|
||||
path: "./plugins/fusion-plugin-droid-runtime",
|
||||
experimental: true,
|
||||
},
|
||||
];
|
||||
|
||||
export const STATE_COLORS: Record<string, string> = {
|
||||
@@ -209,7 +215,7 @@ export function PluginManager({ addToast, projectId }: PluginManagerProps) {
|
||||
}
|
||||
};
|
||||
|
||||
const handleInstallBundledRuntimePlugin = async (plugin: BundledRuntimePlugin) => {
|
||||
const handleInstallBundledPlugin = async (plugin: BundledPlugin) => {
|
||||
try {
|
||||
setInstallingBundledPluginId(plugin.id);
|
||||
await installPlugin({ path: plugin.path }, projectId);
|
||||
@@ -516,15 +522,15 @@ export function PluginManager({ addToast, projectId }: PluginManagerProps) {
|
||||
const installedPlugins = plugins;
|
||||
|
||||
const renderBundledRuntimeSection = () => (
|
||||
<section className="plugin-bundled-runtime-section" aria-label="Bundled Runtime Plugins">
|
||||
<section className="plugin-bundled-runtime-section" aria-label="Bundled Plugins">
|
||||
<div className="plugin-bundled-runtime-header">
|
||||
<h4 className="plugin-bundled-runtime-heading">Bundled Runtime Plugins</h4>
|
||||
<h4 className="plugin-bundled-runtime-heading">Bundled Plugins</h4>
|
||||
<p className="plugin-bundled-runtime-description">
|
||||
Install Fusion's bundled runtimes directly from this screen.
|
||||
Install Fusion's bundled plugins directly from this screen.
|
||||
</p>
|
||||
</div>
|
||||
<div className="plugin-bundled-runtime-list" aria-label="Bundled runtime plugin recommendations">
|
||||
{BUNDLED_RUNTIME_PLUGINS.map((bundledPlugin) => {
|
||||
<div className="plugin-bundled-runtime-list" aria-label="Bundled plugin recommendations">
|
||||
{BUNDLED_PLUGINS.map((bundledPlugin) => {
|
||||
const isInstalled = installedPluginIds.has(bundledPlugin.id);
|
||||
return (
|
||||
<div key={bundledPlugin.id} className="plugin-bundled-runtime-item">
|
||||
@@ -549,7 +555,7 @@ export function PluginManager({ addToast, projectId }: PluginManagerProps) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
void handleInstallBundledRuntimePlugin(bundledPlugin);
|
||||
void handleInstallBundledPlugin(bundledPlugin);
|
||||
}}
|
||||
disabled={installingBundledPluginId === bundledPlugin.id}
|
||||
>
|
||||
@@ -617,7 +623,7 @@ export function PluginManager({ addToast, projectId }: PluginManagerProps) {
|
||||
<div className="settings-empty-state">
|
||||
<Package size={32} className="text-muted" />
|
||||
<p>No plugins installed.</p>
|
||||
<p className="text-muted">Install a plugin to get started, or use a bundled runtime below.</p>
|
||||
<p className="text-muted">Install a plugin to get started, or use a bundled plugin below.</p>
|
||||
</div>
|
||||
) : (
|
||||
<div className="plugin-list">
|
||||
|
||||
@@ -230,9 +230,10 @@ describe("PluginManager", () => {
|
||||
expect(screen.getByText("Hermes Runtime")).toBeTruthy();
|
||||
expect(screen.getByText("Paperclip Runtime")).toBeTruthy();
|
||||
expect(screen.getByText("OpenClaw Runtime")).toBeTruthy();
|
||||
expect(screen.getByText("Droid Runtime")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("installs bundled runtime plugins from the bundled runtime section", async () => {
|
||||
it("installs bundled plugins from the bundled plugin section", async () => {
|
||||
render(<PluginManager addToast={addToast} />);
|
||||
|
||||
await waitFor(() => {
|
||||
@@ -264,7 +265,7 @@ describe("PluginManager", () => {
|
||||
expect(screen.getByText("Test Plugin B")).toBeTruthy();
|
||||
expect(screen.getByText("v1.0.0")).toBeTruthy();
|
||||
expect(screen.getByText("v2.0.0")).toBeTruthy();
|
||||
expect(screen.getByRole("heading", { name: "Bundled Runtime Plugins" })).toBeTruthy();
|
||||
expect(screen.getByRole("heading", { name: "Bundled Plugins" })).toBeTruthy();
|
||||
expect(screen.getAllByText("Not installed").length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user