code-puppy 0.0.87__py3-none-any.whl → 0.0.89__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.
code_puppy/models.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "url": "https://api.cerebras.ai/v1",
12
12
  "api_key": "$CEREBRAS_API_KEY"
13
13
  },
14
- "context_length": 10000
14
+ "context_length": 131072
15
15
  },
16
16
  "Cerebras-Qwen3-235b-a22b-instruct-2507": {
17
17
  "type": "custom_openai",
@@ -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
- return _list_files(context, directory, recursive)
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:
@@ -11,7 +11,7 @@
11
11
  "url": "https://api.cerebras.ai/v1",
12
12
  "api_key": "$CEREBRAS_API_KEY"
13
13
  },
14
- "context_length": 10000
14
+ "context_length": 131072
15
15
  },
16
16
  "Cerebras-Qwen3-235b-a22b-instruct-2507": {
17
17
  "type": "custom_openai",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.87
3
+ Version: 0.0.89
4
4
  Summary: Code generation agent
5
5
  Author: Michael Pfaffenberger
6
6
  License: MIT
@@ -5,7 +5,7 @@ code_puppy/config.py,sha256=r5nw5ChOP8xd_K5yo8U5OtO2gy2bFhARiyNtDp1JrwQ,5013
5
5
  code_puppy/main.py,sha256=NLA6TI2is3htFRc5BGTwF4Xp68EtnN-6nOExD9D8i_g,11513
6
6
  code_puppy/message_history_processor.py,sha256=2k9y4wXkyZ9v4XLpfH6E3TKLzf303i-k1hXBE-aIf9U,9249
7
7
  code_puppy/model_factory.py,sha256=HXuFHNkVjkCcorAd3ScFmSvBILO932UTq6OmNAqisT8,10898
8
- code_puppy/models.json,sha256=oeS8ryoMEMqyv-2ln7TIQRttfucY81abE_ReQvAfkiM,2727
8
+ code_puppy/models.json,sha256=jr0-LW87aJS79GosVwoZdHeeq5eflPzgdPoMbcqpVA8,2728
9
9
  code_puppy/state_management.py,sha256=JkTkmq6f9rl_RHPDoBqJvbAzgaMsIkJf-k38ragItIo,1692
10
10
  code_puppy/summarization_agent.py,sha256=jHUQe6iYJsMT0ywEwO7CrhUIKEamO5imhAsDwvNuvow,2684
11
11
  code_puppy/token_utils.py,sha256=g7Jj6NAy_a2ab7BXpwyhktruR-QlUV670H_mCPZV1N4,2110
@@ -18,14 +18,14 @@ code_puppy/command_line/motd.py,sha256=FoZsiVpXGF8WpAmEJX4O895W7MDuzCtNWvFAOShxU
18
18
  code_puppy/command_line/prompt_toolkit_completion.py,sha256=De_grHDPOvCRph-HDOGCSgX6r_q6akoXArTRwgAskLU,8334
19
19
  code_puppy/command_line/utils.py,sha256=7eyxDHjPjPB9wGDJQQcXV_zOsGdYsFgI0SGCetVmTqE,1251
20
20
  code_puppy/tools/__init__.py,sha256=WTHYIfRk2KMmk6o45TELpbB3GIiAm8s7GmfJ7Zy_tww,503
21
- code_puppy/tools/command_runner.py,sha256=DkqRShJo4KQx70Qu9D42xYesc8H9WI3pKDSf-IPyd_8,14532
21
+ code_puppy/tools/command_runner.py,sha256=9UWCSPpuEndaPx8Ecc8TRsn3rMHNd2AqerirvYPGRIw,14358
22
22
  code_puppy/tools/common.py,sha256=UkhnfLG1bmd4f9nZCcmno088AtKtAnEES1tydxUN-Fk,3265
23
23
  code_puppy/tools/file_modifications.py,sha256=BzQrGEacS2NZr2ru9N30x_Qd70JDudBKOAPO1XjBohg,13861
24
- code_puppy/tools/file_operations.py,sha256=hXOoRWhOyUyVEX_uAah8VBMZr5AsuyhMvj9uL8osUpE,13257
24
+ code_puppy/tools/file_operations.py,sha256=5oJSJCKPLSgJ9YcD1CV9D-SJ0hnzVzmuAs-eiriLPLo,13615
25
25
  code_puppy/tools/token_check.py,sha256=F3eygdI8fgb6dfCrSkGw_OLI7cb_Kpa5ILft4BQ7hvY,525
26
- code_puppy-0.0.87.data/data/code_puppy/models.json,sha256=oeS8ryoMEMqyv-2ln7TIQRttfucY81abE_ReQvAfkiM,2727
27
- code_puppy-0.0.87.dist-info/METADATA,sha256=gMfRNvzmXcBjyy0u7Hx__ZBkqCebaammd-WSNHfkC54,6351
28
- code_puppy-0.0.87.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
- code_puppy-0.0.87.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
30
- code_puppy-0.0.87.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
31
- code_puppy-0.0.87.dist-info/RECORD,,
26
+ code_puppy-0.0.89.data/data/code_puppy/models.json,sha256=jr0-LW87aJS79GosVwoZdHeeq5eflPzgdPoMbcqpVA8,2728
27
+ code_puppy-0.0.89.dist-info/METADATA,sha256=Dyf2vyOvwhvrBVfNd1xIvmIgcvCEOKOYK5Hyy6xScT4,6351
28
+ code_puppy-0.0.89.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
+ code_puppy-0.0.89.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
30
+ code_puppy-0.0.89.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
31
+ code_puppy-0.0.89.dist-info/RECORD,,