-
-
Notifications
You must be signed in to change notification settings - Fork 23
feat: add uv code action. #1157
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
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 adds code action functionality to the tombi-extension-uv
extension, enabling intelligent workspace dependency management for uv-based Python projects. The implementation provides two complementary code actions that help developers maintain consistent dependency versions across workspace members.
Key changes:
- Introduced two refactoring code actions: "Use Workspace Dependency" (for existing workspace dependencies) and "Add to Workspace and Use Workspace Dependency" (for new dependencies)
- Added comprehensive test coverage for dependency parsing, formatting, insertion logic, and both code action scenarios
- Integrated new dependencies (
tombi-version-sort
andtracing
) to support alphabetical sorting and logging
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
extensions/tombi-extension-uv/src/lib.rs | Exports the new code_action module and function |
extensions/tombi-extension-uv/src/code_action.rs | Implements workspace dependency code actions with parsing, formatting, and edit generation logic |
extensions/tombi-extension-uv/Cargo.toml | Adds required dependencies for version sorting and tracing |
AGENTS.md | Documents the active specification for uv workspace dependency code actions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…r dependency parsing
… loading functions
… comments and formatting
…ve insertion formatting
…ducing completion-specific text edit
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
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
let (last_value, last_comma) = values_with_comma.last()?; | ||
if let Some(last_comma) = last_comma { | ||
let insert_pos = last_comma.range().end; | ||
let new_text = format!("\n{}, ", new_element.to_string()); |
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.
Inconsistent trailing space after comma. Other insertions use \n
without a trailing space. Consider changing to format!(\"\\n{},\\n\", new_element.to_string())
for consistency with line 195.
let new_text = format!("\n{}, ", new_element.to_string()); | |
let new_text = format!("\n{},\n", new_element.to_string()); |
Copilot uses AI. Check for mistakes.
…struct for completion feature
…le parsing; update TextEdit module import
…proper comma placement
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
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.