-
Notifications
You must be signed in to change notification settings - Fork 246
Feature: graph tool #169
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
base: main
Are you sure you want to change the base?
Feature: graph tool #169
Conversation
- Graph exists + function found/not found - Creation progress tracking and timeout handling - Background graph creation with API integration - Input validation and error handling - Multi-repo independence and stale lock cleanup
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.
Pull Request Overview
This PR introduces a new tool fetchUsageCodeExamples
that uses a code graph to find and return usage examples for a given function in the repository.
- Imports and utility functions for graph operations (
graphTools.js
) and GitHub fetching - Implements
fetchUsageCodeExamples
inDefaultRepoHandler.ts
, handling graph creation, progress reporting, timeouts, and example formatting - Updates test descriptions, adds the
falkordb
dependency, and extends the.env.example
with code graph configuration
Reviewed Changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/api/tools/repoHandlers/DefaultRepoHandler.ts | Added fetchUsageCodeExamples tool, graph service imports, and logic |
src/api/tools/index.test.ts | Registered fetchUsageCodeExamples in tests (descriptions only) |
package.json | Added falkordb dependency |
.env.example | Added environment variables for code graph server and config |
Comments suppressed due to low confidence (1)
src/api/tools/index.test.ts:70
- The new
fetchUsageCodeExamples
tool is registered but no unit tests are validating its behavior. Consider adding tests for success, empty results, and error/timeouts scenarios.
{
functionName: z | ||
.string() | ||
.describe("Name of the function to find who calls it"), | ||
// limit: z.number().optional().default(10).describe("Max number of calling functions to return") |
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.
The limit
parameter is commented out in paramsSchema
, so the default value in the callback will never be applied. Uncomment or add a limit: z.number().optional().default(10)
entry to ensure it's validated.
// limit: z.number().optional().default(10).describe("Max number of calling functions to return") | |
limit: z.number().optional().default(10).describe("Max number of calling functions to return"), |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.