From dfebced29f5939a08952925b62caac2ac9ea8cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Fri, 17 Apr 2026 20:32:18 -0400 Subject: [PATCH] refactor(agent-form): hide Skills section from Edit modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per user request: remove the Skills toggle list from the agent Edit modal. Skills stay accessible through their own dedicated Skills section in the command palette (paletteOnlyNavDefs in useUIController), so nothing is actually gated away — the Edit modal just stops double-rendering the control. Also removed the unused SkillsSection.tsx file since nothing else references it (added only in C5 / commit 9981ee3, never used outside EditFormBody). If skill assignment needs to come back into the modal later, git history has the exact component intact. --- .../agent-form-fields/EditFormBody.tsx | 2 -- .../edit-sections/SkillsSection.tsx | 36 ------------------- 2 files changed, 38 deletions(-) delete mode 100644 src/renderer/components/organization/agent-form/agent-form-fields/edit-sections/SkillsSection.tsx diff --git a/src/renderer/components/organization/agent-form/agent-form-fields/EditFormBody.tsx b/src/renderer/components/organization/agent-form/agent-form-fields/EditFormBody.tsx index ea474b49..2d55c4b3 100644 --- a/src/renderer/components/organization/agent-form/agent-form-fields/EditFormBody.tsx +++ b/src/renderer/components/organization/agent-form/agent-form-fields/EditFormBody.tsx @@ -12,7 +12,6 @@ import type { AgentFormState } from "../useAgentForm"; import { IdentitySection } from "./edit-sections/IdentitySection"; import { RuntimeSection } from "./edit-sections/RuntimeSection"; import { ConstraintsSection } from "./edit-sections/ConstraintsSection"; -import { SkillsSection } from "./edit-sections/SkillsSection"; import { EditActionBar } from "./edit-sections/EditActionBar"; import { SectionHeader } from "./edit-sections/SectionHeader"; @@ -182,7 +181,6 @@ export function EditFormBody({ onWakeNow={() => void handleWakeNow()} /> - s.skills); - const setSkills = useAppStore((s) => s.setSkills); - - useEffect(() => { - if (skills.length === 0 && companyId) { - window.agentCompany.listSkills(companyId).then((result) => { - if (result.ok) setSkills(result.data); - }); - } - }, [companyId, skills.length, setSkills]); - - return ( - - - - ); -}