Skip to content

Conversation

@lixiaoyang1992
Copy link
Contributor

@lixiaoyang1992 lixiaoyang1992 commented Nov 11, 2025

Description

Function createNewGlobalRuleFile need fileUri to be uri, not path.

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Summary by cubic

Fixed path-to-URI conversion in createNewGlobalRuleFile by using localPathToUri for the global directory, ensuring rules are created with a proper URI and preventing path-related errors.

Written for commit 71e22ab. Summary will update automatically on new commits.

Copilot AI review requested due to automatic review settings November 11, 2025 06:21
@lixiaoyang1992 lixiaoyang1992 requested a review from a team as a code owner November 11, 2025 06:21
@lixiaoyang1992 lixiaoyang1992 requested review from tingwai and removed request for a team November 11, 2025 06:21
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Nov 11, 2025
Copilot finished reviewing on behalf of lixiaoyang1992 November 11, 2025 06:22
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 fixes a bug in the createNewGlobalRuleFile function where a local file system path was being passed to URI-based functions. The fix converts the global directory path to a URI format before passing it to joinPathsToUri.

Key changes:

  • Added import for localPathToUri utility function
  • Updated createNewGlobalRuleFile to convert the global path to URI format before use
  • Reordered imports alphabetically
Comments suppressed due to low confidence (1)

core/config/workspace/workspaceBlocks.ts:187

  • The catch block is redundant as it only re-throws the error without adding any additional context or handling. Since the try-catch doesn't provide any value, consider removing it entirely.
  } catch (error) {
    throw error;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant