skydeckai-code 0.1.31__py3-none-any.whl → 0.1.33__py3-none-any.whl
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.
- aidd/tools/file_tools.py +34 -4
- {skydeckai_code-0.1.31.dist-info → skydeckai_code-0.1.33.dist-info}/METADATA +1 -1
- {skydeckai_code-0.1.31.dist-info → skydeckai_code-0.1.33.dist-info}/RECORD +6 -6
- {skydeckai_code-0.1.31.dist-info → skydeckai_code-0.1.33.dist-info}/WHEEL +0 -0
- {skydeckai_code-0.1.31.dist-info → skydeckai_code-0.1.33.dist-info}/entry_points.txt +0 -0
- {skydeckai_code-0.1.31.dist-info → skydeckai_code-0.1.33.dist-info}/licenses/LICENSE +0 -0
aidd/tools/file_tools.py
CHANGED
@@ -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
|
-
#
|
825
|
+
# Fix indentation while preserving relative structure
|
826
826
|
if start >= 0:
|
827
|
-
|
828
|
-
|
829
|
-
|
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
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: skydeckai-code
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.33
|
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
|
@@ -7,7 +7,7 @@ aidd/tools/code_analysis.py,sha256=fDpm2o_If5PsngXzHN2-ezSkPVT0ZxivLuzmHrOAmVU,3
|
|
7
7
|
aidd/tools/code_execution.py,sha256=dIPxHBtclsetDZY4jGlSBrw_t-7VlIVrK8mflnZ6c4w,13176
|
8
8
|
aidd/tools/code_tools.py,sha256=3CgkQ78iVKMd5j8aLmolLp4c59seD42Qw6VbdUcg2wA,12628
|
9
9
|
aidd/tools/directory_tools.py,sha256=Hxzge_ziYw_FsjYb5yF0R0dHEdvuWRsg7WsdYDG0AUg,12971
|
10
|
-
aidd/tools/file_tools.py,sha256
|
10
|
+
aidd/tools/file_tools.py,sha256=-OQHFCL_r1TI16-xBrwKfhzHKFgG965Jr0tAmZ9mKbI,44137
|
11
11
|
aidd/tools/get_active_apps_tool.py,sha256=BjLF7iXSDgyAmm_gfFgAul2Gn3iX-CNVYHM7Sh4jTAI,19427
|
12
12
|
aidd/tools/get_available_windows_tool.py,sha256=OVIYhItTn9u_DftOr3vPCT-R0DOFvMEEJXA6tD6gqWQ,15952
|
13
13
|
aidd/tools/git_tools.py,sha256=AgolgrZnpN2NALV7SfIwc6D7U7tdPrPTSFmU2WjPfVE,39846
|
@@ -19,8 +19,8 @@ aidd/tools/screenshot_tool.py,sha256=NMO5B4UG8qfMEOMRd2YoOjtwz_oQ2y1UAGU22jV1yGU
|
|
19
19
|
aidd/tools/state.py,sha256=RWSw0Jfsui8FqC0xsI7Ik07tAg35hRwLHa5xGBVbiI4,1493
|
20
20
|
aidd/tools/system_tools.py,sha256=H4_qveKC2HA7SIbi-j4vxA0W4jYh2wfu9A6ni5wkZyA,7249
|
21
21
|
aidd/tools/web_tools.py,sha256=gdsj2DEVYb_oYChItK5I1ugt2w25U7IAa5kEw9q6MVg,35534
|
22
|
-
skydeckai_code-0.1.
|
23
|
-
skydeckai_code-0.1.
|
24
|
-
skydeckai_code-0.1.
|
25
|
-
skydeckai_code-0.1.
|
26
|
-
skydeckai_code-0.1.
|
22
|
+
skydeckai_code-0.1.33.dist-info/METADATA,sha256=A6GW23kgHoIYmXE6PprPle8td2N90twFXd5ptuguNfI,32850
|
23
|
+
skydeckai_code-0.1.33.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
24
|
+
skydeckai_code-0.1.33.dist-info/entry_points.txt,sha256=cT-IHh3_ioGLk3kwIeqj1X6Li1dnJinX9qKWUl7nOLg,80
|
25
|
+
skydeckai_code-0.1.33.dist-info/licenses/LICENSE,sha256=uHse04vmI6ZjW7TblegFl30X-sDyyF0-QvH8ItPca3c,10865
|
26
|
+
skydeckai_code-0.1.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|