skydeckai-code 0.1.31__tar.gz → 0.1.32__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/PKG-INFO +1 -1
  2. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/pyproject.toml +1 -1
  3. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/file_tools.py +34 -4
  4. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/.gitignore +0 -0
  5. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/Dockerfile +0 -0
  6. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/LICENSE +0 -0
  7. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/README.md +0 -0
  8. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/screenshots/skydeck_ai_helper.png +0 -0
  9. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/smithery.yaml +0 -0
  10. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/__init__.py +0 -0
  11. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/cli.py +0 -0
  12. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/server.py +0 -0
  13. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/__init__.py +0 -0
  14. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/base.py +0 -0
  15. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/code_analysis.py +0 -0
  16. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/code_execution.py +0 -0
  17. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/code_tools.py +0 -0
  18. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/directory_tools.py +0 -0
  19. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/get_active_apps_tool.py +0 -0
  20. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/get_available_windows_tool.py +0 -0
  21. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/git_tools.py +0 -0
  22. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/image_tools.py +0 -0
  23. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/lint_tools.py +0 -0
  24. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/other_tools.py +0 -0
  25. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/path_tools.py +0 -0
  26. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/screenshot_tool.py +0 -0
  27. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/state.py +0 -0
  28. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/system_tools.py +0 -0
  29. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/src/aidd/tools/web_tools.py +0 -0
  30. {skydeckai_code-0.1.31 → skydeckai_code-0.1.32}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skydeckai-code
3
- Version: 0.1.31
3
+ Version: 0.1.32
4
4
  Summary: This MCP server provides a comprehensive set of tools for AI-driven Development workflows including file operations, code analysis, code linting, multi-language execution, Git operations, web content fetching with HTML-to-markdown conversion, multi-engine web search, code content searching, and system information retrieval.
5
5
  Project-URL: Homepage, https://github.com/skydeckai/skydeckai-code
6
6
  Project-URL: Repository, https://github.com/skydeckai/skydeckai-code
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "skydeckai-code"
3
- version = "0.1.31"
3
+ version = "0.1.32"
4
4
  description = "This MCP server provides a comprehensive set of tools for AI-driven Development workflows including file operations, code analysis, code linting, multi-language execution, Git operations, web content fetching with HTML-to-markdown conversion, multi-engine web search, code content searching, and system information retrieval."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -822,11 +822,41 @@ async def apply_file_edits(file_path: str, edits: List[dict], dry_run: bool = Fa
822
822
  start, end, confidence = find_best_match(working_content, search_text, partial_match)
823
823
 
824
824
  if confidence >= 0.8:
825
- # Always preserve indentation of first line
825
+ # Fix indentation while preserving relative structure
826
826
  if start >= 0:
827
- indent = re.match(r'^\s*', modified_content[start:].splitlines()[0]).group(0)
828
- replacement = '\n'.join(indent + line.lstrip()
829
- for line in new_text.splitlines())
827
+ # Get the indentation of the first line of the matched text
828
+ base_indent = re.match(r'^\s*', modified_content[start:].splitlines()[0]).group(0)
829
+
830
+ # Split the new text into lines
831
+ new_lines = new_text.splitlines()
832
+
833
+ # If there are multiple lines, adjust indentation while preserving structure
834
+ if len(new_lines) > 1:
835
+ # Find the minimum indentation level in the new text (ignoring empty lines)
836
+ non_empty_lines = [line for line in new_lines if line.strip()]
837
+ if non_empty_lines:
838
+ min_indent_length = min(len(re.match(r'^\s*', line).group(0)) for line in non_empty_lines)
839
+ else:
840
+ min_indent_length = 0
841
+
842
+ # Process each line to preserve relative indentation
843
+ processed_lines = []
844
+ for line in new_lines:
845
+ if line.strip(): # If line is not empty
846
+ # Get current indentation
847
+ current_indent = re.match(r'^\s*', line).group(0)
848
+ # Calculate relative indentation
849
+ relative_indent = len(current_indent) - min_indent_length
850
+ # Apply base indent plus relative indent
851
+ processed_lines.append(base_indent + ' ' * relative_indent + line.lstrip())
852
+ else:
853
+ # For empty lines, just use base indentation
854
+ processed_lines.append(base_indent)
855
+
856
+ replacement = '\n'.join(processed_lines)
857
+ else:
858
+ # Single line - just use base indentation
859
+ replacement = base_indent + new_text.lstrip()
830
860
  else:
831
861
  replacement = new_text
832
862
 
File without changes
File without changes