refactor(agent-form): hide Skills section from Edit modal
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.
This commit is contained in:
1 parent
3608578ba3
commit
dfebced29f
2 files changed
-38
No files matched your search
@@ -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()}
|
||||
/>
|
||||
</SectionHeader>
|
||||
<SkillsSection companyId={companyId} agentId={agent.id} />
|
||||
<EditActionBar
|
||||
agent={agent}
|
||||
pendingApproval={pendingApproval}
|
||||
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
import { useEffect } from "react";
|
||||
import { SkillAgentToggles } from "../../../../skills/SkillAgentToggles";
|
||||
import { useAppStore } from "../../../../../state/store";
|
||||
import { useT } from "../../../../../i18n";
|
||||
import { SectionHeader } from "./SectionHeader";
|
||||
|
||||
interface SkillsSectionProps {
|
||||
companyId: string;
|
||||
agentId: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Skills assignment for this agent. Pulls the company skill catalog via
|
||||
* the store (fetched lazily if not already populated) and renders
|
||||
* SkillAgentToggles inside the shared SectionHeader so it reads with the
|
||||
* same rhythm as Identity / Runtime / Constraints.
|
||||
*/
|
||||
export function SkillsSection({ companyId, agentId }: SkillsSectionProps) {
|
||||
const t = useT();
|
||||
const skills = useAppStore((s) => 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 (
|
||||
<SectionHeader title={t("agent.skills")}>
|
||||
<SkillAgentToggles mode="agent" companyId={companyId} agentId={agentId} skills={skills} />
|
||||
</SectionHeader>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user