fix: deploy greeting template via setup.sh and include app name in greeting#421
fix: deploy greeting template via setup.sh and include app name in greeting#421marcusquinn merged 3 commits intomainfrom
Conversation
…eeting
The session greeting was missing the app name (e.g., 'in OpenCode v1.1.53')
because: 1) the template instruction was too vague ('relay ALL lines'), and
2) setup.sh never deployed the template to ~/.config/opencode/AGENTS.md.
- Make greeting parse instruction explicit with named fields ({app}, {app_version})
- Add template deploy step to inject_agents_reference() in setup.sh
- Resolves t137
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue where the session greeting lacked crucial application details. It introduces changes to ensure the greeting template is properly deployed and parsed, resulting in a more informative welcome message that includes the application's name and version. The update streamlines the process of keeping the greeting template current with the main repository. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThis PR enhances the OpenCode environment setup by introducing config-level AGENTS.md injection into Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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 |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Feb 7 04:58:30 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request addresses an issue where the session greeting was missing the application name. It does so by deploying a managed template via setup.sh and making the greeting instructions more explicit. The changes are logical and well-implemented. I have one suggestion to improve error handling in setup.sh to make the script more robust.
setup.sh
Outdated
| cp "$template_source" "$opencode_config_agents" | ||
| print_success "Deployed greeting template to $opencode_config_agents" |
There was a problem hiding this comment.
The cp command's success is not verified. If the copy operation fails (e.g., due to file permissions), the script will incorrectly report success, which could be misleading. It's better to check the exit status of the cp command to provide accurate feedback to the user.
| cp "$template_source" "$opencode_config_agents" | |
| print_success "Deployed greeting template to $opencode_config_agents" | |
| if cp "$template_source" "$opencode_config_agents"; then | |
| print_success "Deployed greeting template to $opencode_config_agents" | |
| else | |
| print_error "Failed to deploy greeting template to $opencode_config_agents" | |
| fi |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@setup.sh`:
- Around line 2703-2712: The deployment block uses an undefined SCRIPT_DIR
(uppercase) so template_source is wrong and the copy never runs; fix by either
(A) computing a local script_dir exactly like other functions (e.g., as used in
deploy_aidevops_agents and install_aidevops_cli) and replace TEMPLATE_SOURCE to
reference that lowercase script_dir, or (B) define a global SCRIPT_DIR once near
the top (next to INSTALL_DIR) using the same BASH_SOURCE resolution pattern and
then use that global SCRIPT_DIR in the deployment block to set template_source
and ensure opencode_config_agents is populated and copied.
🧹 Nitpick comments (1)
setup.sh (1)
2709-2710: Consider guarding against accidental overwrite of user customizations.Every other config-touching path in this script (e.g.,
deploy_aidevops_agents,update_opencode_config) creates a backup viacreate_backup_with_rotationbefore overwriting. This block unconditionally overwrites~/.config/opencode/AGENTS.mdwith no backup and no diff check. If a user has customized their config-levelAGENTS.md, their changes are silently lost on everyaidevops update.♻️ Add a lightweight guard or backup
if [[ -d "$opencode_config_dir" && -f "$template_source" ]]; then + if [[ -f "$opencode_config_agents" ]]; then + # Skip if already identical (avoids unnecessary backup churn) + if ! diff -q "$template_source" "$opencode_config_agents" &>/dev/null; then + create_backup_with_rotation "$opencode_config_agents" "opencode-agents" + fi + fi cp "$template_source" "$opencode_config_agents" print_success "Deployed greeting template to $opencode_config_agents" fi
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Feb 7 05:01:03 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
…re overwrite Address CodeRabbit review feedback: - SCRIPT_DIR was undefined; use global INSTALL_DIR (set at line 25) - Add backup with rotation before overwriting user customizations - Skip backup if template is already identical (avoids churn)
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Feb 7 05:05:06 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Summary
{app},{app_version}) matching the script output formatinject_agents_reference()in setup.sh so~/.config/opencode/AGENTS.mdstays in sync with the repo template on everyaidevops updateBefore: "We're running https://aidevops.sh v2.105.0."
After: "We're running https://aidevops.sh v2.105.0 in OpenCode v1.1.53."
Resolves t137.
Summary by CodeRabbit
Release Notes