feat(opencode): unify session behavior prompt#142
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 32 seconds. ⌛ 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. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThe PR consolidates model-specific behavior prompts into a single unified PawWork base prompt used across all provider families. Model-dependent routing logic in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes 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)
Comment |
There was a problem hiding this comment.
Code Review
This pull request consolidates model-specific agent prompts into a single, unified "PawWork" persona and removes OpenCode-specific branding. The provider function in system.ts was simplified to return this unified prompt for all model families, and tests were updated to ensure consistent behavior and the removal of model-specific routing. Feedback suggests re-incorporating operational guidance regarding tool efficiency and parallelization, which was omitted during the consolidation and is important for optimizing agent performance.
0fd70db to
7ad26b8
Compare
Summary
packages/opencode/src/session/prompt.Why
Closes #130.
PawWork should behave consistently across model families. Model-specific prompt branches made behavior depend on string matching against model IDs and kept stale OpenCode-oriented behavior prompts around. This PR moves the default provider prompt path to one PawWork-owned behavior prompt and keeps model differences out of behavior instructions.
Related Issue
Closes #130
How To Verify
bun --cwd packages/opencode test test/session/system.test.ts --timeout 30000 bun --cwd packages/opencode typecheckAlso verified with static searches:
Screenshots or Recordings
Not applicable. This is a prompt/runtime behavior change with no visible UI.
Checklist
dev, and my PR title and commit messages use Conventional Commits in EnglishSummary by CodeRabbit
New Features
Refactor