code-puppy 0.0.153__py3-none-any.whl → 0.0.154__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.
@@ -26,14 +26,6 @@ from code_puppy.summarization_agent import run_summarization_sync
26
26
  # Default is 50000 but can be customized in ~/.code_puppy/puppy.cfg
27
27
 
28
28
 
29
- def estimate_token_count(text: str) -> int:
30
- """
31
- Simple token estimation using len(message) - 4.
32
- This replaces tiktoken with a much simpler approach.
33
- """
34
- return int(max(1, len(text)) / 4)
35
-
36
-
37
29
  def stringify_message_part(part) -> str:
38
30
  """
39
31
  Convert a message part to a string representation for token estimation or other uses.
@@ -84,7 +76,7 @@ def estimate_tokens_for_message(message: ModelMessage) -> int:
84
76
  for part in message.parts:
85
77
  part_str = stringify_message_part(part)
86
78
  if part_str:
87
- total_tokens += estimate_token_count(part_str)
79
+ total_tokens += len(part_str)
88
80
 
89
81
  return int(max(1, total_tokens) / 4)
90
82
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.153
3
+ Version: 0.0.154
4
4
  Summary: Code generation agent
5
5
  Project-URL: repository, https://github.com/mpfaffenberger/code_puppy
6
6
  Project-URL: HomePage, https://github.com/mpfaffenberger/code_puppy
@@ -5,7 +5,7 @@ code_puppy/callbacks.py,sha256=6wYB6K_fGSCkKKEFaYOYkJT45WaV5W_NhUIzcvVH_nU,5060
5
5
  code_puppy/config.py,sha256=oJCVEp6cK4u4ynKe-1TGlpB_TW1Q4pp14oFhtGEWhbk,16165
6
6
  code_puppy/http_utils.py,sha256=BAvt4hed7fVMXglA7eS9gOb08h2YTuOyai6VmQq09fg,3432
7
7
  code_puppy/main.py,sha256=Vv5HSJnkgZhCvvOoXrJ2zqM5P-i47-RcYAU00Z1Pfx0,21733
8
- code_puppy/message_history_processor.py,sha256=og3o2mBWYbVuhZ5Zljz8bcfS_o8pnY0z4MWvN3jfBVA,16159
8
+ code_puppy/message_history_processor.py,sha256=aV-vcRcOQJPZPlrokB4CaLMxEU3Y4nDiabb9Ov_sJeU,15933
9
9
  code_puppy/model_factory.py,sha256=-_0kJ7qYmRTDk0v3mfp-UrYf0IaDLyG8IMBweDECwJg,11917
10
10
  code_puppy/models.json,sha256=dAfpMMI2EEeOMv0ynHSmMuJAYDLcZrs5gCLX3voC4-A,3252
11
11
  code_puppy/reopenable_async_client.py,sha256=4UJRaMp5np8cbef9F0zKQ7TPKOfyf5U-Kv-0zYUWDho,8274
@@ -126,9 +126,9 @@ code_puppy/tui/tests/test_sidebar_history_navigation.py,sha256=JGiyua8A2B8dLfwiE
126
126
  code_puppy/tui/tests/test_status_bar.py,sha256=nYT_FZGdmqnnbn6o0ZuOkLtNUtJzLSmtX8P72liQ5Vo,1797
127
127
  code_puppy/tui/tests/test_timestamped_history.py,sha256=nVXt9hExZZ_8MFP-AZj4L4bB_1Eo_mc-ZhVICzTuw3I,1799
128
128
  code_puppy/tui/tests/test_tools.py,sha256=kgzzAkK4r0DPzQwHHD4cePpVNgrHor6cFr05Pg6DBWg,2687
129
- code_puppy-0.0.153.data/data/code_puppy/models.json,sha256=dAfpMMI2EEeOMv0ynHSmMuJAYDLcZrs5gCLX3voC4-A,3252
130
- code_puppy-0.0.153.dist-info/METADATA,sha256=SzIm6XO--hpRuNPOUDpbQrPgnkgk6aPLCPUo7l0gme8,19516
131
- code_puppy-0.0.153.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
132
- code_puppy-0.0.153.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
133
- code_puppy-0.0.153.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
134
- code_puppy-0.0.153.dist-info/RECORD,,
129
+ code_puppy-0.0.154.data/data/code_puppy/models.json,sha256=dAfpMMI2EEeOMv0ynHSmMuJAYDLcZrs5gCLX3voC4-A,3252
130
+ code_puppy-0.0.154.dist-info/METADATA,sha256=r4J6tLEqJwVVG7j5eMrQRI1zMENfwZKdNo2KrOI_pBQ,19516
131
+ code_puppy-0.0.154.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
132
+ code_puppy-0.0.154.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
133
+ code_puppy-0.0.154.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
134
+ code_puppy-0.0.154.dist-info/RECORD,,