Skip to content

Conversation

@DanTup
Copy link
Member

@DanTup DanTup commented Sep 25, 2025

Fixes #5725

@DanTup DanTup added this to the v3.120.0 milestone Sep 25, 2025
@DanTup DanTup added is enhancement in dtd Relates to integration with the Dart Tooling Daemon labels Sep 25, 2025
@DanTup DanTup requested a review from Copilot September 25, 2025 17:01
@DanTup
Copy link
Member Author

DanTup commented Sep 25, 2025

@codex review
/gemini review

Copy link

Copilot AI left a 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 navigateToCode service 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.

@gemini-code-assist
Copy link

Hi @DanTup, it looks like you're trying to request a code review. To trigger a new review from me, please use the /gemini review command as a comment within a pull request review, rather than in an issue comment. If you'd like me to review the changes in this pull request, please start a new review and add the command there. Thanks!

@DanTup
Copy link
Member Author

DanTup commented Sep 25, 2025

To trigger a new review from me, please use the /gemini review command as a comment within a pull request review, rather than in an issue comment.

eh? 🤔

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a 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.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@DanTup DanTup merged commit 3c0f98c into master Sep 25, 2025
2 checks passed
@DanTup DanTup deleted the add-navigate-to-code-dtd branch September 25, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in dtd Relates to integration with the Dart Tooling Daemon is enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement navigateToCode editor service

2 participants