From 96f4f50f510e67392470a7b7d9cb82e4f41fa0ad Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 7 Mar 2026 18:24:12 -0800 Subject: [PATCH] Agents UI: compose save state from config state --- ui/src/ui/controllers/agents.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ui/src/ui/controllers/agents.ts b/ui/src/ui/controllers/agents.ts index 57f6e52d76d..728ea103d23 100644 --- a/ui/src/ui/controllers/agents.ts +++ b/ui/src/ui/controllers/agents.ts @@ -1,6 +1,7 @@ import type { GatewayBrowserClient } from "../gateway.ts"; import type { AgentsListResult, ToolsCatalogResult } from "../types.ts"; import { saveConfig } from "./config.ts"; +import type { ConfigState } from "./config.ts"; export type AgentsState = { client: GatewayBrowserClient | null; @@ -14,16 +15,7 @@ export type AgentsState = { toolsCatalogResult: ToolsCatalogResult | null; }; -export type AgentsConfigSaveState = AgentsState & { - configSaving: boolean; - configSnapshot: { hash?: string | null } | null; - configFormDirty: boolean; - configFormMode: "form" | "raw"; - configForm: Record | null; - configRaw: string; - configSchema: unknown; - lastError: string | null; -}; +export type AgentsConfigSaveState = AgentsState & ConfigState; export async function loadAgents(state: AgentsState) { if (!state.client || !state.connected) {