Conversation
- Query stale-docs for precise symbol-level references (deleted, renamed, hotspot) - Keep doc-drift as supplementary heuristic signal - Fix inline state dir detection -> use getStateDirPath()
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the plugin's repository intelligence capabilities by integrating data from Phases 2, 3, and 4 of the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request enhances the sync-docs command by incorporating more detailed repository intelligence data. The changes include fetching symbol-level stale documentation references and heuristic-based document drift, which will provide more accurate and prioritized information for keeping documentation up-to-date. The refactoring to use a centralized getStateDirPath function and a safe query wrapper q for analyzer calls are excellent improvements for maintainability and robustness. I have one minor suggestion to make the string building more idiomatic.
| if (staleDocs && staleDocs.length > 0) { | ||
| repoIntelContext += '\n\nStale doc references (symbol-level - highest priority):'; | ||
| staleDocs.forEach(s => { | ||
| repoIntelContext += `\n ${s.doc}:${s.line} "${s.reference}" [${s.issue}] ${s.suggestion}`; | ||
| }); | ||
| } |
There was a problem hiding this comment.
While the current implementation is correct, using map and join is a more idiomatic and performant way to build strings from an array in JavaScript compared to using forEach with repeated string concatenation. This change would also make the code slightly more concise.
| if (staleDocs && staleDocs.length > 0) { | |
| repoIntelContext += '\n\nStale doc references (symbol-level - highest priority):'; | |
| staleDocs.forEach(s => { | |
| repoIntelContext += `\n ${s.doc}:${s.line} "${s.reference}" [${s.issue}] ${s.suggestion}`; | |
| }); | |
| } | |
| if (staleDocs && staleDocs.length > 0) { | |
| const staleDocItems = staleDocs.map(s => `\n ${s.doc}:${s.line} \"${s.reference}\" [${s.issue}] ${s.suggestion}`); | |
| repoIntelContext += '\n\nStale doc references (symbol-level - highest priority):' + staleDocItems.join(''); | |
| } |
Summary
Wire Phase 2-4 repo-intel data into plugin. Requires agent-analyzer v0.3.0.
Changes
Test plan