-
Notifications
You must be signed in to change notification settings - Fork 2
Update config.ts #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update config.ts #14
Conversation
Signed-off-by: KhulnaSoft bot <[email protected]>
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)✅ Unit Test PR creation complete.
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 |
|
Note Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
axilo-cli/src/utils/config.ts (1)
487-495: Consider extracting the duplicated persistence logic.The YAML and JSON branches have identical logic for building the
storedobject. This duplication could be eliminated by constructing the object once before the format check.Apply this diff to reduce duplication:
const ext = extname(targetPath).toLowerCase(); + const stored: StoredConfig = { model: config.model }; + if (config.memory) stored.memory = config.memory; + if (config.fullAutoErrorMode) stored.fullAutoErrorMode = config.fullAutoErrorMode; + if (ext === ".yaml" || ext === ".yml") { - const stored: StoredConfig = { model: config.model }; - if (config.memory) stored.memory = config.memory; - if (config.fullAutoErrorMode) stored.fullAutoErrorMode = config.fullAutoErrorMode; writeFileSync(targetPath, dumpYaml(stored), "utf-8"); } else { - const stored: StoredConfig = { model: config.model }; - if (config.memory) stored.memory = config.memory; - if (config.fullAutoErrorMode) stored.fullAutoErrorMode = config.fullAutoErrorMode; writeFileSync(targetPath, JSON.stringify(stored, null, 2), "utf-8"); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
axilo-cli/src/utils/config.ts(1 hunks)
🔇 Additional comments (2)
axilo-cli/src/utils/config.ts (2)
487-495: Good fix formemoryandfullAutoErrorModepersistence.The implementation correctly addresses the data loss issue for
memoryandfullAutoErrorModefields by conditionally including them in the serialized config. The conditional logic ensures backward compatibility with configs that don't have these fields set.
487-495: The changes correctly address the missing field persistence formemoryandfullAutoErrorMode.The fix successfully adds conditional persistence for both
memoryandfullAutoErrorModein both YAML and JSON branches. However, note thatapprovalModeinStoredConfig(line 190) is not part of the load/save cycle—it's a CLI-only flag, not a runtime configuration value.AppConfig(lines 209-214) intentionally excludesapprovalMode, andloadConfigonly extractsmodel,memory, andfullAutoErrorModefrom stored config. Therefore,approvalModeis not data loss but by design.Likely an incorrect or invalid review comment.
|
Note Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
✅ UTG Post-Process Complete No new issues were detected in the generated code and all check runs have completed. The unit test generation process has completed successfully. |
|
Creating a PR to put the unit tests in... The changes have been created in this pull request: View PR |
|
✅ UTG Post-Process Complete No new issues were detected in the generated code and all check runs have completed. The unit test generation process has completed successfully. |
|
Creating a PR to put the unit tests in... The changes have been created in this pull request: View PR |
fix #4 (comment)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.