wcgw 5.1.1__tar.gz → 5.1.2__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.
Potentially problematic release.
This version of wcgw might be problematic. Click here for more details.
- {wcgw-5.1.1 → wcgw-5.1.2}/PKG-INFO +1 -1
- {wcgw-5.1.1 → wcgw-5.1.2}/pyproject.toml +1 -1
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/tools.py +12 -10
- {wcgw-5.1.1 → wcgw-5.1.2}/uv.lock +1 -1
- {wcgw-5.1.1 → wcgw-5.1.2}/.github/workflows/python-publish.yml +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/.github/workflows/python-tests.yml +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/.github/workflows/python-types.yml +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/.gitignore +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/.gitmodules +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/.python-version +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/.vscode/settings.json +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/CLAUDE.md +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/Dockerfile +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/LICENSE +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/README.md +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/__init__.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/__init__.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/bash_state/bash_state.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/bash_state/parser/__init__.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/bash_state/parser/bash_statement_parser.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/common.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/diff-instructions.txt +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/encoder/__init__.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/file_ops/diff_edit.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/file_ops/extensions.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/file_ops/search_replace.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/mcp_server/Readme.md +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/mcp_server/__init__.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/mcp_server/server.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/memory.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/modes.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/repo_ops/display_tree.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/repo_ops/file_stats.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/repo_ops/path_prob.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/repo_ops/paths_model.vocab +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/repo_ops/paths_tokens.model +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/repo_ops/repo_context.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/client/tool_prompts.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/py.typed +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw/types_.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw_cli/__init__.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw_cli/__main__.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw_cli/anthropic_client.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw_cli/cli.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw_cli/openai_client.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/src/wcgw_cli/openai_utils.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/static/claude-ss.jpg +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/static/computer-use.jpg +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/static/example.jpg +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/static/rocket-icon.png +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/static/ss1.png +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/static/workflow-demo.gif +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/tests/test_bash_parser.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/tests/test_bash_parser_complex.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/tests/test_edit.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/tests/test_file_range_tracking.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/tests/test_mcp_server.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/tests/test_readfiles.py +0 -0
- {wcgw-5.1.1 → wcgw-5.1.2}/tests/test_tools.py +0 -0
|
@@ -475,7 +475,7 @@ def get_context_for_errors(
|
|
|
475
475
|
ntokens = len(default_enc.encoder(context))
|
|
476
476
|
if ntokens > max_tokens:
|
|
477
477
|
return "Please re-read the file to understand the context"
|
|
478
|
-
return f"Here's relevant snippet from the file where the syntax errors occured:\n
|
|
478
|
+
return f"Here's relevant snippet from the file where the syntax errors occured:\n<snippet>\n{context}\n</snippet>"
|
|
479
479
|
|
|
480
480
|
|
|
481
481
|
def write_file(
|
|
@@ -556,7 +556,7 @@ def write_file(
|
|
|
556
556
|
return (
|
|
557
557
|
(
|
|
558
558
|
msg
|
|
559
|
-
+ f"Here's the existing file:\n
|
|
559
|
+
+ f"Here's the existing file:\n<wcgw:file>\n{file_content_str}\n{final_message}\n</wcgw:file>"
|
|
560
560
|
),
|
|
561
561
|
{path_: file_ranges},
|
|
562
562
|
)
|
|
@@ -578,7 +578,7 @@ def write_file(
|
|
|
578
578
|
return (
|
|
579
579
|
(
|
|
580
580
|
msg
|
|
581
|
-
+ f"Here's the existing file:\n
|
|
581
|
+
+ f"Here's the existing file:\n<wcgw:file>\n{file_content_str}\n</wcgw:file>\n{final_message}"
|
|
582
582
|
),
|
|
583
583
|
{path_: file_ranges},
|
|
584
584
|
)
|
|
@@ -1164,25 +1164,27 @@ def read_files(
|
|
|
1164
1164
|
continue
|
|
1165
1165
|
|
|
1166
1166
|
if coding_max_tokens:
|
|
1167
|
-
coding_max_tokens = coding_max_tokens - tokens
|
|
1167
|
+
coding_max_tokens = max(0, coding_max_tokens - tokens)
|
|
1168
1168
|
if noncoding_max_tokens:
|
|
1169
|
-
noncoding_max_tokens = noncoding_max_tokens - tokens
|
|
1169
|
+
noncoding_max_tokens = max(0, noncoding_max_tokens - tokens)
|
|
1170
1170
|
|
|
1171
1171
|
range_formatted = range_format(start_line_num, end_line_num)
|
|
1172
|
-
message += f
|
|
1172
|
+
message += f'\n<wcgw:file path="{file}{range_formatted}">\n{content}\n'
|
|
1173
1173
|
|
|
1174
|
-
|
|
1174
|
+
if not truncated:
|
|
1175
|
+
message += "</wcgw:file>"
|
|
1176
|
+
|
|
1177
|
+
# Check if we've hit both token limit
|
|
1175
1178
|
if (
|
|
1176
1179
|
truncated
|
|
1177
1180
|
or (coding_max_tokens is not None and coding_max_tokens <= 0)
|
|
1178
|
-
|
|
1181
|
+
and (noncoding_max_tokens is not None and noncoding_max_tokens <= 0)
|
|
1179
1182
|
):
|
|
1180
1183
|
not_reading = file_paths[i + 1 :]
|
|
1181
1184
|
if not_reading:
|
|
1182
1185
|
message += f"\nNot reading the rest of the files: {', '.join(not_reading)} due to token limit, please call again"
|
|
1183
1186
|
break
|
|
1184
|
-
|
|
1185
|
-
message += "```"
|
|
1187
|
+
|
|
1186
1188
|
return message, file_ranges_dict, truncated
|
|
1187
1189
|
|
|
1188
1190
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|