Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions cmd/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,29 +409,29 @@ func reconcileAgentList(logger logger.Logger, cmd *cobra.Command, apiUrl string,
for _, filename := range localAgents {
agentName := filepath.Base(filepath.Dir(filename))
key := normalAgentName(agentName)
var found bool
for _, agent := range remoteAgents {
if localAgent, ok := fileAgentsByID[agent.ID]; ok {
if localAgent.Name == agentName {
oldkey := normalAgentName(agent.Name)
agent.Name = localAgent.Name
state[key] = agentListState{
Agent: &agent,
Filename: filename,
FoundLocal: true,
FoundRemote: true,
Rename: true,
RenameFrom: oldkey,
}
delete(state, oldkey)
found = true
break
}
}
}
if found {
continue
}
// var found bool
// for _, agent := range remoteAgents {
// if localAgent, ok := fileAgentsByID[agent.ID]; ok {
// if localAgent.Name == agentName {
// oldkey := normalAgentName(agent.Name)
// agent.Name = localAgent.Name
// state[key] = agentListState{
// Agent: &agent,
// Filename: filename,
// FoundLocal: true,
// FoundRemote: true,
// Rename: true,
// RenameFrom: oldkey,
// }
// delete(state, oldkey)
// found = true
// break
// }
// }
// }
// if found {
// continue
// }
if filepath.Base(filename) == agentFilename {
if found, ok := state[key]; ok {
state[key] = agentListState{
Expand Down
Loading