- shell-env: detect Git Bash via MSYSTEM env var when SHELL is unset (#3366) On some Git Bash installations SHELL is not set but MSYSTEM (MINGW64/MSYS) is always present. Check MSYSTEM before PSModulePath to avoid emitting PowerShell syntax in bash shells. - session-state: resolve legacy agent names in resolveRegisteredAgentName (#3272) Historical sessions stored agent names like 'Sisyphus (Ultraworker)' which don't match the current registered format. Fall back to getAgentConfigKey for legacy/parenthesized name resolution before returning the raw name. - config-migration: skip backup when file content is unchanged (#3222) Compare serialized config with existing file content before creating a timestamped .bak file. Only create backup when the on-disk content actually differs from the migrated content.
This commit is contained in:
@@ -52,7 +52,19 @@ export function resolveRegisteredAgentName(name: string | undefined): string | u
|
||||
}
|
||||
|
||||
const normalizedName = normalizeRegisteredAgentName(name)
|
||||
return registeredAgentAliases.get(normalizedName) ?? normalizeStoredAgentName(name)
|
||||
const directMatch = registeredAgentAliases.get(normalizedName)
|
||||
if (directMatch !== undefined) return directMatch
|
||||
|
||||
// Resolve legacy/capitalized agent names (e.g. "Sisyphus (Ultraworker)")
|
||||
// to their config key, then look up the registered alias for that key.
|
||||
const configKey = getAgentConfigKey(name)
|
||||
const normalizedConfigKey = normalizeRegisteredAgentName(configKey)
|
||||
if (normalizedConfigKey !== normalizedName) {
|
||||
const aliasMatch = registeredAgentAliases.get(normalizedConfigKey)
|
||||
if (aliasMatch !== undefined) return aliasMatch
|
||||
}
|
||||
|
||||
return normalizeStoredAgentName(name)
|
||||
}
|
||||
|
||||
/** @internal For testing only */
|
||||
|
||||
Reference in New Issue
Block a user