fix: retain original agent keys in remapAgentKeysToDisplayNames#1924
fix: retain original agent keys in remapAgentKeysToDisplayNames#1924Wongbuer wants to merge 1 commit intocode-yeongyu:devfrom
Conversation
remapAgentKeysToDisplayNames was dropping original keys (e.g. 'prometheus') and only keeping display names (e.g. 'Prometheus (Plan Builder)'). Upstream opencode's Agent.get() does a direct dict lookup by original key, causing undefined → TypeError crash. Now both display name and original key are preserved. Fixes code-yeongyu#1922
|
Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA). To sign the CLA, please comment on this PR with: This is a one-time requirement. Once signed, all your future contributions will be automatically accepted. I have read the CLA Document and I hereby sign the CLA Wongbuer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Changes only add preservation of original keys alongside display names, no regression risk detected by review.
Summary
remapAgentKeysToDisplayNames()dropping original agent keys, which causes upstream opencode'sAgent.get()to returnundefined→TypeError: undefined is not an object (evaluating 'agent.name')Fixes #1922
Summary by cubic
Preserves original agent keys when remapping to display names so Agent.get() can look up by the original key without crashing. The agent map now contains both the display name and original key for each known agent.
Written for commit 9965549. Summary will update on new commits.