Repository navigation
fix: agent chat completions can not use - #16570
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds prompt DSL parsing and runtime prompt formatting for agent inputs, centralizes provider base URL lookup, and changes agent-canvas streaming to a flat SSE envelope with matching handler and test updates. ChangesAgent prompt parsing and runtime formatting
Agent-canvas SSE envelope changes
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
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 |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/agent/component/agent.go`:
- Line 399: The runtime prompt override checks in agent.go are treating the
schema-default user_prompt as if it were a real user-supplied prompt, which
blocks the sys.query fallback and can overwrite an existing prompts user
template. Update the logic around hasRuntimeUserPrompt, the fallback path near
the query handling, and the prompt merge path so only explicit runtime input
counts, while agentUserPromptSchemaDefault is ignored unless the user actually
provided user_prompt. Use the existing symbols hasRuntimeUserPrompt,
hasNonEmptyString, sys.query handling, and the prompts user template merge to
locate and adjust the behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2b95733d-1d65-4c40-abb0-22234b4eee5d
📒 Files selected for processing (7)
internal/agent/component/agent.gointernal/agent/component/agent_test.gointernal/agent/component/llm.gointernal/handler/agent.gointernal/handler/agent_test.gointernal/service/bot_completion.gointernal/service/bot_completion_history_test.go
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16570 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 668 668
Misses 29 29
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
### Summary As title <img width="2370" height="2039" alt="image" src="https://github.com/user-attachments/assets/4cccf543-3908-49ee-8101-c5068fbf53ec" />
### Summary As title <img width="2370" height="2039" alt="image" src="https://github.com/user-attachments/assets/4cccf543-3908-49ee-8101-c5068fbf53ec" />
Summary
As title
