Skip to content

Review PR #14: Add file move/rename/copy tools - #16

Closed
juehang with Copilot wants to merge 1 commit into
masterfrom
copilot/review-pr-14
Closed

juehang with Copilot wants to merge 1 commit into
masterfrom
copilot/review-pr-14

Conversation

Copilot AI commented Jan 7, 2026 •

Copy link
Copy Markdown
Contributor

Code review of PR #14 which adds move_file_code, rename_file_code, and copy_file_code tools to the VS Code MCP Server.

Review Summary

Assessment: Good PR with minor issues

Strengths

  • Useful feature leveraging VS Code's WorkspaceEdit for automatic import path updates
  • Consistent implementation following existing patterns
  • Proper documentation updates

Issues Found

Error handling bug in copy_file_code (lines 396-399):

try {
    await vscode.workspace.fs.stat(targetUri);
    if (!overwrite) {
        throw new Error(`Target file ${targetPath} already exists...`);
    }
} catch (error) {
    // Target doesn't exist, which is fine  ← Swallows ALL errors
}

This silently swallows permission errors, network issues, etc.

Documentation mismatch: copy_file_code description claims "WorkspaceEdit API" but uses workspace.fs.readFile/writeFile

Directory limitation: Unlike move/rename, copy won't work for directories—should document or fix

Minor: Missing newline at EOF, no tests added

Original prompt

Can you review PR #14 and let me know how it looks? Thanks!


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Review pull request #14 for changes Review PR #14: Add file move/rename/copy tools Jan 7, 2026
Copilot AI requested a review from juehang January 7, 2026 14:28
@juehang juehang closed this Jan 7, 2026
@juehang
juehang deleted the copilot/review-pr-14 branch January 7, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants