- ${emoji || normalizeAgentLabel(agent).slice(0, 1)}
-
+
${normalizeAgentLabel(agent)}
${agent.id}
@@ -210,27 +161,25 @@ export function renderAgents(props: AgentsProps) {
selectedAgent,
defaultId,
props.agentIdentityById[selectedAgent.id] ?? null,
- props.onSetDefault,
)}
- ${renderAgentTabs(props.activePanel, (panel) => props.onSelectPanel(panel), tabCounts)}
+ ${renderAgentTabs(props.activePanel, (panel) => props.onSelectPanel(panel))}
${
props.activePanel === "overview"
? renderAgentOverview({
agent: selectedAgent,
defaultId,
- configForm: props.config.form,
- agentFilesList: props.agentFiles.list,
+ configForm: props.configForm,
+ agentFilesList: props.agentFilesList,
agentIdentity: props.agentIdentityById[selectedAgent.id] ?? null,
agentIdentityError: props.agentIdentityError,
agentIdentityLoading: props.agentIdentityLoading,
- configLoading: props.config.loading,
- configSaving: props.config.saving,
- configDirty: props.config.dirty,
+ configLoading: props.configLoading,
+ configSaving: props.configSaving,
+ configDirty: props.configDirty,
onConfigReload: props.onConfigReload,
onConfigSave: props.onConfigSave,
onModelChange: props.onModelChange,
onModelFallbacksChange: props.onModelFallbacksChange,
- onSelectPanel: props.onSelectPanel,
})
: nothing
}
@@ -238,13 +187,13 @@ export function renderAgents(props: AgentsProps) {
props.activePanel === "files"
? renderAgentFiles({
agentId: selectedAgent.id,
- agentFilesList: props.agentFiles.list,
- agentFilesLoading: props.agentFiles.loading,
- agentFilesError: props.agentFiles.error,
- agentFileActive: props.agentFiles.active,
- agentFileContents: props.agentFiles.contents,
- agentFileDrafts: props.agentFiles.drafts,
- agentFileSaving: props.agentFiles.saving,
+ agentFilesList: props.agentFilesList,
+ agentFilesLoading: props.agentFilesLoading,
+ agentFilesError: props.agentFilesError,
+ agentFileActive: props.agentFileActive,
+ agentFileContents: props.agentFileContents,
+ agentFileDrafts: props.agentFileDrafts,
+ agentFileSaving: props.agentFileSaving,
onLoadFiles: props.onLoadFiles,
onSelectFile: props.onSelectFile,
onFileDraftChange: props.onFileDraftChange,
@@ -257,10 +206,10 @@ export function renderAgents(props: AgentsProps) {
props.activePanel === "tools"
? renderAgentTools({
agentId: selectedAgent.id,
- configForm: props.config.form,
- configLoading: props.config.loading,
- configSaving: props.config.saving,
- configDirty: props.config.dirty,
+ configForm: props.configForm,
+ configLoading: props.configLoading,
+ configSaving: props.configSaving,
+ configDirty: props.configDirty,
onProfileChange: props.onToolsProfileChange,
onOverridesChange: props.onToolsOverridesChange,
onConfigReload: props.onConfigReload,
@@ -272,15 +221,15 @@ export function renderAgents(props: AgentsProps) {
props.activePanel === "skills"
? renderAgentSkills({
agentId: selectedAgent.id,
- report: props.agentSkills.report,
- loading: props.agentSkills.loading,
- error: props.agentSkills.error,
- activeAgentId: props.agentSkills.agentId,
- configForm: props.config.form,
- configLoading: props.config.loading,
- configSaving: props.config.saving,
- configDirty: props.config.dirty,
- filter: props.agentSkills.filter,
+ report: props.agentSkillsReport,
+ loading: props.agentSkillsLoading,
+ error: props.agentSkillsError,
+ activeAgentId: props.agentSkillsAgentId,
+ configForm: props.configForm,
+ configLoading: props.configLoading,
+ configSaving: props.configSaving,
+ configDirty: props.configDirty,
+ filter: props.skillsFilter,
onFilterChange: props.onSkillsFilterChange,
onRefresh: props.onSkillsRefresh,
onToggle: props.onAgentSkillToggle,
@@ -296,16 +245,16 @@ export function renderAgents(props: AgentsProps) {
? renderAgentChannels({
context: buildAgentContext(
selectedAgent,
- props.config.form,
- props.agentFiles.list,
+ props.configForm,
+ props.agentFilesList,
defaultId,
props.agentIdentityById[selectedAgent.id] ?? null,
),
- configForm: props.config.form,
- snapshot: props.channels.snapshot,
- loading: props.channels.loading,
- error: props.channels.error,
- lastSuccess: props.channels.lastSuccess,
+ configForm: props.configForm,
+ snapshot: props.channelsSnapshot,
+ loading: props.channelsLoading,
+ error: props.channelsError,
+ lastSuccess: props.channelsLastSuccess,
onRefresh: props.onChannelsRefresh,
})
: nothing
@@ -315,18 +264,17 @@ export function renderAgents(props: AgentsProps) {
? renderAgentCron({
context: buildAgentContext(
selectedAgent,
- props.config.form,
- props.agentFiles.list,
+ props.configForm,
+ props.agentFilesList,
defaultId,
props.agentIdentityById[selectedAgent.id] ?? null,
),
agentId: selectedAgent.id,
- jobs: props.cron.jobs,
- status: props.cron.status,
- loading: props.cron.loading,
- error: props.cron.error,
+ jobs: props.cronJobs,
+ status: props.cronStatus,
+ loading: props.cronLoading,
+ error: props.cronError,
onRefresh: props.onCronRefresh,
- onRunNow: props.onCronRunNow,
})
: nothing
}
@@ -337,32 +285,19 @@ export function renderAgents(props: AgentsProps) {
`;
}
-let actionsMenuOpen = false;
-
function renderAgentHeader(
agent: AgentsListResult["agents"][number],
defaultId: string | null,
agentIdentity: AgentIdentityResult | null,
- onSetDefault: (agentId: string) => void,
) {
const badge = agentBadgeText(agent.id, defaultId);
const displayName = normalizeAgentLabel(agent);
const subtitle = agent.identity?.theme?.trim() || "Agent workspace and routing.";
const emoji = resolveAgentEmoji(agent, agentIdentity);
- const hue = agentAvatarHue(agent.id);
- const isDefault = Boolean(defaultId && agent.id === defaultId);
-
- const copyId = () => {
- void navigator.clipboard.writeText(agent.id);
- actionsMenuOpen = false;
- };
-
return html`