|
1 | 1 | import { html, nothing } from "lit"; |
| 2 | +import { keyed } from "lit/directives/keyed.js"; |
2 | 3 | import type { |
3 | 4 | AgentIdentityResult, |
4 | 5 | AgentsFilesListResult, |
@@ -169,22 +170,25 @@ export function renderAgents(props: AgentsProps) { |
169 | 170 | ${renderAgentTabs(props.activePanel, (panel) => props.onSelectPanel(panel))} |
170 | 171 | ${ |
171 | 172 | props.activePanel === "overview" |
172 | | - ? renderAgentOverview({ |
173 | | - agent: selectedAgent, |
174 | | - defaultId, |
175 | | - configForm: props.configForm, |
176 | | - agentFilesList: props.agentFilesList, |
177 | | - agentIdentity: props.agentIdentityById[selectedAgent.id] ?? null, |
178 | | - agentIdentityError: props.agentIdentityError, |
179 | | - agentIdentityLoading: props.agentIdentityLoading, |
180 | | - configLoading: props.configLoading, |
181 | | - configSaving: props.configSaving, |
182 | | - configDirty: props.configDirty, |
183 | | - onConfigReload: props.onConfigReload, |
184 | | - onConfigSave: props.onConfigSave, |
185 | | - onModelChange: props.onModelChange, |
186 | | - onModelFallbacksChange: props.onModelFallbacksChange, |
187 | | - }) |
| 173 | + ? keyed( |
| 174 | + selectedAgent.id, |
| 175 | + renderAgentOverview({ |
| 176 | + agent: selectedAgent, |
| 177 | + defaultId, |
| 178 | + configForm: props.configForm, |
| 179 | + agentFilesList: props.agentFilesList, |
| 180 | + agentIdentity: props.agentIdentityById[selectedAgent.id] ?? null, |
| 181 | + agentIdentityError: props.agentIdentityError, |
| 182 | + agentIdentityLoading: props.agentIdentityLoading, |
| 183 | + configLoading: props.configLoading, |
| 184 | + configSaving: props.configSaving, |
| 185 | + configDirty: props.configDirty, |
| 186 | + onConfigReload: props.onConfigReload, |
| 187 | + onConfigSave: props.onConfigSave, |
| 188 | + onModelChange: props.onModelChange, |
| 189 | + onModelFallbacksChange: props.onModelFallbacksChange, |
| 190 | + }), |
| 191 | + ) |
188 | 192 | : nothing |
189 | 193 | } |
190 | 194 | ${ |
|
0 commit comments