-
Notifications
You must be signed in to change notification settings - Fork 340
Implement the navigateToCode method for DTD #5726
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
Conversation
|
@codex review |
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 implements the navigateToCode method for the Dart Tooling Daemon (DTD) to allow navigation to specific code locations, addressing issue #5725.
- Adds the
navigateToCodeservice method to the Editor service in DTD - Implements error handling for unsupported URI schemes (non-file schemes)
- Adds comprehensive test coverage for both successful navigation and error cases
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/shared/services/tooling_daemon_services.ts | Adds NavigateToCodeParams interface and editorNavigateToCode service method definition |
| src/shared/services/tooling_daemon.ts | Updates service registration and method calling signatures, adds error handling wrapper |
| src/extension/dart/tooling_daemon.ts | Implements the navigateToCode service handler with URI scheme validation |
| src/test/dart/tooling_daemon/tooling_daemon.test.ts | Adds tests for successful navigation and unsupported URI scheme error handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Hi @DanTup, it looks like you're trying to request a code review. To trigger a new review from me, please use the |
eh? 🤔 /gemini review |
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.
Code Review
This pull request implements the navigateToCode method for the Dart Tooling Daemon, allowing external tools to request navigation to a specific code location in the editor. The implementation correctly handles file:// URIs and rejects others. A significant improvement is the addition of a try-catch block for handling service requests, which enhances the robustness of the DTD by preventing unhandled exceptions from crashing the service. The new tests adequately cover both the success and error cases for the new functionality. My feedback includes a minor simplification to the error logging logic.
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting |
Fixes #5725