fix(plugin): propagate project_dir to callers and fix HistoryDB default path (#1230)#1235
Merged
Merged
Conversation
…lt path (#1230) - Fix HistoryDB.__init__: use self._db_path instead of db_path (None) in sqlite3.connect() - Pass project_dir=cwd to is_mcp_available() in prompt_injection.py - Pass project_dir=os.getcwd() to is_mcp_available() in user-prompt-submit.py - Pass self._project_dir to detect_runtime_mode() in health_check.py - Extend check_mcp_connection() to check settings.json and project .mcp.json - Add tests for HistoryDB default constructor and health_check project .mcp.json Closes #1230
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
commented
Apr 3, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
✅ Review complete — all comments addressed
Code Review:
history_db.pyL39:db_path→self._db_path— critical bug fix, HistoryDB() default constructor now worksprompt_injection.py:is_mcp_available(project_dir=cwd)— cwd already available in method signatureuser-prompt-submit.py:is_mcp_available(project_dir=os.getcwd())health_check.pycheck_mcp_connection(): now checks 3 locations (mcp.json, settings.json, project .mcp.json)health_check.pycheck_runtime_mode(): passesself._project_dir- Tests: HistoryDB default constructor test, health_check project .mcp.json detection
- CI: 28/28 checks pass
LGTM
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
HistoryDB.__init__:sqlite3.connect(db_path)→sqlite3.connect(self._db_path)— default constructor was passingNoneto SQLiteproject_dirtois_mcp_available()inprompt_injection.pyanduser-prompt-submit.pyself._project_dirtodetect_runtime_mode()inhealth_check.pycheck_mcp_connection()to checksettings.jsonand project.mcp.jsonin addition tomcp.jsonTest plan
Closes #1230