code-puppy 0.0.87__tar.gz → 0.0.89__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.
- {code_puppy-0.0.87 → code_puppy-0.0.89}/PKG-INFO +1 -1
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/models.json +1 -1
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/command_runner.py +0 -3
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/file_operations.py +11 -2
- {code_puppy-0.0.87 → code_puppy-0.0.89}/pyproject.toml +1 -1
- {code_puppy-0.0.87 → code_puppy-0.0.89}/.gitignore +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/LICENSE +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/README.md +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/__init__.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/agent.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/agent_prompts.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/__init__.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/file_path_completion.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/meta_command_handler.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/model_picker_completion.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/motd.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/utils.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/config.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/main.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/message_history_processor.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/model_factory.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/state_management.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/summarization_agent.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/token_utils.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/__init__.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/common.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/file_modifications.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/tools/token_check.py +0 -0
- {code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/version_checker.py +0 -0
|
@@ -57,9 +57,6 @@ def _kill_process_group(proc: subprocess.Popen) -> None:
|
|
|
57
57
|
proc.kill()
|
|
58
58
|
except Exception:
|
|
59
59
|
pass
|
|
60
|
-
# On Windows, restore terminal state after killing process
|
|
61
|
-
if hasattr(signal, "CTRL_C_EVENT"):
|
|
62
|
-
os.kill(proc.pid, signal.CTRL_C_EVENT)
|
|
63
60
|
return
|
|
64
61
|
|
|
65
62
|
# POSIX
|
|
@@ -25,6 +25,7 @@ class ListedFile(BaseModel):
|
|
|
25
25
|
|
|
26
26
|
class ListFileOutput(BaseModel):
|
|
27
27
|
files: List[ListedFile]
|
|
28
|
+
error: str | None = None
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
def _list_files(
|
|
@@ -270,7 +271,7 @@ def _grep(context: RunContext, search_string: str, directory: str = ".") -> Grep
|
|
|
270
271
|
**{
|
|
271
272
|
"file_path": file_path,
|
|
272
273
|
"line_number": line_number,
|
|
273
|
-
"line_content": line_content.rstrip("\n\r"),
|
|
274
|
+
"line_content": line_content.rstrip("\n\r")[2048:],
|
|
274
275
|
}
|
|
275
276
|
)
|
|
276
277
|
matches.append(match_info)
|
|
@@ -311,7 +312,15 @@ def _grep(context: RunContext, search_string: str, directory: str = ".") -> Grep
|
|
|
311
312
|
def list_files(
|
|
312
313
|
context: RunContext, directory: str = ".", recursive: bool = True
|
|
313
314
|
) -> ListFileOutput:
|
|
314
|
-
|
|
315
|
+
list_files_output = _list_files(context, directory, recursive)
|
|
316
|
+
tokenizer = get_tokenizer()
|
|
317
|
+
num_tokens = len(tokenizer.encode(list_files_output.model_dump_json()))
|
|
318
|
+
if num_tokens > 10000:
|
|
319
|
+
return ListFileOutput(
|
|
320
|
+
files=[],
|
|
321
|
+
error="Too many files - tokens exceeded. Try listing non-recursively"
|
|
322
|
+
)
|
|
323
|
+
return list_files_output
|
|
315
324
|
|
|
316
325
|
|
|
317
326
|
def read_file(context: RunContext, file_path: str = "", start_line: int | None = None, num_lines: int | None = None) -> ReadFileOutput:
|
|
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
|
{code_puppy-0.0.87 → code_puppy-0.0.89}/code_puppy/command_line/prompt_toolkit_completion.py
RENAMED
|
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
|