-
-
Notifications
You must be signed in to change notification settings - Fork 705
feat: integrate Context7 MCP documentation search functionality in coder #1141
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
Open
Hoder-zyf
wants to merge
30
commits into
main
Choose a base branch
from
yifei/context7
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
4fee7e6
add prompt in pipeline_eval, parameter to control and more required …
Hoder-zyf cdb4902
init commit, enable mcp first try(not done yet)
Hoder-zyf d117c66
remove unused things
Hoder-zyf d24ad8a
update config and keys to include error message(prompt for error_mess…
Hoder-zyf 13bb813
update error message prompt
Hoder-zyf c52553a
solve error_message; config load
Hoder-zyf 0bbdee8
make lint and translate; TODOS:
Hoder-zyf ca64f3e
feat: add CoSTEERSingleFeedback.merge and refactor multi evaluator
you-n-g c17e31c
test version not done yet
Hoder-zyf d1e6687
complete call logic
Hoder-zyf 31813c7
clear unnecessary codes
Hoder-zyf 521e517
add speical case for timm library
Hoder-zyf 0133ef1
Merge branch 'main' into yifei/context7
Hoder-zyf 233e81e
Merge branch 'main' into yifei/context7
Hoder-zyf 4fdc054
make auto-lint
Hoder-zyf b3ee31c
add ui config
Hoder-zyf 329ed42
lint
Hoder-zyf b0ef22a
Merge branch 'main' into yifei/context7
Hoder-zyf 4a0a29f
lint
Hoder-zyf 6bcd6da
add full code and refine prompt
Hoder-zyf 09f44d8
Merge branch 'main' into yifei/context7
Hoder-zyf aba3f2b
change displayed packages(experimental)
Hoder-zyf 494c52e
fix a small bug
Hoder-zyf fd00fb2
refactor to the origin package_info
Hoder-zyf fd897b6
Merge branch 'main' into yifei/context7
Hoder-zyf 222eefe
make lint and merge main 0807
Hoder-zyf 75fcb6a
Merge branch 'main' into yifei/context7
Hoder-zyf a3da121
Merge branch 'main' into yifei/context7
Hoder-zyf 6a21e13
Merge branch 'main' into yifei/context7
Hoder-zyf 5a4424c
Merge branch 'main' into yifei/context7
Hoder-zyf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,4 +177,4 @@ rdagent/app/benchmark/factor/example.json | |
|
||
# UI Server resources | ||
videos/ | ||
static/ | ||
static/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,10 +232,15 @@ pipeline_eval: | |
- Notes: | ||
- Model performance is not evaluated in this step; focus solely on successful execution. | ||
- Warnings are acceptable if they do not interfere with successful code execution. | ||
- **Environment Constraint**: The coding environment is fixed and pre-configured. No package installation or modification is allowed. Code must use only existing pre-installed packages. | ||
- If the code execute successfully: | ||
- Proceed to Step 2. | ||
- Proceed to Step 2 and overlook the remaining steps in Step 1. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Step 2 and Step 1 is missing |
||
- If the code does not execute successfully: | ||
- Set the "final_decision" to false and write complete analysis in the "execution" field. | ||
- Set the "final_decision" to false. | ||
{% if enable_context7 %} | ||
- Given that my package/environment is fixed and unchangeable, first you should go through the code and the execution output,if the problem could be solved by looking up the official documentation to confirm feature/API availability, compatible usage, or official alternatives in the fixed environment, set the "requires_documentation_search" to true. | ||
{% endif %} | ||
- Write complete analysis in the "execution" field. | ||
|
||
### Competition Alignment | ||
- Goal: Confirm strict adherence to the competition's evaluation rules and experimental setup. | ||
|
@@ -309,9 +314,13 @@ pipeline_eval: | |
Please respond with your feedback in the following JSON format without anything else. | ||
```json | ||
{ | ||
{% if enable_context7 %} | ||
"requires_documentation_search": <true/false>, | ||
{% endif %} | ||
"execution": "Describe whether the code executed successfully. Include any errors or issues encountered, and append all error messages and full traceback details without summarizing or omitting any information. If errors occurred, analyze the root causes: (1) Are they fundamental algorithmic/approach issues, or (2) Implementation details that can be easily fixed, or (3) Environment/dependency problems?", | ||
"return_checking": "Examine the generated files by cross-referencing the code logic and stdout output. Verify: (1) Format matches required submission format (index, column names, CSV content); (2) **File generation authenticity**: Is the file genuinely produced by successful model execution, or is it a result of exception handling/fallback mechanisms? Cite specific code sections and stdout evidence.", | ||
"code": "Begin explicitly with [Code analysis] or [Evaluation error]. Provide structured analysis: (1) **Technical Appropriateness**: Does the chosen approach (algorithms, data processing, validation strategy) match this problem's data characteristics and competition requirements? (2) **Effective Components**: What specific parts work well and why are they effective for this problem type? (3) **Issues & Improvements**: Identify concrete problems and suggest actionable improvement directions (without providing actual code). (4) **Code Quality**: Assess readability, structure, and adherence to specifications.", | ||
"error_message": "If the code execution has problems, extract the error information in the following format, otherwise set to empty string: ### TRACEBACK: <full relevant traceback extracted from execution output> ### SUPPLEMENTARY_INFO: <only if TRACEBACK is unclear - copy exact code fragments: import statements, variable=value assignments, function calls with parameters as they appear in code>", | ||
"final_decision": <true/false> | ||
} | ||
``` | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"""MCP (Model Context Protocol) integration for RD-Agent. | ||
|
||
This module provides context7 functionality for documentation search. | ||
""" | ||
|
||
from .context7 import query_context7 | ||
|
||
__all__ = ["query_context7"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
would
enable_api_doc_agent
be a more understandable and general name?