Fix: _process_result always returns truncated result regardless of size#868
Fix: _process_result always returns truncated result regardless of size#868manvibuilds wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe pull request fixes a critical bug in the ChangesResult Processing Fix
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
|
The failing tests aren't related to this fix they're all throwing FileNotFoundError for a missing linear/issue_detail.json test data file, which seems like a pre-existing issue in the repo. My change only touches the legacy tool file. which passes all the test. |
Fixes #724
Problem
_process_resultinGetCodeFromNodeIdToolwas always returningtruncated_resulteven for results under 80,000 characters. This meantAI agents were receiving unnecessarily truncated responses instead of
the full result.
Fix
Return the original
resultwhen it's under the 80,000 character limit,and only return
truncated_resultwhen truncation is actually needed.Changes
legacy/app/modules/intelligence/tools/kg_based_tools/get_code_from_node_id_tool.pyreturn resultfor the normal (under size limit) casereturn truncated_resultinside theifblock where it belongs