fix: address issues from PR #2 merge#7
Conversation
📝 WalkthroughWalkthroughAdds JSON unmarshaling to migrate legacy flat API config fields into the new env map, fixes JSON-building and format-string bugs, removes an unused parameter from SetEnvironmentVarsWithConfig and updates its call sites, and adjusts import/logging ordering. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@copilot |
- Add backward-compatible config migration via custom UnmarshalJSON, so old flat-field configs (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN) are automatically migrated to the new env map format - Fix JSON injection in TestAPIConfig by using json.Marshal instead of fmt.Sprintf for building the request body - Fix format string bugs in RunConfigSet/RunConfigGet where %s was never substituted in ui.ShowError calls - Remove unused cfg parameter from SetEnvironmentVarsWithConfig - Fix import ordering in cobra.go - Replace log.Printf with fmt.Fprintf for consistent logging style Fixes #4, Fixes #5, Fixes #6
d1a08e5 to
e5f93f0
Compare
Summary
UnmarshalJSON— old flat-field configs are auto-migrated to the newenvmap formatTestAPIConfigby replacingfmt.Sprintfwithjson.MarshalRunConfigSet/RunConfigGetwhere%swas never substitutedcfgparameter fromSetEnvironmentVarsWithConfigcobra.golog.Printfwithfmt.Fprintffor consistent logging styleTest plan
codes testworks with model names containing special characterscodes config get invalidkeyshows the key name in error messagego build ./...passesFixes #4, Fixes #5, Fixes #6
🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Bug Fixes